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

"Fijalkowski, Maciej" <[email protected]> Fri, 24 Jul 2026 15:24:51 +0000
Newsgroups org.osuosl.intel-wired-lan,org.kernel.vger.netdev
Message-ID <DM4PR11MB6117EB6F9538C7BBB808C24682CF2@DM4PR11MB6117.namprd11.prod.outlook.com>
> From: Chenguang Zhao <[email protected]>
>=20
> 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 *.
>=20
> 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.
>=20
> 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]>