From 99fbd41081d09e2a2186a92bd57b7d4c696ea27e Mon Sep 17 00:00:00 2001 From: Manish Date: Tue, 21 Feb 2017 07:18:04 +0530 Subject: [PATCH] Dont use link local flag in bgp-aas flow encode. Presence of BGP service flag is indication of bgp-aas flows. Link local is not needed to identify candidate for relaxed policy. Bgp flags also indicates relaxed policy on fabric. Presence of this flag used to cause port to be freed on flow delete even though there will be a second flow using this port. Vrouter uses link local flag to release port. Removing this flag ensures that vrouter deos not release the port used in bgp-aas. In case flow is not present and port is still part of relaxed policy then packet will be sent to host, hence achieving the functionailty when port would have been released. Conflicts: src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc Change-Id: Id6cfd2d0b0ff3dc0724715bc126ccee882068486 Closes-bug: #1664301 --- src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc b/src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc index 32966aba4ef..e719a68d34f 100644 --- a/src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc +++ b/src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc @@ -327,13 +327,15 @@ int FlowTableKSyncEntry::Encode(sandesh_op::type op, char *buf, int buf_len) { flags |= VR_FLOW_FLAG_DPAT; } } - //TODO Seperate flags for BgpRouterService?? - if (nat_flow->is_flags_set(FlowEntry::LinkLocalBindLocalSrcPort) || - nat_flow->is_flags_set(FlowEntry::BgpRouterService)) { + + //Link local, flag determines relaxed policy + if (nat_flow->is_flags_set(FlowEntry::LinkLocalBindLocalSrcPort)) { flags |= VR_FLOW_FLAG_LINK_LOCAL; - if (nat_flow->is_flags_set(FlowEntry::BgpRouterService)) { - flags |= VR_FLOW_BGP_SERVICE; - } + } + + //Bgp service, flag determines relaxed policy + if (nat_flow->is_flags_set(FlowEntry::BgpRouterService)) { + flags |= VR_FLOW_BGP_SERVICE; } flags |= VR_FLOW_FLAG_VRFT;