summaryrefslogtreecommitdiff
path: root/ofproto/netflow.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-10-29 15:22:15 -0700
committerBen Pfaff <blp@nicira.com>2010-11-11 11:04:12 -0800
commitd6de72a12fad59941409ac3ff57f1660ac5a28bb (patch)
treebee21a58c6e9e257c3d1fc54deed50d8f64315a4 /ofproto/netflow.c
parent1eb0942d2262a9cfce6793f519ea32da959d93b6 (diff)
downloadopenvswitch-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.c8
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)
{