mirror of
https://github.com/torvalds/linux.git
synced 2024-12-21 10:31:54 +00:00
net/mlx5: E-Switch, Include VF RDMA stats in vport statistics
The host side reporting of VF vport statistics didn't include the VF
RDMA traffic.
Fixes: 3b751a2a41
("net/mlx5: E-Switch, Introduce get vf statistics")
Signed-off-by: Adi Nissim <adin@mellanox.com>
Reported-by: Ariel Almog <ariela@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
parent
1ef903bf79
commit
88d725bbb4
@ -2175,26 +2175,35 @@ int mlx5_eswitch_get_vport_stats(struct mlx5_eswitch *esw,
|
||||
memset(vf_stats, 0, sizeof(*vf_stats));
|
||||
vf_stats->rx_packets =
|
||||
MLX5_GET_CTR(out, received_eth_unicast.packets) +
|
||||
MLX5_GET_CTR(out, received_ib_unicast.packets) +
|
||||
MLX5_GET_CTR(out, received_eth_multicast.packets) +
|
||||
MLX5_GET_CTR(out, received_ib_multicast.packets) +
|
||||
MLX5_GET_CTR(out, received_eth_broadcast.packets);
|
||||
|
||||
vf_stats->rx_bytes =
|
||||
MLX5_GET_CTR(out, received_eth_unicast.octets) +
|
||||
MLX5_GET_CTR(out, received_ib_unicast.octets) +
|
||||
MLX5_GET_CTR(out, received_eth_multicast.octets) +
|
||||
MLX5_GET_CTR(out, received_ib_multicast.octets) +
|
||||
MLX5_GET_CTR(out, received_eth_broadcast.octets);
|
||||
|
||||
vf_stats->tx_packets =
|
||||
MLX5_GET_CTR(out, transmitted_eth_unicast.packets) +
|
||||
MLX5_GET_CTR(out, transmitted_ib_unicast.packets) +
|
||||
MLX5_GET_CTR(out, transmitted_eth_multicast.packets) +
|
||||
MLX5_GET_CTR(out, transmitted_ib_multicast.packets) +
|
||||
MLX5_GET_CTR(out, transmitted_eth_broadcast.packets);
|
||||
|
||||
vf_stats->tx_bytes =
|
||||
MLX5_GET_CTR(out, transmitted_eth_unicast.octets) +
|
||||
MLX5_GET_CTR(out, transmitted_ib_unicast.octets) +
|
||||
MLX5_GET_CTR(out, transmitted_eth_multicast.octets) +
|
||||
MLX5_GET_CTR(out, transmitted_ib_multicast.octets) +
|
||||
MLX5_GET_CTR(out, transmitted_eth_broadcast.octets);
|
||||
|
||||
vf_stats->multicast =
|
||||
MLX5_GET_CTR(out, received_eth_multicast.packets);
|
||||
MLX5_GET_CTR(out, received_eth_multicast.packets) +
|
||||
MLX5_GET_CTR(out, received_ib_multicast.packets);
|
||||
|
||||
vf_stats->broadcast =
|
||||
MLX5_GET_CTR(out, received_eth_broadcast.packets);
|
||||
|
Loading…
Reference in New Issue
Block a user