From 517775d18e4f734910d32dac3a70d9ec1f1d24a6 Mon Sep 17 00:00:00 2001 From: Manish Date: Fri, 24 Feb 2017 16:37:30 +0530 Subject: [PATCH] Set action to drop if its a short flow. To handle the cases where TrafficAction gets overridden after being marked as drop, use short flow flag as well to identify drop action. Change-Id: I45e98836c5463a9913f2a9bdb9aeedc2643f6c2c Closes-bug: #1664301 --- src/vnsw/agent/pkt/flow_entry.cc | 5 ----- src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/vnsw/agent/pkt/flow_entry.cc b/src/vnsw/agent/pkt/flow_entry.cc index ee91a10517a..62237144e8b 100644 --- a/src/vnsw/agent/pkt/flow_entry.cc +++ b/src/vnsw/agent/pkt/flow_entry.cc @@ -2079,11 +2079,6 @@ bool FlowEntry::ActionRecompute() { } } - // Force short flows to DROP - if (is_flags_set(FlowEntry::ShortFlow)) { - action |= (1 << TrafficAction::DENY); - } - if (SetQosConfigIndex()) { ret = true; } diff --git a/src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc b/src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc index 1bfbbfb6537..c32dad4fea4 100644 --- a/src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc +++ b/src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc @@ -399,6 +399,10 @@ int FlowTableKSyncEntry::Encode(sandesh_op::type op, char *buf, int buf_len) { } } + if (flow_entry_->IsShortFlow()) { + action = VR_FLOW_ACTION_DROP; + } + req.set_fr_flags(flags); req.set_fr_action(action); req.set_fr_drop_reason(drop_reason);