diff options
author | Eran Ben Elisha <eranbe@mellanox.com> | 2015-06-15 17:59:06 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-15 17:23:02 -0700 |
commit | b42de4d01264fa84d8c9e04a18753a6c255567b5 (patch) | |
tree | 30a4d1761211aa949127a7f86810fc242cce4833 /drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h | |
parent | 9616982f3fcc9e6577d7f41009c4ef2df19a71ec (diff) | |
download | op-kernel-dev-b42de4d01264fa84d8c9e04a18753a6c255567b5.zip op-kernel-dev-b42de4d01264fa84d8c9e04a18753a6c255567b5.tar.gz |
net/mlx4_en: Show PF own statistics via ethtool
Allow the user to observe the PF own statistics using ethtool with pf_
prefixed counter names.
Those counters are the PF statistics out of the overall port statistics.
Every PF QP is attached to a counter and the summary of those counters
is the PF statistics.
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h index 0055583..c5c1de9 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h +++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h @@ -23,6 +23,14 @@ struct mlx4_en_pkt_stats { #define NUM_PKT_STATS 43 }; +struct mlx4_en_counter_stats { + unsigned long rx_packets; + unsigned long rx_bytes; + unsigned long tx_packets; + unsigned long tx_bytes; +#define NUM_PF_STATS 4 +}; + struct mlx4_en_port_stats { unsigned long tso_packets; unsigned long xmit_more; @@ -71,7 +79,8 @@ struct mlx4_en_flow_stats_tx { #define NUM_FLOW_STATS (NUM_FLOW_STATS_RX + NUM_FLOW_STATS_TX + \ NUM_FLOW_PRIORITY_STATS_TX + \ - NUM_FLOW_PRIORITY_STATS_RX) + NUM_FLOW_PRIORITY_STATS_RX + \ + NUM_PF_STATS) struct mlx4_en_stat_out_flow_control_mbox { /* Total number of PAUSE frames received from the far-end port */ |