net/bnxt: fix max rings calculation
authorSomnath Kotur <somnath.kotur@broadcom.com>
Thu, 16 Jan 2020 13:04:55 +0000 (18:34 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 5 Feb 2020 08:51:19 +0000 (09:51 +0100)
commit93eb13bcb6baf5146798c23ef071ab2ae2489a4f
tree3853ae021d7329b0140926d3a1d8e9763a415898
parent47840e2ff8711375850341a240bcd6cde062d9cf
net/bnxt: fix max rings calculation

Max Tx rings count could be lesser than max Rx rings in some
cases, so take this into account as well.

Account for stat contexts available(one for each ring) along with
no: of completion rings(one for each ring) to cap the max no: of
Tx /Rx rings that can be possibly created.

Fixes: f03e66cb64ce ("net/bnxt: limit queue count for NS3/Stingray devices")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt.h