Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
anandhk-juniper committed Jul 15, 2016
1 parent d04ed07 commit b4980e5
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions dp-core/vr_nexthop.c
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit b4980e5

Please sign in to comment.