Skip to content

Commit

Permalink
net/mlx4_en: User prio mapping gets corrupted when changing number of…
Browse files Browse the repository at this point in the history
… channels

When using ethtool set_channels, mlx4_en_setup_tc is always called, even
when it was not configured. Fixed code to call mlx4_en_setup_tc() only
if needed.

Signed-off-by: Ido Shamay <idos@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ido Shamay authored and David S. Miller committed May 14, 2014
1 parent 2eacc23 commit f5b6345
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,8 @@ static int mlx4_en_set_channels(struct net_device *dev,
netif_set_real_num_tx_queues(dev, priv->tx_ring_num);
netif_set_real_num_rx_queues(dev, priv->rx_ring_num);

mlx4_en_setup_tc(dev, MLX4_EN_NUM_UP);
if (dev->num_tc)
mlx4_en_setup_tc(dev, MLX4_EN_NUM_UP);

en_warn(priv, "Using %d TX rings\n", priv->tx_ring_num);
en_warn(priv, "Using %d RX rings\n", priv->rx_ring_num);
Expand Down

0 comments on commit f5b6345

Please sign in to comment.