diff options
author | Inbar Karmy <inbark@mellanox.com> | 2017-10-10 12:28:33 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-10 13:11:22 -0700 |
commit | 7e1dc5e926d57a5bc4ac97d6e061e2fe29c266c0 (patch) | |
tree | 89ce19229a6e0ec086895058cabf69841249dee0 /drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | |
parent | 59d43876719ac46902b2a0f98217b430156d0d37 (diff) |
net/mlx4_en: Limit the number of TX rings
Limit the number of TX rings per UP by the number of cores
in the system.
Signed-off-by: Inbar Karmy <inbark@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c index 3d4e4a5d00d1..e9432bc1c1bc 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c @@ -1748,7 +1748,7 @@ static void mlx4_en_get_channels(struct net_device *dev, struct mlx4_en_priv *priv = netdev_priv(dev); channel->max_rx = MAX_RX_RINGS; - channel->max_tx = MLX4_EN_MAX_TX_RING_P_UP; + channel->max_tx = priv->mdev->profile.max_num_tx_rings_p_up; channel->rx_count = priv->rx_ring_num; channel->tx_count = priv->tx_ring_num[TX] / @@ -1777,7 +1777,7 @@ static int mlx4_en_set_channels(struct net_device *dev, mutex_lock(&mdev->state_lock); xdp_count = priv->tx_ring_num[TX_XDP] ? channel->rx_count : 0; if (channel->tx_count * priv->prof->num_up + xdp_count > - MAX_TX_RINGS) { + priv->mdev->profile.max_num_tx_rings_p_up * priv->prof->num_up) { err = -EINVAL; en_err(priv, "Total number of TX and XDP rings (%d) exceeds the maximum supported (%d)\n", |