From 071c8d75718050e7037f44e661000fbd10c81557 Mon Sep 17 00:00:00 2001 From: Divakar Date: Mon, 22 Jun 2015 12:26:36 +0530 Subject: [PATCH] Disabling Source lookup for Vxlan packets When the Vxlan packet from TOR are reaching a compute node, before processing them in Vrf translate nexthop, we verify, in nh_output(), whether flow processing needs to happen or not. IF policy bit is not enabled in the nexthop, we do inner source IP lookup to identify if it is ECMP source. If so, we force the flow processing. Incase of control node peering with two MX, the BMS subnet would be advertised by both MX leading to ECMP source . This is forcing the vxlan tagged packets to be trapped to AGent with nh_id as VRF translate nexthop. This leads to Agent marking the flow as short flow as Agent already has set this flow with l3_nhid. To avoid this scenario, the source lookup is done only for INET packets Change-Id: Ic63c05ade2c7ee3757003d6cace8595eb015dc7a closes-bug: #1467273 --- dp-core/vr_nexthop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dp-core/vr_nexthop.c b/dp-core/vr_nexthop.c index 464116318..bda48e5f4 100644 --- a/dp-core/vr_nexthop.c +++ b/dp-core/vr_nexthop.c @@ -1635,7 +1635,8 @@ nh_output(struct vr_packet *pkt, struct vr_nexthop *nh, * flow lookup now or not. There are two cases: * * 1. when policy flag is set in the nexthop, and - * 2. when the source is an ECMP. + * 2. when the source is an ECMP (For bridged packets this ECMP + * is avoided) * * When the source is an ECMP, we would like the packet to reach the * same place from where it came from, and hence a flow has to be setup @@ -1646,7 +1647,8 @@ nh_output(struct vr_packet *pkt, struct vr_nexthop *nh, if (!(pkt->vp_flags & VP_FLAG_FLOW_SET)) { if (nh->nh_flags & NH_FLAG_POLICY_ENABLED) { need_flow_lookup = true; - } else { + } else if ((nh->nh_family == AF_INET) && + (!(nh->nh_flags & NH_FLAG_VNID))) { src_nh = vr_inet_src_lookup(fmd->fmd_dvrf, pkt); if (src_nh && src_nh->nh_type == NH_COMPOSITE && src_nh->nh_flags & NH_FLAG_COMPOSITE_ECMP) {