> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf
> Of Matt Vollrath
> Sent: Friday, July 31, 2026 2:41 PM
> To: [email protected]
> Cc: [email protected]; Lobakin, Aleksander
> <[email protected]>; Nguyen, Anthony L
> <[email protected]>; Kitszel, Przemyslaw
> <[email protected]>; Andrew Lunn <[email protected]>;
> David S . Miller <[email protected]>; Eric Dumazet
> <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni
> <[email protected]>; Simon Horman <[email protected]>; Matt Vollrath
> <[email protected]>
> Subject: [Intel-wired-lan] [PATCH iwl-next 2/3] iavf: use
> __libeth_rx_sync_for_cpu
> 
> The Rx ring already has a reference to its page pool adjacent to
> fields touched every iteration. Avoid loading the netmem_desc for sync
> by taking the shortcut.
> 
> Signed-off-by: Matt Vollrath <[email protected]>
> Assisted-by: Claude:claude-5-fable
> ---
>  drivers/net/ethernet/intel/iavf/iavf_txrx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_txrx.c
> b/drivers/net/ethernet/intel/iavf/iavf_txrx.c
> index c30abf17cf5d..3ae2f0a0ee4d 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_txrx.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_txrx.c
> @@ -1387,6 +1387,7 @@ static int iavf_clean_rx_irq(struct iavf_ring
> *rx_ring, int budget)  {
>       bool flex = rx_ring->rxdid == VIRTCHNL_RXDID_2_FLEX_SQ_NIC;
>       unsigned int total_rx_bytes = 0, total_rx_packets = 0;
> +     const struct page_pool *pp = rx_ring->pp;
>       struct sk_buff *skb = rx_ring->skb;
>       u16 cleaned_count = IAVF_DESC_UNUSED(rx_ring);
>       bool failure = false;
> @@ -1424,7 +1425,7 @@ static int iavf_clean_rx_irq(struct iavf_ring
> *rx_ring, int budget)
>               iavf_trace(clean_rx_irq, rx_ring, rx_desc, skb);
> 
>               rx_buffer = &rx_ring->rx_fqes[rx_ring->next_to_clean];
> -             if (!libeth_rx_sync_for_cpu(rx_buffer, fields.len))
> +             if (!__libeth_rx_sync_for_cpu(pp, rx_buffer,
> fields.len))
>                       goto skip_data;
> 
>               /* retrieve a buffer from the ring */
> --
> 2.43.0

Reviewed-by: Aleksandr Loktionov <[email protected]>


Reply via email to