Skip to content

Commit

Permalink
Post GRO, label in fmd can't be used to check whether the packet
Browse files Browse the repository at this point in the history
was tunneled or not

Once the packet is submitted for GRO, all datapath information is
lost. Post GRO, only values that are saved in the packet are the
vif and the nexthop. vif is a recent addition to the saved
information that helped us to identify which interface the packet
came from originally. Once the vif value was set properly, the logic
that checked whether the packet should be trapped to agent or not
based on the presence of label (basically fabric arp responses should
be trapped or not), misbehaved since label information is not saved
pre-GRO and hence not available in the metadata post GRO. For now,
fix the specific logic by checking whether the egress vrf is different
from the ingress vrf, which will be the case since physical interface
vrf will not be the same as vm's vrf.

Change-Id: Iba000889039bc8a5020fc11a462ba1b1a68ce1c8
Closes-BUG: #1551382
  • Loading branch information
anandhk-juniper authored and divakardhar committed May 14, 2016
1 parent df5eb9a commit 91b6f0f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions dp-core/vr_datapath.c
Expand Up @@ -349,6 +349,13 @@ vr_handle_arp_reply(struct vr_arp *sarp, struct vr_packet *pkt,
if (fmd->fmd_label >= 0)
return !handled;

/*
* in gro cases, fmd label won't be set. Hence, resort to the
* following check to identify whether the packet was tunneled
*/
if (fmd->fmd_dvrf != vif->vif_vrf)
return !handled;

/* If fabric: Agent and kernel are interested in it */
cloned_pkt = vr_pclone(pkt);
if (cloned_pkt) {
Expand Down
3 changes: 2 additions & 1 deletion dp-core/vr_vxlan.c
Expand Up @@ -57,7 +57,8 @@ vr_vxlan_input(struct vrouter *router, struct vr_packet *pkt,
drop_reason = VP_DROP_INVALID_PACKET;
goto fail;
}
pkt->vp_flags |= VP_FLAG_GRO;
if (vr_perfr)
pkt->vp_flags |= VP_FLAG_GRO;

if (nh->nh_vrf >= 0) {
fmd->fmd_dvrf = nh->nh_vrf;
Expand Down

0 comments on commit 91b6f0f

Please sign in to comment.