]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Sep 2025 13:31:47 +0000 (15:31 +0200)
[ Upstream commit b1a0c977c6f1130f7dd125ee3db8c2435d7e3d41 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ice/ice_txrx.c

index f522dd42093a9ff75202c8827d9f9df524ac90fd..cde69f56866562442f2d008bf385ac1eee8f97e2 100644 (file)
@@ -1295,7 +1295,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);