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: <CACGkMEu3Za1D_U2qC7MGyVNuHsmuMby4gbEopN8E_tQXWr2zwQ@mail.gmail.com>
Date: Tue, 3 Jun 2025 10:11:30 +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 5/8] net: implement virtio helpers to handle UDP
 GSO tunneling.

On Thu, May 29, 2025 at 11:30 PM Paolo Abeni <pabeni@...hat.com> wrote:
>
> On 5/26/25 6:40 AM, Jason Wang wrote:
> > On Wed, May 21, 2025 at 6:34 PM Paolo Abeni <pabeni@...hat.com> wrote:
> >> @@ -242,4 +249,158 @@ static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb,
> >>         return 0;
> >>  }
> >>
> >> +static inline unsigned int virtio_l3min(bool is_ipv6)
> >> +{
> >> +       return is_ipv6 ? sizeof(struct ipv6hdr) : sizeof(struct iphdr);
> >> +}
> >> +
> >> +static inline int virtio_net_hdr_tnl_to_skb(struct sk_buff *skb,
> >> +                                           const struct virtio_net_hdr *hdr,
> >> +                                           unsigned int tnl_hdr_offset,
> >> +                                           bool tnl_csum_negotiated,
> >> +                                           bool little_endian)
> >
> > Considering tunnel gso requires VERSION_1, I think there's no chance
> > for little_endian to be false here.
>
> If tnl_hdr_offset == 0, tunnel gso has not been negotiated, and
> little_endian could be false. I can assume little_endian is true in the
> !!tnl_hdr_offset branch.

That would be fine, and I wonder if tnl_hdr_offset is better than
having an accepting struct virtio_net_hdr_tunnel * (assuming we agree
that it is a part of the uAPI) which seems more consistent and avoids
a cast.

Thanks

>
> /P
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ