diff --git a/src/vnsw/agent/pkt/flow_entry.cc b/src/vnsw/agent/pkt/flow_entry.cc index 2e0a3db1fab..d3c7ff5bbb6 100644 --- a/src/vnsw/agent/pkt/flow_entry.cc +++ b/src/vnsw/agent/pkt/flow_entry.cc @@ -1867,6 +1867,9 @@ void FlowEntry::FillFlowInfo(FlowInfo &info) { info.set_smac(data_.smac.ToString()); info.set_dmac(data_.dmac.ToString()); info.set_drop_reason(FlowEntry::DropReasonStr(data_.drop_reason)); + if (flow_table_) { + info.set_table_id(flow_table_->table_index()); + } } static void SetAclListAceId(const AclDBEntry *acl, diff --git a/src/vnsw/agent/pkt/pkt.sandesh b/src/vnsw/agent/pkt/pkt.sandesh index 1980e18b969..2a30e379d49 100644 --- a/src/vnsw/agent/pkt/pkt.sandesh +++ b/src/vnsw/agent/pkt/pkt.sandesh @@ -239,6 +239,7 @@ struct FlowInfo { 37: optional u64 dip_upper; 38: optional u64 dip_lower; 43: string drop_reason; + 44: u16 table_id; } /** diff --git a/src/vnsw/agent/vrouter/flow_stats/flow_stats_collector.cc b/src/vnsw/agent/vrouter/flow_stats/flow_stats_collector.cc index 634abccef68..551c1df9b08 100644 --- a/src/vnsw/agent/vrouter/flow_stats/flow_stats_collector.cc +++ b/src/vnsw/agent/vrouter/flow_stats/flow_stats_collector.cc @@ -800,8 +800,12 @@ bool FlowStatsCollector::RequestHandler(boost::shared_ptr req) { /* Fetch the update stats and export the flow with teardown_time */ FlowExportInfo *info = FindFlowExportInfo(req->key()); if (!info) { - /* Do not expect duplicate deletes */ - assert(0); + /* Ignore duplicate deletes for NOW. When two flow-entries point + * to same flow-key (because entries are in different partition), + * we can get duplicate deletes */ + /* TODO: change the flow_tree_ key of FlowStatsCollector from + * FlowKey to Flow UUID */ + break; } /* While updating stats for evicted flows, we set the teardown_time * and export the flow. So delete handling for evicted flows need not