diff mbox series

[net,1/6] net/mlx5: Add back multicast stats for uplink representor

Message ID 20210322202524.68886-2-saeed@kernel.org
State New
Headers show
Series mlx5 fixes 2021-03-22 | expand

Commit Message

Saeed Mahameed March 22, 2021, 8:25 p.m. UTC
From: Huy Nguyen <huyn@nvidia.com>

The multicast counter got removed from uplink representor due to the
cited patch.

Fixes: 47c97e6b10a1 ("net/mlx5e: Fix multicast counter not up-to-date in "ip -s"")
Signed-off-by: Huy Nguyen <huyn@nvidia.com>
Reviewed-by: Daniel Jurgens <danielj@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

patchwork-bot+netdevbpf@kernel.org March 23, 2021, 12:30 a.m. UTC | #1
Hello:

This series was applied to netdev/net.git (refs/heads/master):

On Mon, 22 Mar 2021 13:25:19 -0700 you wrote:
> From: Huy Nguyen <huyn@nvidia.com>

> 

> The multicast counter got removed from uplink representor due to the

> cited patch.

> 

> Fixes: 47c97e6b10a1 ("net/mlx5e: Fix multicast counter not up-to-date in "ip -s"")

> Signed-off-by: Huy Nguyen <huyn@nvidia.com>

> Reviewed-by: Daniel Jurgens <danielj@nvidia.com>

> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>

> 

> [...]


Here is the summary with links:
  - [net,1/6] net/mlx5: Add back multicast stats for uplink representor
    https://git.kernel.org/netdev/net/c/a07231084da2
  - [net,2/6] net/mlx5e: Allow to match on MPLS parameters only for MPLS over UDP
    https://git.kernel.org/netdev/net/c/7d6c86e3ccb5
  - [net,3/6] net/mlx5e: Offload tuple rewrite for non-CT flows
    https://git.kernel.org/netdev/net/c/96b5b4585843
  - [net,4/6] net/mlx5e: Fix error path for ethtool set-priv-flag
    https://git.kernel.org/netdev/net/c/4eacfe72e3e0
  - [net,5/6] net/mlx5e: Fix division by 0 in mlx5e_select_queue
    https://git.kernel.org/netdev/net/c/846d6da1fcdb
  - [net,6/6] net/mlx5: SF, do not use ecpu bit for vhca state processing
    https://git.kernel.org/netdev/net/c/7c1ef1959b6f

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 33b418796e43..c8b8249846a9 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3846,10 +3846,17 @@  mlx5e_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats)
 	}
 
 	if (mlx5e_is_uplink_rep(priv)) {
+		struct mlx5e_vport_stats *vstats = &priv->stats.vport;
+
 		stats->rx_packets = PPORT_802_3_GET(pstats, a_frames_received_ok);
 		stats->rx_bytes   = PPORT_802_3_GET(pstats, a_octets_received_ok);
 		stats->tx_packets = PPORT_802_3_GET(pstats, a_frames_transmitted_ok);
 		stats->tx_bytes   = PPORT_802_3_GET(pstats, a_octets_transmitted_ok);
+
+		/* vport multicast also counts packets that are dropped due to steering
+		 * or rx out of buffer
+		 */
+		stats->multicast = VPORT_COUNTER_GET(vstats, received_eth_multicast.packets);
 	} else {
 		mlx5e_fold_sw_stats64(priv, stats);
 	}