netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iwl-net] ice: fix incorrect counter for buffer allocation failures
@ 2025-08-08 15:53 Michal Kubiak
  2025-08-08 23:25 ` Jacob Keller
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Michal Kubiak @ 2025-08-08 15:53 UTC (permalink / raw)
  To: intel-wired-lan
  Cc: maciej.fijalkowski, netdev, przemyslaw.kitszel, jacob.e.keller,
	aleksander.lobakin, anthony.l.nguyen, Michal Kubiak, Paul Menzel

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>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-08-21  6:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-08 15:53 [PATCH iwl-net] ice: fix incorrect counter for buffer allocation failures Michal Kubiak
2025-08-08 23:25 ` Jacob Keller
2025-08-09  9:34 ` Paul Menzel
2025-08-09 13:08   ` Jason Xing
2025-08-11 21:31     ` Jacob Keller
2025-08-11  8:16 ` [Intel-wired-lan] " Loktionov, Aleksandr
     [not found] ` <PH0PR11MB5013285B7475C7F6ABEC1E4E9632A@PH0PR11MB5013.namprd11.prod.outlook.com>
2025-08-21  6:22   ` Singh, PriyaX
2025-08-21  6:35     ` Singh, PriyaX

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).