> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of
> Michal Kubiak
> Sent: Friday, August 8, 2025 9:23 PM
> To: [email protected]
> Cc: Fijalkowski, Maciej <[email protected]>;
> [email protected]; Kitszel, Przemyslaw
> <[email protected]>; Keller, Jacob E <[email protected]>;
> Lobakin, Aleksander <[email protected]>; Nguyen, Anthony L
> <[email protected]>; Kubiak, Michal <[email protected]>;
> Paul Menzel <[email protected]>
> Subject: [Intel-wired-lan] [PATCH iwl-net] ice: fix incorrect counter for 
> buffer
> allocation failures
> 
> Currently, the driver increments `alloc_page_failed` when buffer allocation
> fails in `ice_clean_rx_irq()`. However, this counter is intended for page
> allocation failures, not buffer allocation issues.
> 
> This patch corrects the counter by incrementing `alloc_buf_failed` instead,
> ensuring accurate statistics reporting for buffer allocation failures.
> 
> Fixes: 2fba7dc5157b ("ice: Add support for XDP multi-buffer on Rx side")
> Reported-by: Jacob Keller <[email protected]>
> Suggested-by: Paul Menzel <[email protected]>
> Signed-off-by: Michal Kubiak <[email protected]>
> ---
>  drivers/net/ethernet/intel/ice/ice_txrx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c
> b/drivers/net/ethernet/intel/ice/ice_txrx.c
> index 93907ab2eac7..1b1ebfd347ef 100644
> --- a/drivers/net/ethernet/intel/ice/ice_txrx.c
> +++ b/drivers/net/ethernet/intel/ice/ice_txrx.c
> @@ -1337,7 +1337,7 @@ static int ice_clean_rx_irq(struct ice_rx_ring
> *rx_ring, int budget)
>                       skb = ice_construct_skb(rx_ring, xdp);
>               /* exit if we failed to retrieve a buffer */
>               if (!skb) {
> -                     rx_ring->ring_stats->rx_stats.alloc_page_failed++;
> +                     rx_ring->ring_stats->rx_stats.alloc_buf_failed++;
>                       xdp_verdict = ICE_XDP_CONSUMED;
>               }
>               ice_put_rx_mbuf(rx_ring, xdp, ntc, xdp_verdict);
> --
> 2.45.2

Tested-by: Priya Singh <[email protected]>

Reply via email to