]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Improve preset max value for ethtool -l.
authorMichael Chan <michael.chan@broadcom.com>
Sun, 27 Sep 2020 17:42:20 +0000 (13:42 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 27 Sep 2020 20:35:46 +0000 (13:35 -0700)
commit0861a9754a57f34ad5470d7b35bd44506b68af1d
tree06741e7dbe89e8a080c4831342221d7b962e67b3
parentda9fc460d91bd3fe18d9915311c8cc77042cf2dc
bnxt_en: Improve preset max value for ethtool -l.

The current logic that calculates the preset maximum value for combined
channel does not take into account the rings used for XDP and mqprio
TCs.  Each of these features will reduce the number of TX rings.  Add
the logic to divide the TX rings accordingly based on whether the
device is currently in XDP mode and whether TCs are in use.

Reviewed-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c