Thread (7 messages) 7 messages, 4 authors, 2025-10-09

Re: [PATCH v2 net-next 3/3] vhost/net: enable outer nw header offset support

From: Paolo Abeni <pabeni@redhat.com>
Date: 2025-10-09 09:44:56
Also in: virtualization

On 10/8/25 1:00 PM, Kommula Shiva Shankar wrote:
quoted hunk ↗ jump to hunk
apprise vhost net about the virtio net header size.

Signed-off-by: Kommula Shiva Shankar <redacted>
---
 drivers/vhost/net.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 35ded4330431..8d055405746d 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -78,6 +78,7 @@ static const u64 vhost_net_features[VIRTIO_FEATURES_DWORDS] = {
 	(1ULL << VIRTIO_F_IN_ORDER),
 	VIRTIO_BIT(VIRTIO_NET_F_GUEST_UDP_TUNNEL_GSO) |
 	VIRTIO_BIT(VIRTIO_NET_F_HOST_UDP_TUNNEL_GSO),
+	VIRTIO_BIT(VIRTIO_NET_F_OUT_NET_HEADER),
I guess this patch needs better testing; the above triggers a compile
warning:

./drivers/vhost/net.c:81:2: warning: excess elements in array
initializer [-Wexcess-initializers]
   81 |         VIRTIO_BIT(VIRTIO_NET_F_OUT_NET_HEADER),

which in turns hints the feature is not actually used/available. The
chunk should be:

  	VIRTIO_BIT(VIRTIO_NET_F_GUEST_UDP_TUNNEL_GSO) |
  	VIRTIO_BIT(VIRTIO_NET_F_HOST_UDP_TUNNEL_GSO)  |
	VIRTIO_BIT(VIRTIO_NET_F_OUT_NET_HEADER),

/P
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help