Skip to content

Commit a072310

Browse files
Huy NguyenSaeed Mahameed
authored andcommitted
net/mlx5: Add back multicast stats for uplink representor
The multicast counter got removed from uplink representor due to the cited patch. Fixes: 47c97e6 ("net/mlx5e: Fix multicast counter not up-to-date in "ip -s"") Signed-off-by: Huy Nguyen <[email protected]> Reviewed-by: Daniel Jurgens <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 87d77e5 commit a072310

File tree

1 file changed

+7
-0
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+7
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3846,10 +3846,17 @@ mlx5e_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats)
38463846
}
38473847

38483848
if (mlx5e_is_uplink_rep(priv)) {
3849+
struct mlx5e_vport_stats *vstats = &priv->stats.vport;
3850+
38493851
stats->rx_packets = PPORT_802_3_GET(pstats, a_frames_received_ok);
38503852
stats->rx_bytes = PPORT_802_3_GET(pstats, a_octets_received_ok);
38513853
stats->tx_packets = PPORT_802_3_GET(pstats, a_frames_transmitted_ok);
38523854
stats->tx_bytes = PPORT_802_3_GET(pstats, a_octets_transmitted_ok);
3855+
3856+
/* vport multicast also counts packets that are dropped due to steering
3857+
* or rx out of buffer
3858+
*/
3859+
stats->multicast = VPORT_COUNTER_GET(vstats, received_eth_multicast.packets);
38533860
} else {
38543861
mlx5e_fold_sw_stats64(priv, stats);
38553862
}

0 commit comments

Comments
 (0)