Skip to content

Commit

Permalink
Disabling Source lookup for Vxlan packets
Browse files Browse the repository at this point in the history
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
  • Loading branch information
divakardhar committed Jun 22, 2015
1 parent 9eeaee5 commit 071c8d7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dp-core/vr_nexthop.c
Expand Up @@ -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
Expand All @@ -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) {
Expand Down

0 comments on commit 071c8d7

Please sign in to comment.