diff options
author | Ben Pfaff <blp@nicira.com> | 2010-10-29 15:22:15 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-11-11 11:04:12 -0800 |
commit | d6de72a12fad59941409ac3ff57f1660ac5a28bb (patch) | |
tree | bee21a58c6e9e257c3d1fc54deed50d8f64315a4 /ofproto/netflow.c | |
parent | 1eb0942d2262a9cfce6793f519ea32da959d93b6 (diff) | |
download | openvswitch-d6de72a12fad59941409ac3ff57f1660ac5a28bb.tar.gz |
ofproto: Avoid clearing NetFlow stats twice upon rule creation.
This seems cleaner to me: it seems risky to "clear" something that has not
been initialized yet. It's also a super-minor optimization, I suppose.
Diffstat (limited to 'ofproto/netflow.c')
-rw-r--r-- | ofproto/netflow.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ofproto/netflow.c b/ofproto/netflow.c index af6dda78c..37b18ffd3 100644 --- a/ofproto/netflow.c +++ b/ofproto/netflow.c @@ -283,6 +283,14 @@ netflow_destroy(struct netflow *nf) } } +/* Initializes a new 'nf_flow' given that the caller has already cleared it to + * all-zero-bits. */ +void +netflow_flow_init(struct netflow_flow *nf_flow OVS_UNUSED) +{ + /* Nothing to do. */ +} + void netflow_flow_clear(struct netflow_flow *nf_flow) { |