]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Set initial default RX and TX ring numbers the same in combined mode.
authorMichael Chan <michael.chan@broadcom.com>
Wed, 17 Jan 2018 08:21:08 +0000 (03:21 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Jan 2018 19:48:26 +0000 (14:48 -0500)
commitf49f2d23d05f393cb5567ce160b9254051e7f3e3
treed3f9f51593e54def35fc34b5bbf3b29985decf44
parent16d14b618fae0e4a717c1e1f868ec5eac18791af
bnxt_en: Set initial default RX and TX ring numbers the same in combined mode.

In combined mode, the driver is currently not setting RX and TX ring
numbers the same when firmware can allocate more RX than TX or vice versa.
This will confuse the user as the ethtool convention assumes they are the
same in combined mode.  Fix it by adding bnxt_trim_dflt_sh_rings() to trim
RX and TX ring numbers to be the same as the completion ring number in
combined mode.

Note that if TCs are enabled and/or XDP is enabled, the number of TX rings
will not be the same as RX rings in combined mode.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c