From b4980e5c9bb4bcddafa0d747bee72dba5856c496 Mon Sep 17 00:00:00 2001 From: "Anand H. Krishnan" Date: Fri, 15 Jul 2016 10:09:55 +0530 Subject: [PATCH] If NH doesn't have policy, do not create flows even if the source is an ECMP For providing stickiness in the case of ECMP, vRouter explicitly used to create flows even if the corresponding NextHop didn't have the policy bit set. This now is a wrong behavior when we are supporting ECMP without flows. Hence, do not create such flows, if the nexthop doesn't have policy enabled. Change-Id: I48c28150b75e7c78d4d093de327caf98a19ff420 Partial-BUG: #1566650 --- dp-core/vr_nexthop.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/dp-core/vr_nexthop.c b/dp-core/vr_nexthop.c index d2764febc..29c5c83a8 100644 --- a/dp-core/vr_nexthop.c +++ b/dp-core/vr_nexthop.c @@ -1916,7 +1916,6 @@ int nh_output(struct vr_packet *pkt, struct vr_nexthop *nh, struct vr_forwarding_md *fmd) { - struct vr_nexthop *src_nh = NULL; bool need_flow_lookup = false; if (!pkt->vp_ttl) { @@ -1950,13 +1949,6 @@ 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 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) { - need_flow_lookup = true; - } } if (need_flow_lookup) {