diff options
author | Joe Damato <jdamato@fastly.com> | 2021-12-17 11:35:17 -0800 |
---|---|---|
committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2022-02-08 08:21:52 -0800 |
commit | 453f8305483851c20a41b66719d5acdc945541ca (patch) | |
tree | 4dbd2a692353c56cfa812bab0b22a05ad565bb6f /drivers/net/ethernet/intel/i40e/i40e_main.c | |
parent | i40e: Aggregate and export RX page reuse stat (diff) | |
download | linux-dev-453f8305483851c20a41b66719d5acdc945541ca.tar.xz linux-dev-453f8305483851c20a41b66719d5acdc945541ca.zip |
i40e: Add a stat tracking new RX page allocations
Add a counter for new page allocations in the i40e RX path. This stat is
accessible with ethtool.
Signed-off-by: Joe Damato <jdamato@fastly.com>
Tested-by: Dave Switzer <david.switzer@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_main.c')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index c22e7b1a960b..9d62f5875c30 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -773,8 +773,8 @@ void i40e_update_veb_stats(struct i40e_veb *veb) **/ static void i40e_update_vsi_stats(struct i40e_vsi *vsi) { + u64 rx_page, rx_buf, rx_reuse, rx_alloc; struct i40e_pf *pf = vsi->back; - u64 rx_page, rx_buf, rx_reuse; struct rtnl_link_stats64 *ons; struct rtnl_link_stats64 *ns; /* netdev stats */ struct i40e_eth_stats *oes; @@ -807,6 +807,7 @@ static void i40e_update_vsi_stats(struct i40e_vsi *vsi) rx_page = 0; rx_buf = 0; rx_reuse = 0; + rx_alloc = 0; rcu_read_lock(); for (q = 0; q < vsi->num_queue_pairs; q++) { /* locate Tx ring */ @@ -841,6 +842,7 @@ static void i40e_update_vsi_stats(struct i40e_vsi *vsi) rx_buf += p->rx_stats.alloc_buff_failed; rx_page += p->rx_stats.alloc_page_failed; rx_reuse += p->rx_stats.page_reuse_count; + rx_alloc += p->rx_stats.page_alloc_count; if (i40e_enabled_xdp_vsi(vsi)) { /* locate XDP ring */ @@ -869,6 +871,7 @@ static void i40e_update_vsi_stats(struct i40e_vsi *vsi) vsi->rx_page_failed = rx_page; vsi->rx_buf_failed = rx_buf; vsi->rx_page_reuse = rx_reuse; + vsi->rx_page_alloc = rx_alloc; ns->rx_packets = rx_p; ns->rx_bytes = rx_b; |