diff options
author | Anoob Soman <anoob.soman@citrix.com> | 2014-05-20 12:40:35 +0100 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2014-06-09 10:45:28 -0700 |
commit | 3a208109f5e91b0cfbc387877b81aba743eab5f3 (patch) | |
tree | b03b9eb77715243847fbaf918b877999b3c1c9af /ofproto/netflow.h | |
parent | 059ef3c65f596f93e56c7062e35977d429faa4ab (diff) | |
download | openvswitch-3a208109f5e91b0cfbc387877b81aba743eab5f3.tar.gz |
netflow: Fold netflow_expire() into netflow_flow_clear().
netflow_flow_clear() asserted that no packets or bytes were included
in the statistics for the flow being cleared. Before threading Open
vSwitch, this assertion was always true because netflow_expire() was
always called before calling netflow_flow_clear(). Since Open
vSwitch was threaded, however, it was possible that a packet arrived
after netflow_expire() but before netflow_flow_clear(), since each of
these function separately took the netflow mutex.
This commit fixes the problem by merging netflow_expire() into
netflow_flow_clear(), under a single acquisition of the netflow
mutex.
Signed-off-by: Anoob Soman <anoob.soman@citrix.com>
[blp@nicira.com modified the patch to remove netflow_expire() and
rewrote the commit message]
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'ofproto/netflow.h')
-rw-r--r-- | ofproto/netflow.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ofproto/netflow.h b/ofproto/netflow.h index e89b75e2c..94dd3ff19 100644 --- a/ofproto/netflow.h +++ b/ofproto/netflow.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011, 2013 Nicira, Inc. + * Copyright (c) 2008, 2009, 2010, 2011, 2013, 2014 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,7 +46,6 @@ void netflow_unref(struct netflow *); bool netflow_exists(void); int netflow_set_options(struct netflow *, const struct netflow_options *); -void netflow_expire(struct netflow *, struct flow *); void netflow_run(struct netflow *); void netflow_wait(struct netflow *); |