net/mlx4_en: Fix wrong limitation for number of TX rings
authorTariq Toukan <tariqt@mellanox.com>
Mon, 18 Nov 2019 09:41:04 +0000 (11:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Dec 2019 08:16:05 +0000 (09:16 +0100)
commitebcb0840a76b19c5cdf4fc58d71f02e771cafd1c
treee9f48a464f99561b0fad996d2d33686f54d52d3d
parent5408138df1dbe85f3986b2756ca998bcdd94d3a7
net/mlx4_en: Fix wrong limitation for number of TX rings

[ Upstream commit 2744bf42680f64ebf2ee8a00354897857c073331 ]

XDP_TX rings should not be limited by max_num_tx_rings_p_up.
To make sure total number of TX rings never exceed MAX_TX_RINGS,
add similar check in mlx4_en_alloc_tx_queue_per_tc(), where
a new value is assigned for num_up.

Fixes: 7e1dc5e926d5 ("net/mlx4_en: Limit the number of TX rings")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
drivers/net/ethernet/mellanox/mlx4/en_netdev.c