]> 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)
commit6d2d619165b1c1bfdacd6bd1dadb222a66388b1d
tree66e7a590ef3311fb3de3db9b13cab8388ebfe901
parentdfee51b869c501ecadd42a648551b2ea6c3cdc68
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 dc7f64a146f1 '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