This avoids causing failed assert(), when netflow_flow_clear() and netflow_expire() are called together.
Signed-off-by: Anoob Soman <anoob.so...@citrix.com> --- AUTHORS | 2 +- ofproto/netflow.c | 3 +-- ofproto/ofproto-dpif-upcall.c | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/AUTHORS b/AUTHORS index 9cf6fe7..dd1e22d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -13,7 +13,7 @@ Andrew Lambeth w...@nicira.com Andy Hill hil...@gmail.com Andy Southgate andy.southg...@citrix.com Andy Zhou az...@nicira.com -Anob Soman anoob.so...@citrix.com +Anoob Soman anoob.so...@citrix.com Ansis Atteka aatt...@nicira.com Anupam Chanda acha...@nicira.com Arun Sharma arun.sha...@calsoftinc.com diff --git a/ofproto/netflow.c b/ofproto/netflow.c index e9382af..d556d3e 100644 --- a/ofproto/netflow.c +++ b/ofproto/netflow.c @@ -296,8 +296,7 @@ netflow_flow_clear(struct netflow *nf, struct flow *flow) OVS_EXCLUDED(mutex) ovs_mutex_lock(&mutex); nf_flow = netflow_flow_lookup(nf, flow); if (nf_flow) { - ovs_assert(!nf_flow->packet_count); - ovs_assert(!nf_flow->byte_count); + netflow_expire__(nf, nf_flow); hmap_remove(&nf->flows, &nf_flow->hmap_node); free(nf_flow); } diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index 522aa8c..63b8e6e 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -1326,7 +1326,6 @@ exit: ovs_mutex_unlock(&ukey->mutex); if (netflow) { if (!ok) { - netflow_expire(netflow, &flow); netflow_flow_clear(netflow, &flow); } netflow_unref(netflow); @@ -1411,7 +1410,6 @@ push_dump_ops__(struct udpif *udpif, struct dump_op *ops, size_t n_ops) xlate_actions_for_side_effects(&xin); if (netflow) { - netflow_expire(netflow, &flow); netflow_flow_clear(netflow, &flow); netflow_unref(netflow); } -- 1.9.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev