linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v5 0/2] virtio-net: fix for VIRTIO_NET_F_GUEST_HDRLEN
@ 2025-11-11 11:12 Xuan Zhuo
  2025-11-11 11:12 ` [PATCH net v5 1/2] virtio-net: correct hdr_len handling " Xuan Zhuo
  2025-11-11 11:12 ` [PATCH net v5 2/2] virtio-net: correct hdr_len handling for tunnel gso Xuan Zhuo
  0 siblings, 2 replies; 7+ messages in thread
From: Xuan Zhuo @ 2025-11-11 11:12 UTC (permalink / raw)
  To: netdev
  Cc: Richard Weinberger, Anton Ivanov, Johannes Berg, Willem de Bruijn,
	Jason Wang, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Michael S. Tsirkin, Xuan Zhuo,
	Eugenio Pérez, Simon Horman, Jiri Pirko, Alvaro Karsz,
	linux-um, virtualization

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

 arch/um/drivers/vector_transports.c |  1 +
 drivers/net/tun_vnet.h              |  4 +--
 drivers/net/virtio_net.c            |  9 +++++--
 include/linux/virtio_net.h          | 40 +++++++++++++++++++++++------
 net/packet/af_packet.c              |  5 ++--
 5 files changed, 45 insertions(+), 14 deletions(-)

--
2.32.0.3.g01195cf9f



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-11-13 15:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-11 11:12 [PATCH net v5 0/2] virtio-net: fix for VIRTIO_NET_F_GUEST_HDRLEN Xuan Zhuo
2025-11-11 11:12 ` [PATCH net v5 1/2] virtio-net: correct hdr_len handling " Xuan Zhuo
2025-11-11 11:33   ` Michael S. Tsirkin
2025-11-13 14:39   ` Paolo Abeni
2025-11-13 15:59     ` Michael S. Tsirkin
2025-11-11 11:12 ` [PATCH net v5 2/2] virtio-net: correct hdr_len handling for tunnel gso Xuan Zhuo
2025-11-13 14:50   ` Paolo Abeni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).