> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf
> Of Chenguang Zhao
> Sent: Friday, July 31, 2026 4:08 AM
> To: Nguyen, Anthony L <[email protected]>; Kitszel,
> Przemyslaw <[email protected]>; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]
> Cc: [email protected]; [email protected];
> [email protected]; [email protected]; Chenguang Zhao
> <[email protected]>
> Subject: [Intel-wired-lan] [PATCH net-next v3] i40e: xsk: use
> xdp_build_skb_from_zc() for XDP_PASS
>
> From: Chenguang Zhao <[email protected]>
>
> Replace the driver-local i40e_construct_skb_zc() with the common
> helper xdp_build_skb_from_zc(). On failure, free the xdp buff in the
> caller.
>
> xdp_build_skb_from_zc() already calls skb_record_rx_queue() and
> eth_type_trans(), so pull the remaining descriptor field setup into
> __i40e_process_skb_fields() and use that on the XDP_PASS path.
>
> Signed-off-by: Chenguang Zhao <[email protected]>
> ---
> v3:
> As suggested by Larysa:
> - Drop eth_skb_pad() on the XDP_PASS path, along with the
> temporary __skb_push()/__skb_pull() around it. The stack
> handles short skbs and other vendors do not pad on Rx.
>
> v2:
> - https://lore.kernel.org/all/20260729054916.720750-1-
> [email protected]/
>
> v1:
> - https://lore.kernel.org/all/20260724020125.246333-1-
> [email protected]/
> ---
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 32 ++++++--
> .../ethernet/intel/i40e/i40e_txrx_common.h | 2 +
> drivers/net/ethernet/intel/i40e/i40e_xsk.c | 79 ++----------------
> -
> 3 files changed, 33 insertions(+), 80 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> index ef5e657816f0..87553b14d34a 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> @@ -1833,17 +1833,17 @@ static inline void i40e_rx_hash(struct
> i40e_ring *ring, }
>
> /**
...
> napi_gro_receive(&rx_ring->q_vector->napi, skb);
> return;
> }
> --
> 2.25.1
Reviewed-by: Aleksandr Loktionov <[email protected]>