net/bnxt: fix ring allocation and free
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Thu, 24 Jun 2021 20:47:08 +0000 (13:47 -0700)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Thu, 8 Jul 2021 03:55:56 +0000 (05:55 +0200)
commitb3fa83945a367125f6e1b66cd330b8b683d0b4a3
treedc8c91d5a287d72212de5f5670742accb5e94e39
parent0105ea1296c91d9c2ff4ba5a13992566d7c3fc84
net/bnxt: fix ring allocation and free

Fix handling of ring alloc and free logic to fix check for invalid ring and
context IDs. This also avoids code duplication.

Fixes: 6133f207970c ("net/bnxt: add Rx queue create/destroy")
Fixes: 51c87ebafc7d ("net/bnxt: add Tx queue create/destroy")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
drivers/net/bnxt/bnxt_hwrm.c
drivers/net/bnxt/bnxt_ring.c