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)
commitfc1bbb0f1831cc22326c86fb21d88cca44999b3e
tree9ac04fd87ecd80fd0a46b03b48748ba06c8075d7
parent69ae6ad2ff37911903a90256e216d7e7ae460002
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