bnxt_en: Fix ethtool -l pre-set max combined channel.
With commitd1e7925e6d
("bnxt_en: Centralize logic to reserve rings."), ring allocation for combined rings has become stricter. A combined ring must now have an rx-tx ring pair. The pre-set max. for combined rings should now be min(rx, tx). Fixes:d1e7925e6d
("bnxt_en: Centralize logic to reserve rings.") Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
cb4d1d6261
commit
a79a5276aa
|
@ -357,7 +357,7 @@ static void bnxt_get_channels(struct net_device *dev,
|
||||||
int max_rx_rings, max_tx_rings, tcs;
|
int max_rx_rings, max_tx_rings, tcs;
|
||||||
|
|
||||||
bnxt_get_max_rings(bp, &max_rx_rings, &max_tx_rings, true);
|
bnxt_get_max_rings(bp, &max_rx_rings, &max_tx_rings, true);
|
||||||
channel->max_combined = max_t(int, max_rx_rings, max_tx_rings);
|
channel->max_combined = min_t(int, max_rx_rings, max_tx_rings);
|
||||||
|
|
||||||
if (bnxt_get_max_rings(bp, &max_rx_rings, &max_tx_rings, false)) {
|
if (bnxt_get_max_rings(bp, &max_rx_rings, &max_tx_rings, false)) {
|
||||||
max_rx_rings = 0;
|
max_rx_rings = 0;
|
||||||
|
|
Loading…
Reference in New Issue