diff options
author | Eran Ben Elisha <eranbe@mellanox.com> | 2015-03-30 17:45:24 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-31 23:36:50 +0300 |
commit | 3da8a36cc5c2a172bb42f8dc89638f5b41d7d7a6 (patch) | |
tree | dd68732106614f7711cb3f72e886a2d0c3b5d10b /drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | |
parent | 6fcd27354b36fb9234aabeecde337b40d5a16842 (diff) | |
download | linux-3da8a36cc5c2a172bb42f8dc89638f5b41d7d7a6.tar.xz |
net/mlx4_en: Protect access to the statistics bitmap
This will allow parallel access to the statistics bitmap.
A pre-step for adding PFC counters, where the statistics bitmap
can be dynamically changed when modifying the PFC setting.
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c index 1a29329d52c6..3e7ed39e8e76 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c @@ -263,7 +263,7 @@ static int mlx4_en_get_sset_count(struct net_device *dev, int sset) struct mlx4_en_priv *priv = netdev_priv(dev); struct bitmap_iterator it; - bitmap_iterator_init(&it, priv->stats_bitmap, NUM_ALL_STATS); + bitmap_iterator_init(&it, priv->stats_bitmap.bitmap, NUM_ALL_STATS); switch (sset) { case ETH_SS_STATS: @@ -292,7 +292,7 @@ static void mlx4_en_get_ethtool_stats(struct net_device *dev, int i; struct bitmap_iterator it; - bitmap_iterator_init(&it, priv->stats_bitmap, NUM_ALL_STATS); + bitmap_iterator_init(&it, priv->stats_bitmap.bitmap, NUM_ALL_STATS); spin_lock_bh(&priv->stats_lock); @@ -339,7 +339,7 @@ static void mlx4_en_get_strings(struct net_device *dev, int i, strings = 0; struct bitmap_iterator it; - bitmap_iterator_init(&it, priv->stats_bitmap, NUM_ALL_STATS); + bitmap_iterator_init(&it, priv->stats_bitmap.bitmap, NUM_ALL_STATS); switch (stringset) { case ETH_SS_TEST: |