]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Implement offload stats ndo and expose HW stats by default
authorNogah Frankel <nogahf@mellanox.com>
Fri, 16 Sep 2016 13:05:38 +0000 (15:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Sep 2016 02:33:42 +0000 (22:33 -0400)
commit731e42606fca4159568299a6147f1ed02de28e85
tree9ac04fd87ecd80fd0a46b03b48748ba06c8075d7
parent17e5a993a89a88ad4efd5a91d8a7f6e3c034deea
mlxsw: spectrum: Implement offload stats ndo and expose HW stats by default

Change the default statistics ndo to return HW statistics
(like the one returned by ethtool_ops).
The HW stats are collected to a cache by delayed work every 1 sec.
Implement the offload stat ndo.
Add a function to get SW statistics, to be called from this function.

Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h