]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Support HW (offloaded) and SW counters for SRIOV switchdev mode
authorOr Gerlitz <ogerlitz@mellanox.com>
Tue, 22 Nov 2016 21:09:55 +0000 (23:09 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Nov 2016 21:01:14 +0000 (16:01 -0500)
commit85483e59cc7a84c8a902f09a60438686e3bab5ed
tree66e7a590ef3311fb3de3db9b13cab8388ebfe901
parent7c7fa9255786f0cc00bad9b6b2bf2cef5a72609c
net/mlx5e: Support HW (offloaded) and SW counters for SRIOV switchdev mode

Switchdev driver net-device port statistics should follow the model introduced
in commit aa56e0a482ad 'Merge branch net-offloaded-stats'.

For VF reps we return the SRIOV eswitch vport stats as the usual ones and SW stats
if asked. For the PF, if we're in the switchdev mode, we return the uplink stats
and SW stats if asked, otherwise as before. The uplink stats are implemented using
the PPCNT 802_3 counters which are already being read/cached by the driver.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.h