Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5b6345b authored by Ido Shamay's avatar Ido Shamay Committed by David S. Miller
Browse files

net/mlx4_en: User prio mapping gets corrupted when changing number of 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: default avatarIdo Shamay <idos@mellanox.com>
Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2eacc23c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1151,6 +1151,7 @@ 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);

	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);