From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Huy Nguyen <huyn@nvidia.com>,
Daniel Jurgens <danielj@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>
Subject: [net 1/6] net/mlx5: Add back multicast stats for uplink representor
Date: Mon, 22 Mar 2021 13:25:19 -0700 [thread overview]
Message-ID: <20210322202524.68886-2-saeed@kernel.org> (raw)
In-Reply-To: <20210322202524.68886-1-saeed@kernel.org>
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(+)
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);
}
--
2.30.2
next prev parent reply other threads:[~2021-03-22 20:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-22 20:25 [pull request][net 0/6] mlx5 fixes 2021-03-22 Saeed Mahameed
2021-03-22 20:25 ` Saeed Mahameed [this message]
2021-03-23 0:30 ` [net 1/6] net/mlx5: Add back multicast stats for uplink representor patchwork-bot+netdevbpf
2021-03-22 20:25 ` [net 2/6] net/mlx5e: Allow to match on MPLS parameters only for MPLS over UDP Saeed Mahameed
2021-03-22 20:25 ` [net 3/6] net/mlx5e: Offload tuple rewrite for non-CT flows Saeed Mahameed
2021-03-22 20:25 ` [net 4/6] net/mlx5e: Fix error path for ethtool set-priv-flag Saeed Mahameed
2021-03-22 20:25 ` [net 5/6] net/mlx5e: Fix division by 0 in mlx5e_select_queue Saeed Mahameed
2021-03-22 20:25 ` [net 6/6] net/mlx5: SF, do not use ecpu bit for vhca state processing Saeed Mahameed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210322202524.68886-2-saeed@kernel.org \
--to=saeed@kernel.org \
--cc=danielj@nvidia.com \
--cc=davem@davemloft.net \
--cc=huyn@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).