diff options
author | Joe Damato <jdamato@fastly.com> | 2022-03-24 12:46:58 -0700 |
---|---|---|
committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2022-04-12 11:07:05 -0700 |
commit | f728fa01666952fc077801f2a12a088a49d3b543 (patch) | |
tree | 6eff54741b3a4a5275188fcb0667495f01efffcd /drivers/net/ethernet/intel/i40e/i40e_txrx.c | |
parent | 69e66c04c672d8ff83f76e625c27a4d7cd717c08 (diff) | |
download | linux-f728fa01666952fc077801f2a12a088a49d3b543.tar.gz linux-f728fa01666952fc077801f2a12a088a49d3b543.tar.bz2 linux-f728fa01666952fc077801f2a12a088a49d3b543.zip |
i40e: Add tx_stopped stat
Track TX queue stop events and export the new stat with ethtool.
Signed-off-by: Joe Damato <jdamato@fastly.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_txrx.c')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c index 8b844ad08a86..7bc1174edf6b 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c @@ -3396,6 +3396,8 @@ int __i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size) /* Memory barrier before checking head and tail */ smp_mb(); + ++tx_ring->tx_stats.tx_stopped; + /* Check again in a case another CPU has just made room available. */ if (likely(I40E_DESC_UNUSED(tx_ring) < size)) return -EBUSY; |