Skip to content

Commit 6fdfa22

Browse files
michalQbgregkh
authored andcommitted
ice: fix incorrect counter for buffer allocation failures
[ Upstream commit b1a0c97 ] 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: 2fba7dc ("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>
1 parent a9dd49e commit 6fdfa22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/intel/ice/ice_txrx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ int ice_clean_rx_irq(struct ice_rx_ring *rx_ring, int budget)
12951295
skb = ice_construct_skb(rx_ring, xdp);
12961296
/* exit if we failed to retrieve a buffer */
12971297
if (!skb) {
1298-
rx_ring->ring_stats->rx_stats.alloc_page_failed++;
1298+
rx_ring->ring_stats->rx_stats.alloc_buf_failed++;
12991299
xdp_verdict = ICE_XDP_CONSUMED;
13001300
}
13011301
ice_put_rx_mbuf(rx_ring, xdp, &xdp_xmit, ntc, xdp_verdict);

0 commit comments

Comments
 (0)