summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
diff options
context:
space:
mode:
authorGal Pressman2016-09-07 18:08:00 +0200
committerDavid S. Miller2016-09-09 01:15:29 +0200
commit4e39883d9c7426f8246ef86a32dc6a6f06f5aace (patch)
tree4f45ec8d0dd0c7e973736be476c1f21c555159bd /drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
parentnet/mlx5e: Prevent casting overflow (diff)
downloadkernel-qcow2-linux-4e39883d9c7426f8246ef86a32dc6a6f06f5aace.tar.gz
kernel-qcow2-linux-4e39883d9c7426f8246ef86a32dc6a6f06f5aace.tar.xz
kernel-qcow2-linux-4e39883d9c7426f8246ef86a32dc6a6f06f5aace.zip
net/mlx5e: Fix global PFC counters replication
Currently when reading global PFC statistics we left the counter iterator out of the equation and we ended up reading the same counter over and over again. Instead of reading the counter at index 0 on every iteration we now read the counter at index (i). Fixes: e989d5a532ce ('net/mlx5e: Expose flow control counters to ethtool') Signed-off-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index 98e1a4a44268..7a346bb2ed00 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -331,7 +331,7 @@ static void mlx5e_get_ethtool_stats(struct net_device *dev,
if (mlx5e_query_global_pause_combined(priv)) {
for (i = 0; i < NUM_PPORT_PER_PRIO_PFC_COUNTERS; i++) {
data[idx++] = MLX5E_READ_CTR64_BE(&priv->stats.pport.per_prio_counters[0],
- pport_per_prio_pfc_stats_desc, 0);
+ pport_per_prio_pfc_stats_desc, i);
}
}