[Intel-wired-lan] [PATCH bpf v2 4/9] ice: change XDP RxQ frag_size from DMA write length to xdp.frame_sz

Larysa Zaremba larysa.zaremba at intel.com
Fri Feb 13 08:41:22 UTC 2026


On Fri, Feb 13, 2026 at 04:57:25AM +0100, Loktionov, Aleksandr wrote:
> 
> 
> > -----Original Message-----
> > From: Zaremba, Larysa <larysa.zaremba at intel.com>
> > Sent: Thursday, February 12, 2026 7:33 PM
> > To: bpf at vger.kernel.org
> > Cc: Zaremba, Larysa <larysa.zaremba at intel.com>; Claudiu Manoil
> > <claudiu.manoil at nxp.com>; Vladimir Oltean <vladimir.oltean at nxp.com>;
> > Wei Fang <wei.fang at nxp.com>; Clark Wang <xiaoning.wang at nxp.com>;
> > Andrew Lunn <andrew+netdev at lunn.ch>; David S. Miller
> > <davem at davemloft.net>; Eric Dumazet <edumazet at google.com>; Jakub
> > Kicinski <kuba at kernel.org>; Paolo Abeni <pabeni at redhat.com>; Nguyen,
> > Anthony L <anthony.l.nguyen at intel.com>; Kitszel, Przemyslaw
> > <przemyslaw.kitszel at intel.com>; Alexei Starovoitov <ast at kernel.org>;
> > Daniel Borkmann <daniel at iogearbox.net>; Jesper Dangaard Brouer
> > <hawk at kernel.org>; John Fastabend <john.fastabend at gmail.com>;
> > Stanislav Fomichev <sdf at fomichev.me>; Andrii Nakryiko
> > <andrii at kernel.org>; Martin KaFai Lau <martin.lau at linux.dev>; Eduard
> > Zingerman <eddyz87 at gmail.com>; Song Liu <song at kernel.org>; Yonghong
> > Song <yonghong.song at linux.dev>; KP Singh <kpsingh at kernel.org>; Hao Luo
> > <haoluo at google.com>; Jiri Olsa <jolsa at kernel.org>; Simon Horman
> > <horms at kernel.org>; Shuah Khan <shuah at kernel.org>; Lobakin, Aleksander
> > <aleksander.lobakin at intel.com>; Fijalkowski, Maciej
> > <maciej.fijalkowski at intel.com>; Bastien Curutchet (eBPF Foundation)
> > <bastien.curutchet at bootlin.com>; Vyavahare, Tushar
> > <tushar.vyavahare at intel.com>; Jason Xing <kernelxing at tencent.com>;
> > Ricardo B. Marlière <rbm at suse.com>; Eelco Chaudron
> > <echaudro at redhat.com>; Lorenzo Bianconi <lorenzo at kernel.org>; Toke
> > Hoiland-Jorgensen <toke at redhat.com>; imx at lists.linux.dev;
> > netdev at vger.kernel.org; linux-kernel at vger.kernel.org; intel-wired-
> > lan at lists.osuosl.org; linux-kselftest at vger.kernel.org; Loktionov,
> > Aleksandr <aleksandr.loktionov at intel.com>; Dragos Tatulea
> > <dtatulea at nvidia.com>
> > Subject: [PATCH bpf v2 4/9] ice: change XDP RxQ frag_size from DMA
> > write length to xdp.frame_sz
> > 
> > The only user of frag_size field in XDP RxQ info is
> > bpf_xdp_frags_increase_tail(). It clearly expects whole buff size
> > instead of DMA write size. Different assumptions in ice driver
> > configuration lead to negative tailroom.
> > 
> > This allows to trigger kernel panic, when using
> > XDP_ADJUST_TAIL_GROW_MULTI_BUFF xskxceiver test and changing packet
> > size to
> > 6912 and the requisted offset to a huge value, e.g.
> 
> "requisted offset" -> "requested offset"
> 

I am curious why codespell thinks this is fine.

Will fix, bot has correctly identified that u32 rx_buf_len; is not longer needed 
after this patch.

> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov at intel.com>
> > XSK_UMEM__MAX_FRAME_SIZE * 100.
> > 
> > Due to other quirks of the ZC configuration in ice, panic is not
> > observed in ZC mode, but tailroom growing still fails when it should
> > not.
> > 
> > Use fill queue buffer truesize instead of DMA write size in XDP RxQ
> > info.
> > Fix ZC mode too by using the new helper.
> > 
> > Fixes: 2fba7dc5157b ("ice: Add support for XDP multi-buffer on Rx
> > side")
> > Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov at intel.com>
> > Signed-off-by: Larysa Zaremba <larysa.zaremba at intel.com>
> > ---
> 
> ...
>  
> > --
> > 2.52.0
> 


More information about the Intel-wired-lan mailing list