diff mbox series

[net-queue,1/5] i40e: Remove rx page reuse double count.

Message ID 1639521730-57226-2-git-send-email-jdamato@fastly.com
State Superseded
Headers show
Series i40e: stat counter updates and additions | expand

Commit Message

Joe Damato Dec. 14, 2021, 10:42 p.m. UTC
Page reuse was being tracked from two locations:
  - i40e_reuse_rx_page (via 40e_clean_rx_irq), and
  - i40e_alloc_mapped_page

Remove the double count and only count reuse from i40e_alloc_mapped_page
when the page is about to be reused.

Signed-off-by: Joe Damato <jdamato@fastly.com>
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Jakub Kicinski Dec. 16, 2021, 3:45 p.m. UTC | #1
On Tue, 14 Dec 2021 14:42:06 -0800 Joe Damato wrote:
> Page reuse was being tracked from two locations:
>   - i40e_reuse_rx_page (via 40e_clean_rx_irq), and
>   - i40e_alloc_mapped_page
> 
> Remove the double count and only count reuse from i40e_alloc_mapped_page
> when the page is about to be reused.
> 
> Signed-off-by: Joe Damato <jdamato@fastly.com>

Possibly a fix, this one?
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 10a83e5..8b3ffb7 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1382,8 +1382,6 @@  static void i40e_reuse_rx_page(struct i40e_ring *rx_ring,
 	new_buff->page_offset	= old_buff->page_offset;
 	new_buff->pagecnt_bias	= old_buff->pagecnt_bias;
 
-	rx_ring->rx_stats.page_reuse_count++;
-
 	/* clear contents of buffer_info */
 	old_buff->page = NULL;
 }