From: Kalesh AP <kalesh-anakkur.pura...@broadcom.com> In bnxt_alloc_mem(), after bnxt_alloc_async_ring_struct(), any of the functions failure causes an error:
bnxt_hwrm_ring_free(): hwrm_ring_free nq failed. rc:1 Fix this by initializing ring->fw_ring_id to INVALID_HW_RING_ID in bnxt_alloc_async_ring_struct(). Fixes: bd0a14c99f65 ("net/bnxt: use dedicated CPR for async events") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP <kalesh-anakkur.pura...@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khapa...@broadcom.com> Reviewed-by: Somnath Kotur <somnath.ko...@broadcom.com> --- drivers/net/bnxt/bnxt_ring.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c index dc437f3..5c6c27f 100644 --- a/drivers/net/bnxt/bnxt_ring.c +++ b/drivers/net/bnxt/bnxt_ring.c @@ -851,6 +851,7 @@ int bnxt_alloc_async_ring_struct(struct bnxt *bp) ring->ring_mask = ring->ring_size - 1; ring->vmem_size = 0; ring->vmem = NULL; + ring->fw_ring_id = INVALID_HW_RING_ID; bp->async_cp_ring = cpr; cpr->cp_ring_struct = ring; -- 2.10.1