Re: [Intel-wired-lan] [PATCH net v3] i40e: xsk: fix multi-buffer XDP_PASS skb construction

"Holda, Patryk" <[email protected]>
Newsgroups org.osuosl.intel-wired-lan,org.kernel.vger.netdev
Message-ID <IA3PR11MB9301D0DE5EED82A87B09DF538ADD2@IA3PR11MB9301.namprd11.prod.outlook.com>
> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of
> Fijalkowski, Maciej
> Sent: Friday, July 24, 2026 5:25 PM
> To: Chenguang Zhao <[email protected]>; Nguyen, Anthony L
> <[email protected]>; Kitszel, Przemyslaw
> <[email protected]>; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]
> Cc: [email protected]; [email protected]; Chenguang
> Zhao <[email protected]>; Loktionov, Aleksandr
> <[email protected]>; Jason Xing <[email protected]>
> Subject: Re: [Intel-wired-lan] [PATCH net v3] i40e: xsk: fix multi-buffer
> XDP_PASS skb construction
> Importance: High
> 
> > From: Chenguang Zhao <[email protected]>
> >
> > When AF_XDP ZC receives a multi-buffer frame and the XDP program
> > returns XDP_PASS, i40e_construct_skb_zc() copies frags into a new skb.
> > The copy used skb_frag_page() as the memcpy source (page metadata
> > instead of packet data) and passed a virtual address to
> > __skb_fill_page_desc_noacc(), which expects a struct page *.
> >
> > Use skb_frag_address() for the copy, attach frags with
> > skb_add_rx_frag() so len/data_len/truesize are updated, and on
> > dev_alloc_page() failure free the skb via the shared out path so
> > xsk_buff_free() still runs and previously attached pages are released
> > by kfree_skb.
> >
> > Fixes: 1c9ba9c14658 ("i40e: xsk: add RX multi-buffer support")
> > Signed-off-by: Chenguang Zhao <[email protected]>
> > Reviewed-by: Aleksandr Loktionov <[email protected]>
> > Reviewed-by: Jason Xing <[email protected]>
> 
> Acked-by: Maciej Fijalkowski <[email protected]>


Tested-by: Patryk Holda <[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.