[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251009062720-mutt-send-email-mst@kernel.org>
Date: Thu, 9 Oct 2025 06:31:00 -0400
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Kommula Shiva Shankar <kshankar@...vell.com>
Cc: netdev@...r.kernel.org, jasowang@...hat.com, pabeni@...hat.com,
xuanzhuo@...ux.alibaba.com, virtualization@...ts.linux.dev,
parav@...dia.com, jerinj@...vell.com, ndabilpuram@...vell.com,
sburla@...vell.com, schalla@...vell.com
Subject: Re: [PATCH v2 net-next 3/3] vhost/net: enable outer nw header
offset support
On Wed, Oct 08, 2025 at 04:30:04PM +0530, Kommula Shiva Shankar wrote:
> apprise vhost net about the virtio net header size.
>
> Signed-off-by: Kommula Shiva Shankar <kshankar@...vell.com>
> ---
> 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),
> };
>
> enum {
How does this even work?
VIRTIO_FEATURES_DWORDS is 2, you can't really
add more elements.
Pls include info on testing done in your next
submission.
> @@ -1655,6 +1656,9 @@ static int vhost_net_set_features(struct vhost_net *n, const u64 *features)
> sizeof(struct virtio_net_hdr_mrg_rxbuf) :
> sizeof(struct virtio_net_hdr);
>
> + if (virtio_features_test_bit(features,
> + VIRTIO_NET_F_OUT_NET_HEADER))
> + hdr_len = sizeof(struct virtio_net_hdr_v1_hash_tunnel_out_net_hdr);
> if (virtio_features_test_bit(features,
> VIRTIO_NET_F_HOST_UDP_TUNNEL_GSO) ||
> virtio_features_test_bit(features,
> --
> 2.48.1
Powered by blists - more mailing lists