• Kamal Heib's avatar
    net/mlx5e: Introduce stats group API · c0752f2b
    Kamal Heib authored
    Currently the mlx5e driver has multiple groups of stats, each group is
    used for different purposes and it may depend on hardware capabilities
    or not. The problem with the current implementation is that there is no
    clear API to create a new group of stats.
    
    This change define a new API to create a group of stats and simplifies
    the way of handling them by defining a new struct "mlx5e_stats_grp" which
    have the following three function pointers:
    - get_num_stats() - return the number of counters in the group.
    - fill_strings() - fill counters strings within the group.
    - fill_stats() - fill counters values within the group.
    
    The above function pointers are used within the ethtool callbaks while
    calling "ethtool -S" from userspace. This change also switch the SW
    group to use the new API.
    Signed-off-by: default avatarKamal Heib <kamalh@mellanox.com>
    Reviewed-by: default avatarGal Pressman <galp@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    c0752f2b
Makefile 1.05 KB