net/mlx5e: Convert rep stats to mlx5e_stats_grp-based infra
authorVlad Buslov <vladbu@mellanox.com>
Tue, 21 Jan 2020 17:38:21 +0000 (19:38 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 23 Jan 2020 06:30:12 +0000 (22:30 -0800)
commit8a236b15144b29ce47f80c37bc55740a5388ecb1
treec06570e5af1b6eb1928200805dfd578e0b3a72e9
parent2a303f13f9cda5a8f5729ccb84b211c1ef6bed92
net/mlx5e: Convert rep stats to mlx5e_stats_grp-based infra

In order to support all of the supported stats that are available in legacy
mode for switchdev uplink representors, convert rep stats infrastructure to
reuse struct mlx5e_stats_grp that is already used when device is in legacy
mode. Refactor rep code to use array of mlx5e_stats_grp
structures (constructed using macros provided by stats infra) to
fill/update stats, instead of fixed hardcoded set of values. This approach
allows to easily extend representors with new stats types.

Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c