]> git.droids-corp.org - dpdk.git/commit
net/bnxt: fix ring calculation for representors
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Wed, 26 Jan 2022 18:13:26 +0000 (10:13 -0800)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Wed, 9 Feb 2022 17:37:22 +0000 (18:37 +0100)
commit59e62818877aa45c0066743470192c317670678c
tree78f831419a46bfdc1686568d37ec5525b0417029
parent5b9b3d590452cc4068418fa7dc8f3595422bdbda
net/bnxt: fix ring calculation for representors

Currently the Tx and Rx ring count for representors is fixed.
It does not consider the number of rings created for the parent
function. And that can cause issues not only during initialization
but while running traffic.
Instead check the number of rings created for the parent function
while configuring the ring resources for representors.
In some cases VF rep ring init may happen before the parent function's
rings have been setup. And this can cause representor ring count to be
configured as 0. In such cases, initialize the VF representor
ring count to 8.

Fixes: 322bd6e70272 ("net/bnxt: add port representor infrastructure")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
drivers/net/bnxt/bnxt.h
drivers/net/bnxt/bnxt_reps.c