Skip to content

Commit

Permalink
Disabling GRO when mirroring is enabled
Browse files Browse the repository at this point in the history
When the packets are received on Fabric interface, these are subjected
to GRO before transmitting them to Tap interface. If Tx port mirroring
is enabled on Tap interface, as of now, mirroring is applied after GRO
of the packets. If the mirroring server is on another compute node, these
mirrored packets have GSO enabled. Vrouter makes use of Linux GSO routines
and these GSO routines expect that skb in skb_list of head_skb does not
contain any linear data (skb_headlen should be zero). Due to GRO the
skb_headle of some skb's in skb_list contains linear data resulting in
GSO routiness hitting a BUG_ON.

To over come this, the GRO needs to be applied post mirroring. To
enabled GSO on the mirrored packets the skb's gso_len also need to be
supplied. Instead of this fix, GRO is disabled if Tx port mirroring is
enabled on Tap interface as stop gap fix till the complete fix is in
place.

Change-Id: I7dd86e1bd90fef60efa4c9dbac78e853952c4fdc
closes-bug: #1577473
  • Loading branch information
divakardhar committed May 13, 2016
1 parent df5eb9a commit 5dfa88c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions dp-core/vr_mirror.c
Expand Up @@ -404,6 +404,7 @@ vr_mirror(struct vrouter *router, uint8_t mirror_id,

clone_len += mirror_md_len;
nh = mirror->mir_nh;
pkt->vp_flags &= ~VP_FLAG_GRO;
pkt = vr_pclone(pkt);
if (!pkt)
return 0;
Expand Down
6 changes: 4 additions & 2 deletions dp-core/vr_nexthop.c
Expand Up @@ -1826,7 +1826,8 @@ nh_encap_l2(struct vr_packet *pkt, struct vr_nexthop *nh,

stats = vr_inet_vrf_stats(fmd->fmd_dvrf, pkt->vp_cpu);

if ((pkt->vp_flags & VP_FLAG_GRO) && vif_is_virtual(vif)) {
if ((pkt->vp_flags & VP_FLAG_GRO) && vif_is_virtual(vif) &&
(!(vif->vif_flags & VIF_FLAG_MIRROR_TX))) {
if (vr_gro_input(pkt, nh)) {
if (stats)
stats->vrf_gros++;
Expand Down Expand Up @@ -1889,7 +1890,8 @@ nh_encap_l3(struct vr_packet *pkt, struct vr_nexthop *nh,
}
}

if ((pkt->vp_flags & VP_FLAG_GRO) && vif_is_virtual(vif)) {
if ((pkt->vp_flags & VP_FLAG_GRO) && vif_is_virtual(vif) &&
(!(vif->vif_flags & VIF_FLAG_MIRROR_TX))) {
if (vr_gro_input(pkt, nh))
return 0;
}
Expand Down

0 comments on commit 5dfa88c

Please sign in to comment.