aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40e/i40e_main.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2013-09-28 02:00:43 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-10-10 01:21:39 -0400
commita114d0a6aca7f96f46be93539665dbb28bdf1a73 (patch)
tree5b623ad16cb38e80f2503626e902c402a0b0b329 /drivers/net/ethernet/intel/i40e/i40e_main.c
parent7070ce0a6419a118842298bc967061ad6cea40db (diff)
i40e: Split bytes and packets from Rx/Tx stats
This makes it so that the Tx and Rx byte and packet counts are separated from the rest of the statistics. This allows for better isolation of these stats when we move them into the 64 bit statistics. Simplify things by re-ordering how the stats display in ethtool. Instead of displaying all of the Tx queues as a block, followed by all the Rx queues, the new order is Tx[0], Rx[0], Tx[1], Rx[1], ..., Tx[n], Rx[n]. This reduces the loops and cleans up the display for testing purposes since it is very easy to verify if flow director is doing the right thing as the Tx and Rx queue pair are shown in pairs. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_main.c')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 657babe82c9c..d1b5bae15ea8 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -376,8 +376,12 @@ void i40e_vsi_reset_stats(struct i40e_vsi *vsi)
376 memset(&vsi->eth_stats_offsets, 0, sizeof(vsi->eth_stats_offsets)); 376 memset(&vsi->eth_stats_offsets, 0, sizeof(vsi->eth_stats_offsets));
377 if (vsi->rx_rings) 377 if (vsi->rx_rings)
378 for (i = 0; i < vsi->num_queue_pairs; i++) { 378 for (i = 0; i < vsi->num_queue_pairs; i++) {
379 memset(&vsi->rx_rings[i].stats, 0 ,
380 sizeof(vsi->rx_rings[i].stats));
379 memset(&vsi->rx_rings[i].rx_stats, 0 , 381 memset(&vsi->rx_rings[i].rx_stats, 0 ,
380 sizeof(vsi->rx_rings[i].rx_stats)); 382 sizeof(vsi->rx_rings[i].rx_stats));
383 memset(&vsi->tx_rings[i].stats, 0 ,
384 sizeof(vsi->tx_rings[i].stats));
381 memset(&vsi->tx_rings[i].tx_stats, 0, 385 memset(&vsi->tx_rings[i].tx_stats, 0,
382 sizeof(vsi->tx_rings[i].tx_stats)); 386 sizeof(vsi->tx_rings[i].tx_stats));
383 } 387 }
@@ -708,14 +712,14 @@ void i40e_update_stats(struct i40e_vsi *vsi)
708 struct i40e_ring *p; 712 struct i40e_ring *p;
709 713
710 p = &vsi->rx_rings[q]; 714 p = &vsi->rx_rings[q];
711 rx_b += p->rx_stats.bytes; 715 rx_b += p->stats.bytes;
712 rx_p += p->rx_stats.packets; 716 rx_p += p->stats.packets;
713 rx_buf += p->rx_stats.alloc_rx_buff_failed; 717 rx_buf += p->rx_stats.alloc_rx_buff_failed;
714 rx_page += p->rx_stats.alloc_rx_page_failed; 718 rx_page += p->rx_stats.alloc_rx_page_failed;
715 719
716 p = &vsi->tx_rings[q]; 720 p = &vsi->tx_rings[q];
717 tx_b += p->tx_stats.bytes; 721 tx_b += p->stats.bytes;
718 tx_p += p->tx_stats.packets; 722 tx_p += p->stats.packets;
719 tx_restart += p->tx_stats.restart_queue; 723 tx_restart += p->tx_stats.restart_queue;
720 tx_busy += p->tx_stats.tx_busy; 724 tx_busy += p->tx_stats.tx_busy;
721 } 725 }