Skip to content

net: fix kernel dropping GSO tagged packets

Hangbin Liu netdev virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net/af_packet: adjust network header position for VLAN tagged packetsnet/packet/af_packet.c+13 -56 replies
2/2virtio_net: check L3 protocol for VLAN packetsinclude/linux/virtio_net.h+19 -75 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net 0/2] net: fix kernel dropping GSO tagged packets

Flavio reported that the kernel drops GSO VLAN tagged packet if it's created with socket(AF_PACKET, SOCK_RAW, 0) plus virtio_net_hdr.

The reason is AF_PACKET doesn't adjust the skb network header if there is a VLAN tag. And in virtio_net_hdr_to_skb() it also checks skb->protocol blindly and not take care of VLAN tags.

The first patch adjust the network header position for AF_PACKET VLAN tagged packets. The second patch fixes the VLAN protocol checking in virtio_net_hdr_to_skb().

Hangbin Liu (2):
net/af_packet: adjust network header position for VLAN tagged packets
virtio_net: check L3 protocol for VLAN packets

 include/linux/virtio_net.h | 26 +++++++++++++++++++-------
 net/packet/af_packet.c     | 18 +++++++++++++-----
 2 files changed, 32 insertions(+), 12 deletions(-)
Signature · 1 line
2.35.1