[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <86294c15-523e-4ef5-a67c-d4068607da3f@linux.dev>
Date: Tue, 12 Aug 2025 19:59:49 -0700
From: Martin KaFai Lau <martin.lau@...ux.dev>
To: Jesper Dangaard Brouer <hawk@...nel.org>
Cc: Jakub Kicinski <kuba@...nel.org>, Lorenzo Bianconi <lorenzo@...nel.org>,
Stanislav Fomichev <stfomichev@...il.com>, bpf@...r.kernel.org,
netdev@...r.kernel.org, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <borkmann@...earbox.net>,
Eric Dumazet <eric.dumazet@...il.com>, "David S. Miller"
<davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>, sdf@...ichev.me,
kernel-team@...udflare.com, arthur@...hurfabre.com, jakub@...udflare.com,
Jesse Brandeburg <jbrandeburg@...udflare.com>,
Andrew Rzeznik <arzeznik@...udflare.com>
Subject: Re: [PATCH bpf-next V2 0/7] xdp: Allow BPF to set RX hints for
XDP_REDIRECTed packets
On 8/7/25 12:07 PM, Jesper Dangaard Brouer wrote:
> Yan and I have previously[1] (Oct 2024) explored adding a common
> callback to XDP drivers, which have access to both the xdp_buff and SKB
> in the function call. (Ignore the GRO disable bit, focus on callback)
>
> We named the functions: xdp_buff_fixup_skb_offloading() and
> xdp_frame_fixup_skb_offloading()
> We implemented the driver changes for [bnxt], [mlx5], [ice] and [veth].
>
> What do you think of the idea of adding a BPF-hook, at this callback,
> which have access to both the XDP and SKB pointer.
> That would allow us to implement your idea, right?
>
> [1] https://lore.kernel.org/all/cover.1718919473.git.yan@cloudflare.com/#r
>
> [bnxt] https://lore.kernel.org/all/
> f804c22ca168ec3aedb0ee754bfbee71764eb894.1718919473.git.yan@...udflare.com/
>
> [mlx5] https://lore.kernel.org/
> all/17595a278ee72964b83c0bd0b502152aa025f600.1718919473.git.yan@...udflare.com/
>
> [ice] https://lore.kernel.org/all/
> a9eba425bfd3bfac7e7be38fe86ad5dbff3ae01f.1718919473.git.yan@...udflare.com/
>
> [veth] https://lore.kernel.org/all/
> b7c75daecca9c4e36ef79af683d288653a9b5b82.1718919473.git.yan@...udflare.com/
It should not need a new BPF-hook to consume info produced by an earlier xdp
prog. Instead, the same and existing xdp prog can call a kfunc to directly
create the skb and update the skb fields. The kfunc could be driver specific,
like the current .xmo_rx_xxx.
Powered by blists - more mailing lists