]> www.infradead.org Git - users/griffoul/linux.git/commitdiff
ice: fix incorrect counter for buffer allocation failures
authorMichal Kubiak <michal.kubiak@intel.com>
Fri, 8 Aug 2025 15:53:10 +0000 (17:53 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 25 Aug 2025 16:45:23 +0000 (09:45 -0700)
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 <jacob.e.keller@intel.com>
Suggested-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Michal Kubiak <michal.kubiak@intel.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Priya Singh <priyax.singh@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_txrx.c

index 29e0088ab6b28bf3d8eef27c4ecb8e733a21824a..d2871757ec94012533e990e4bc208b1b2a82df2f 100644 (file)
@@ -1352,7 +1352,7 @@ construct_skb:
                        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, &xdp_xmit, ntc, xdp_verdict);