OSDN Git Service

net/mlx5e: Profile specific stats groups
authorSaeed Mahameed <saeedm@mellanox.com>
Tue, 21 Jan 2020 06:32:12 +0000 (22:32 -0800)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 23 Jan 2020 06:29:49 +0000 (22:29 -0800)
commit3460c184dfb0b41118b5000ad78dd997c034b2b5
treeb3b38adb023c0b3255a0c0c619562c526ba8d8fa
parent29b598ddb8d2d401257013c2af5e9f003bf84ec4
net/mlx5e: Profile specific stats groups

Attach stats groups array to the profiles and make the stats utility
functions (get_num, update, fill, fill_strings) generic and use the
profile->stats_grps rather the hardcoded NIC stats groups.

This will allow future extension to have per profile stats groups.

In this patch mlx5e NIC and IPoIB will still share the same stats
groups.

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.h
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c