diff options
author | Or Gerlitz <ogerlitz@mellanox.com> | 2016-11-23 00:09:55 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-25 00:01:14 +0300 |
commit | 370bad0f9a5261da0ef0bc76705f5b0b8af148ab (patch) | |
tree | 66e7a590ef3311fb3de3db9b13cab8388ebfe901 /drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | |
parent | 3df5b3c67546fb05266766b6abaf71563f82efe4 (diff) | |
download | linux-370bad0f9a5261da0ef0bc76705f5b0b8af148ab.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_stats.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h index 5da6a1c0de14..f202f872f57f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h @@ -407,6 +407,7 @@ struct mlx5e_stats { struct mlx5e_vport_stats vport; struct mlx5e_pport_stats pport; struct mlx5e_pcie_stats pcie; + struct rtnl_link_stats64 vf_vport; }; static const struct counter_desc mlx5e_pme_status_desc[] = { |