diff options
author | Aya Levin <ayal@nvidia.com> | 2021-02-28 17:40:18 +0100 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2021-03-10 20:01:52 +0100 |
commit | 354521eebd02db45168b9c8c3795078f90c327b7 (patch) | |
tree | 92422486664c4b7203e72f26559a5c5e675afcdc /drivers/net | |
parent | net/mlx5e: RX, Mind the MPWQE gaps when calculating offsets (diff) | |
download | linux-354521eebd02db45168b9c8c3795078f90c327b7.tar.xz linux-354521eebd02db45168b9c8c3795078f90c327b7.zip |
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/net')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 9 |
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 |