• Petr Machata's avatar
    mlxsw: Add support for IFLA_OFFLOAD_XSTATS_L3_STATS · 8d0f7d3a
    Petr Machata authored
    Spectrum machines support L3 stats by binding a counter to a RIF, a
    hardware object representing a router interface. Recognize the netdevice
    notifier events, NETDEV_OFFLOAD_XSTATS_*, to support enablement,
    disablement, and reporting back to core.
    
    As a netdevice gains a RIF, if L3 stats are enabled, install the counters,
    and ping the core so that a userspace notification can be emitted.
    
    Similarly, as a netdevice loses a RIF, push the as-yet-unreported
    statistics to the core, so that they are not lost, and ping the core to
    emit userspace notification.
    Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8d0f7d3a
spectrum_router.c 292 KB