summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAya Levin <ayal@nvidia.com>2021-02-28 19:40:18 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2021-03-10 22:01:52 +0300
commit354521eebd02db45168b9c8c3795078f90c327b7 (patch)
tree92422486664c4b7203e72f26559a5c5e675afcdc /drivers
parentd5dd03b26ba49c4ffe67ee1937add82293c19794 (diff)
downloadlinux-354521eebd02db45168b9c8c3795078f90c327b7.tar.xz
net/mlx5e: Accumulate port PTP TX stats with other channels stats
In addition to .get_ethtool_stats, add port PTP TX stats to .ndo_get_stats64. Fixes: 145e5637d941 ("net/mlx5e: Add TX PTP port object support") Signed-off-by: Aya Levin <ayal@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 831f5495ff39..9e2a30dc5e4f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3816,6 +3816,15 @@ void mlx5e_fold_sw_stats64(struct mlx5e_priv *priv, struct rtnl_link_stats64 *s)
s->tx_dropped += sq_stats->dropped;
}
}
+ if (priv->port_ptp_opened) {
+ for (i = 0; i < priv->max_opened_tc; i++) {
+ struct mlx5e_sq_stats *sq_stats = &priv->port_ptp_stats.sq[i];
+
+ s->tx_packets += sq_stats->packets;
+ s->tx_bytes += sq_stats->bytes;
+ s->tx_dropped += sq_stats->dropped;
+ }
+ }
}
void