[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251119055522.617-1-xuanzhuo@linux.alibaba.com>
Date: Wed, 19 Nov 2025 13:55:20 +0800
From: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
To: netdev@...r.kernel.org
Cc: Willem de Bruijn <willemdebruijn.kernel@...il.com>,
Jason Wang <jasowang@...hat.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Eugenio Pérez <eperezma@...hat.com>,
Jiri Pirko <jiri@...nulli.us>,
Alvaro Karsz <alvaro.karsz@...id-run.com>,
virtualization@...ts.linux.dev
Subject: [PATCH net v6 0/2] virtio-net: fix for VIRTIO_NET_F_GUEST_HDRLEN
v6:
1. rename to guest_hdrlen
2. introduce a function virtio_net_set_hdrlen to set the hdrlen
The commit be50da3e9d4a ("net: virtio_net: implement exact header length
guest feature") introduces support for the VIRTIO_NET_F_GUEST_HDRLEN
feature in virtio-net.
This feature requires virtio-net to set hdr_len to the actual header
length of the packet when transmitting, the number of
bytes from the start of the packet to the beginning of the
transport-layer payload.
However, in practice, hdr_len was being set using skb_headlen(skb),
which is clearly incorrect. This path set fixes that issue.
As discussed in [0], this version checks the VIRTIO_NET_F_GUEST_HDRLEN is
negotiated.
[0]: http://lore.kernel.org/all/20251029030913.20423-1-xuanzhuo@linux.alibaba.com
Xuan Zhuo (2):
virtio-net: correct hdr_len handling for VIRTIO_NET_F_GUEST_HDRLEN
virtio-net: correct hdr_len handling for tunnel gso
drivers/net/tun_vnet.h | 2 +-
drivers/net/virtio_net.c | 8 +++--
include/linux/virtio_net.h | 71 ++++++++++++++++++++++++++++++--------
3 files changed, 64 insertions(+), 17 deletions(-)
--
2.32.0.3.g01195cf9f
Powered by blists - more mailing lists