lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACGkMEvFRdgStxGxUjkCyUqn055bvL80bkH-kncvv=E+sLVymw@mail.gmail.com>
Date: Mon, 26 May 2025 12:40:48 +0800
From: Jason Wang <jasowang@...hat.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, Willem de Bruijn <willemdebruijn.kernel@...il.com>, 
	Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, 
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, 
	"Michael S. Tsirkin" <mst@...hat.com>, Xuan Zhuo <xuanzhuo@...ux.alibaba.com>, 
	Eugenio Pérez <eperezma@...hat.com>
Subject: Re: [PATCH net-next 8/8] vhost/net: enable gso over UDP tunnel support.

On Wed, May 21, 2025 at 6:34 PM Paolo Abeni <pabeni@...hat.com> wrote:
>
> Vhost net need to know the exact virtio net hdr size to be able
> to copy such header correctly. Teach it about the newly defined
> UDP tunnel-related option and update the hdr size computation
> accordingly.
>
> Signed-off-by: Paolo Abeni <pabeni@...hat.com>
> ---
>  drivers/vhost/net.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
> index b894685dded3e..985f9662a9003 100644
> --- a/drivers/vhost/net.c
> +++ b/drivers/vhost/net.c
> @@ -78,7 +78,9 @@ enum {
>  };
>
>  #ifdef VIRTIO_HAS_EXTENDED_FEATURES
> -#define VHOST_NET_FEATURES_EX VHOST_NET_FEATURES
> +#define VHOST_NET_FEATURES_EX (VHOST_NET_FEATURES | \
> +                       (VIRTIO_BIT(VIRTIO_NET_F_GUEST_UDP_TUNNEL_GSO)) | \
> +                       (VIRTIO_BIT(VIRTIO_NET_F_HOST_UDP_TUNNEL_GSO)))
>  #endif
>
>  enum {
> @@ -1621,12 +1623,16 @@ static long vhost_net_reset_owner(struct vhost_net *n)
>  static int vhost_net_set_features(struct vhost_net *n, virtio_features_t features)
>  {
>         size_t vhost_hlen, sock_hlen, hdr_len;
> +       bool has_tunnel;
>         int i;
>
>         hdr_len = (features & ((1ULL << VIRTIO_NET_F_MRG_RXBUF) |
>                                (1ULL << VIRTIO_F_VERSION_1))) ?
>                         sizeof(struct virtio_net_hdr_mrg_rxbuf) :
>                         sizeof(struct virtio_net_hdr);
> +       has_tunnel = !!(features & (VIRTIO_BIT(VIRTIO_NET_F_GUEST_UDP_TUNNEL_GSO) |
> +                                   VIRTIO_BIT(VIRTIO_NET_F_HOST_UDP_TUNNEL_GSO)));
> +       hdr_len += has_tunnel ? sizeof(struct virtio_net_hdr_tunnel) : 0;

Same as patch 7, this seems to ignore the hash report fields.

Thanks


>         if (features & (1 << VHOST_NET_F_VIRTIO_NET_HDR)) {
>                 /* vhost provides vnet_hdr */
>                 vhost_hlen = hdr_len;
> --
> 2.49.0
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ