OSDN Git Service

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)
commit370bad0f9a5261da0ef0bc76705f5b0b8af148ab
tree66e7a590ef3311fb3de3db9b13cab8388ebfe901
parent3df5b3c67546fb05266766b6abaf71563f82efe4
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 a5ea31f57309 '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