diff options
author | Joe Damato <jdamato@fastly.com> | 2021-12-17 11:35:19 -0800 |
---|---|---|
committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2022-02-08 08:21:52 -0800 |
commit | b76bc129839d65fa8dbeefd3581dacd54596706f (patch) | |
tree | ab43e9b8d151e8b35daa2ca8b9b1297fee7f0e2b /drivers/net/ethernet/intel/i40e/i40e_main.c | |
parent | i40e: Add a stat for tracking pages waived (diff) | |
download | linux-dev-b76bc129839d65fa8dbeefd3581dacd54596706f.tar.xz linux-dev-b76bc129839d65fa8dbeefd3581dacd54596706f.zip |
i40e: Add a stat for tracking busy rx pages
In some cases, pages cannot be reused by i40e because the page is busy. Add
a counter for this event.
Busy page count is accessible via 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 385b241abf06..9b7ce6d9a92b 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -773,7 +773,7 @@ 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, rx_waive; + u64 rx_page, rx_buf, rx_reuse, rx_alloc, rx_waive, rx_busy; struct i40e_pf *pf = vsi->back; struct rtnl_link_stats64 *ons; struct rtnl_link_stats64 *ns; /* netdev stats */ @@ -809,6 +809,7 @@ static void i40e_update_vsi_stats(struct i40e_vsi *vsi) rx_reuse = 0; rx_alloc = 0; rx_waive = 0; + rx_busy = 0; rcu_read_lock(); for (q = 0; q < vsi->num_queue_pairs; q++) { /* locate Tx ring */ @@ -845,6 +846,7 @@ static void i40e_update_vsi_stats(struct i40e_vsi *vsi) rx_reuse += p->rx_stats.page_reuse_count; rx_alloc += p->rx_stats.page_alloc_count; rx_waive += p->rx_stats.page_waive_count; + rx_busy += p->rx_stats.page_busy_count; if (i40e_enabled_xdp_vsi(vsi)) { /* locate XDP ring */ @@ -875,6 +877,7 @@ static void i40e_update_vsi_stats(struct i40e_vsi *vsi) vsi->rx_page_reuse = rx_reuse; vsi->rx_page_alloc = rx_alloc; vsi->rx_page_waive = rx_waive; + vsi->rx_page_busy = rx_busy; ns->rx_packets = rx_p; ns->rx_bytes = rx_b; |