diff options
author | Adi Nissim <adin@mellanox.com> | 2018-04-25 04:21:32 -0400 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2018-05-10 19:10:13 -0400 |
commit | 88d725bbb43cd63a40c8ef70dd373f1d38ead2e3 (patch) | |
tree | 59fb4fe83a4c93203cfc2bdbfee3b1696ca062fb | |
parent | 1ef903bf795be01c91c10c93a0f9d9d6f2f7921b (diff) |
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: 3b751a2a418a ("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>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c index 332bc56306bf..1352d13eedb3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | |||
@@ -2175,26 +2175,35 @@ int mlx5_eswitch_get_vport_stats(struct mlx5_eswitch *esw, | |||
2175 | memset(vf_stats, 0, sizeof(*vf_stats)); | 2175 | memset(vf_stats, 0, sizeof(*vf_stats)); |
2176 | vf_stats->rx_packets = | 2176 | vf_stats->rx_packets = |
2177 | MLX5_GET_CTR(out, received_eth_unicast.packets) + | 2177 | MLX5_GET_CTR(out, received_eth_unicast.packets) + |
2178 | MLX5_GET_CTR(out, received_ib_unicast.packets) + | ||
2178 | MLX5_GET_CTR(out, received_eth_multicast.packets) + | 2179 | MLX5_GET_CTR(out, received_eth_multicast.packets) + |
2180 | MLX5_GET_CTR(out, received_ib_multicast.packets) + | ||
2179 | MLX5_GET_CTR(out, received_eth_broadcast.packets); | 2181 | MLX5_GET_CTR(out, received_eth_broadcast.packets); |
2180 | 2182 | ||
2181 | vf_stats->rx_bytes = | 2183 | vf_stats->rx_bytes = |
2182 | MLX5_GET_CTR(out, received_eth_unicast.octets) + | 2184 | MLX5_GET_CTR(out, received_eth_unicast.octets) + |
2185 | MLX5_GET_CTR(out, received_ib_unicast.octets) + | ||
2183 | MLX5_GET_CTR(out, received_eth_multicast.octets) + | 2186 | MLX5_GET_CTR(out, received_eth_multicast.octets) + |
2187 | MLX5_GET_CTR(out, received_ib_multicast.octets) + | ||
2184 | MLX5_GET_CTR(out, received_eth_broadcast.octets); | 2188 | MLX5_GET_CTR(out, received_eth_broadcast.octets); |
2185 | 2189 | ||
2186 | vf_stats->tx_packets = | 2190 | vf_stats->tx_packets = |
2187 | MLX5_GET_CTR(out, transmitted_eth_unicast.packets) + | 2191 | MLX5_GET_CTR(out, transmitted_eth_unicast.packets) + |
2192 | MLX5_GET_CTR(out, transmitted_ib_unicast.packets) + | ||
2188 | MLX5_GET_CTR(out, transmitted_eth_multicast.packets) + | 2193 | MLX5_GET_CTR(out, transmitted_eth_multicast.packets) + |
2194 | MLX5_GET_CTR(out, transmitted_ib_multicast.packets) + | ||
2189 | MLX5_GET_CTR(out, transmitted_eth_broadcast.packets); | 2195 | MLX5_GET_CTR(out, transmitted_eth_broadcast.packets); |
2190 | 2196 | ||
2191 | vf_stats->tx_bytes = | 2197 | vf_stats->tx_bytes = |
2192 | MLX5_GET_CTR(out, transmitted_eth_unicast.octets) + | 2198 | MLX5_GET_CTR(out, transmitted_eth_unicast.octets) + |
2199 | MLX5_GET_CTR(out, transmitted_ib_unicast.octets) + | ||
2193 | MLX5_GET_CTR(out, transmitted_eth_multicast.octets) + | 2200 | MLX5_GET_CTR(out, transmitted_eth_multicast.octets) + |
2201 | MLX5_GET_CTR(out, transmitted_ib_multicast.octets) + | ||
2194 | MLX5_GET_CTR(out, transmitted_eth_broadcast.octets); | 2202 | MLX5_GET_CTR(out, transmitted_eth_broadcast.octets); |
2195 | 2203 | ||
2196 | vf_stats->multicast = | 2204 | vf_stats->multicast = |
2197 | MLX5_GET_CTR(out, received_eth_multicast.packets); | 2205 | MLX5_GET_CTR(out, received_eth_multicast.packets) + |
2206 | MLX5_GET_CTR(out, received_ib_multicast.packets); | ||
2198 | 2207 | ||
2199 | vf_stats->broadcast = | 2208 | vf_stats->broadcast = |
2200 | MLX5_GET_CTR(out, received_eth_broadcast.packets); | 2209 | MLX5_GET_CTR(out, received_eth_broadcast.packets); |