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: <062e886f-7c83-4d46-97f1-ebbce3ca8212@kernel.org>
Date: Wed, 7 May 2025 19:08:38 +0200
From: Jesper Dangaard Brouer <hawk@...nel.org>
To: Zvi Effron <zeffron@...tgames.com>
Cc: Willem de Bruijn <willemdebruijn.kernel@...il.com>,
 Stanislav Fomichev <stfomichev@...il.com>, Jon Kohler <jon@...anix.com>,
 Jason Wang <jasowang@...hat.com>, Andrew Lunn <andrew+netdev@...n.ch>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
 John Fastabend <john.fastabend@...il.com>, Simon Horman <horms@...nel.org>,
 netdev@...r.kernel.org, linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
 Jacob Keller <jacob.e.keller@...el.com>
Subject: Re: [PATCH net-next v3] xdp: Add helpers for head length, headroom,
 and metadata length



On 07/05/2025 19.02, Zvi Effron wrote:
> On Wed, May 7, 2025 at 9:37 AM Jesper Dangaard Brouer <hawk@...nel.org> wrote:
>>
>>
>>
>> On 07/05/2025 15.29, Willem de Bruijn wrote:
>>> Stanislav Fomichev wrote:
>>>> On 05/06, Jon Kohler wrote:
>>>>> Introduce new XDP helpers:
>>>>> - xdp_headlen: Similar to skb_headlen
>>
>> I really dislike xdp_headlen(). This "headlen" originates from an SKB
>> implementation detail, that I don't think we should carry over into XDP
>> land.
>> We need to come up with something that isn't easily mis-read as the
>> header-length.
> 
> ... snip ...
> 
>>>> + * xdp_headlen - Calculate the length of the data in an XDP buffer
> 
> How about xdp_datalen()?

Yes, I like xdp_datalen() :-)
--Jesper

> On Wed, May 7, 2025 at 9:37 AM Jesper Dangaard Brouer <hawk@...nel.org> wrote:
>>
>>
>>
>> On 07/05/2025 15.29, Willem de Bruijn wrote:
>>> Stanislav Fomichev wrote:
>>>> On 05/06, Jon Kohler wrote:
>>>>> Introduce new XDP helpers:
>>>>> - xdp_headlen: Similar to skb_headlen
>>
>> I really dislike xdp_headlen().  This "headlen" originates from an SKB
>> implementation detail, that I don't think we should carry over into XDP
>> land.
>> We need to come up with something that isn't easily mis-read as the
>> header-length.
>>
>>>>> - xdp_headroom: Similar to skb_headroom
>>>>> - xdp_metadata_len: Similar to skb_metadata_len
>>>>>
>>
>> I like naming of these.
>>
>>>>> Integrate these helpers into tap, tun, and XDP implementation to start.
>>>>>
>>>>> No functional changes introduced.
>>>>>
>>>>> Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
>>>>> Signed-off-by: Jon Kohler <jon@...anix.com>
>>>>> ---
>>>>> v2->v3: Integrate feedback from Stanislav
>>>>> https://patchwork.kernel.org/project/netdevbpf/patch/20250430201120.1794658-1-jon@nutanix.com/
>>>>
>>>> Acked-by: Stanislav Fomichev <sdf@...ichev.me>
>>>
>>> Reviewed-by: Willem de Bruijn <willemb@...gle.com>
>>>
>>
>> Nacked-by: Jesper Dangaard Brouer <hawk@...nel.org>
>>
>> pw: cr
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ