OSDN Git Service

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)
commit58ea801ac4c166cdcaa399ce7f9b3e9095ff2842
treed3f9f51593e54def35fc34b5bbf3b29985decf44
parentbe0dd9c4100c9549fe50258e3d928072e6c31590
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