[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <37f16cf5-c785-4ad9-a8f4-3f9b3bf68052@redhat.com>
Date: Fri, 30 May 2025 10:43:03 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Jason Wang <jasowang@...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 5/29/25 1:55 PM, Paolo Abeni 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:
>>> + skb->transport_header = outer_th + skb_headroom(skb);
>>> + skb->encapsulation = 1;
>>> + return 0;
>>> +}
>>> +
>>> +static inline int virtio_net_chk_data_valid(struct sk_buff *skb,
>>> + struct virtio_net_hdr *hdr,
>>> + bool tun_csum_negotiated)
>>
>> This is virtio_net.h so it's better to avoid using "tun". Btw, I
>> wonder why this needs to be called by the virtio-net instead of being
>> called by hdr_to_skb helpers.
>
> I can squash into virtio_net_hdr_tnl_to_skb(), I kept them separated to
> avoid extra long argument lists, but we are dropping an argument from
> virtio_net_hdr_tnl_to_skb(), so should be ok.
I have to redact myself WRT the above. driver and device have different
csum-related offload support, as per specification (i.e. DATA_VALID),
and need different validation.
This helper is intended to be called only by the driver, will do the
wrong thing if used on the device side.
I'll try to clarify the usage in the next iteration.
/P
Powered by blists - more mailing lists