summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h
diff options
context:
space:
mode:
authorEran Ben Elisha <eranbe@mellanox.com>2015-03-30 17:45:23 +0300
committerDavid S. Miller <davem@davemloft.net>2015-03-31 23:36:50 +0300
commit6fcd27354b36fb9234aabeecde337b40d5a16842 (patch)
tree552a42757341d1443efd28b530c82f7d6424026d /drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h
parentffa88f37ffeaac398be68f9678b0e6046a5ba7f6 (diff)
downloadlinux-6fcd27354b36fb9234aabeecde337b40d5a16842.tar.xz
net/mlx4_en: Support general selective view of ethtool statistics
The driver uses a bitmask to indicate which statistics should be displayed to the user in ethtool. The bitmask is u64, therefore we are limited for a selective view of up to 64 statistics. Extend the bitmap in order to show more than 64 statistics. In addition, add packet statistics to the ethtool display for PF. 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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h
index abea7a527abf..d7183e30b40b 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h
@@ -44,4 +44,8 @@ struct mlx4_en_perf_stats {
#define NUM_MAIN_STATS 21
#define NUM_ALL_STATS (NUM_MAIN_STATS + NUM_PORT_STATS + NUM_PKT_STATS + \
NUM_PERF_STATS)
+
+#define MLX4_FIND_NETDEV_STAT(n) (offsetof(struct net_device_stats, n) / \
+ sizeof(((struct net_device_stats *)0)->n))
+
#endif