Skip to content
  • Gal Pressman's avatar
    net/mlx5e: Statistics handling refactoring · 9218b44d
    Gal Pressman authored
    
    
    Redesign ethtool statistics handling and reporting in the driver:
    1. Move counters to a separate file (en_stats.h).
    2. Remove unnecessary dependencies between stats and strings.
    3. Use counter descriptors which hold a name and offset for each counter,
       and will be used to decide which counters will be exposed.
    
    For example when adding a new software counter to ethtool, instead of:
    1. Add to stats struct.
    2. Add to strings struct in the same order.
    3. Change macro defining number of software counters.
    The only thing needed is to link the new counter to a counter descriptor.
    
    VPort counters are a set of hardware traffic counters created automatically
    for each virtual port opened.
    PPort counters are a set of counters describing per physical port
    performance statistics.
    These counters are gathered from hardware register and divided to groups
    according to different protocols.
    
    Signed-off-by: default avatarGal Pressman <galp@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9218b44d