Re: [PATCH net-next v3] xdp: Add helpers for head length, headroom, and metadata length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 7, 2025 at 9:37 AM Jesper Dangaard Brouer <hawk@xxxxxxxxxx> 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()?

On Wed, May 7, 2025 at 9:37 AM Jesper Dangaard Brouer <hawk@xxxxxxxxxx> 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@xxxxxxxxx>
> >>> Signed-off-by: Jon Kohler <jon@xxxxxxxxxxx>
> >>> ---
> >>> v2->v3: Integrate feedback from Stanislav
> >>> https://patchwork.kernel.org/project/netdevbpf/patch/20250430201120.1794658-1-jon@xxxxxxxxxxx/
> >>
> >> Acked-by: Stanislav Fomichev <sdf@xxxxxxxxxxx>
> >
> > Reviewed-by: Willem de Bruijn <willemb@xxxxxxxxxx>
> >
>
> Nacked-by: Jesper Dangaard Brouer <hawk@xxxxxxxxxx>
>
> pw: cr
>





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux