[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1f53cd74-6c1e-4a1c-838b-4acc8c5e22c1@intel.com>
Date: Sat, 21 Sep 2024 22:17:08 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Lorenzo Bianconi <lorenzo@...nel.org>,
Toke Høiland-Jørgensen <toke@...nel.org>
CC: <bpf@...r.kernel.org>, <netdev@...r.kernel.org>, <ast@...nel.org>,
<daniel@...earbox.net>, <davem@...emloft.net>, <kuba@...nel.org>,
<hawk@...nel.org>, <john.fastabend@...il.com>, <edumazet@...gle.com>,
<pabeni@...hat.com>, <lorenzo.bianconi@...hat.com>, <toke@...e.dk>,
<sdf@...gle.com>, <tariqt@...dia.com>, <saeedm@...dia.com>,
<anthony.l.nguyen@...el.com>, <przemyslaw.kitszel@...el.com>,
<intel-wired-lan@...ts.osuosl.org>, <mst@...hat.com>, <jasowang@...hat.com>,
<mcoquelin.stm32@...il.com>, <alexandre.torgue@...s.st.com>
Subject: Re: [RFC bpf-next 0/4] Add XDP rx hw hints support performing
XDP_REDIRECT
From: Lorenzo Bianconi <lorenzo@...nel.org>
Date: Sat, 21 Sep 2024 18:52:56 +0200
> This series introduces the xdp_rx_meta struct in the xdp_buff/xdp_frame
&xdp_buff is on the stack.
&xdp_frame consumes headroom.
IOW they're size-sensitive and putting metadata directly there might
play bad; if not now, then later.
Our idea (me + Toke) was as follows:
- new BPF kfunc to build generic meta. If called, the driver builds a
generic meta with hash, csum etc., in the data_meta area.
Yes, this also consumes headroom, but only when the corresponding func
is called. Introducing new fields like you're doing will consume it
unconditionally;
- when &xdp_frame gets converted to sk_buff, the function checks whether
data_meta contains a generic structure filled with hints.
We also thought about &skb_shared_info, but it's also size-sensitive as
it consumes tailroom.
> one as a container to store the already supported xdp rx hw hints (rx_hash
> and rx_vlan, rx_timestamp will be stored in skb_shared_info area) when the
> eBPF program running on the nic performs XDP_REDIRECT. Doing so, we are able
> to set the skb metadata converting the xdp_buff/xdp_frame to a skb.
Thanks,
Olek
Powered by blists - more mailing lists