From: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, ajit.khaparde@broadcom.com
Subject: [dpdk-dev] [PATCH 2/4] net/bnxt: handle ring cleanup in case of error
Date: Thu, 20 Jan 2022 14:42:26 +0530 [thread overview]
Message-ID: <20220120091228.7076-3-kalesh-anakkur.purayil@broadcom.com> (raw)
In-Reply-To: <20220120091228.7076-1-kalesh-anakkur.purayil@broadcom.com>
From: Kalesh AP <kalesh-anakkur.purayil@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: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@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
next prev parent reply other threads:[~2022-01-20 8:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 9:12 [dpdk-dev] [PATCH 0/4] bnxt fixes Kalesh A P
2022-01-20 9:12 ` [dpdk-dev] [PATCH 1/4] net/bnxt: fix check for autoneg enablement Kalesh A P
2022-01-20 9:12 ` Kalesh A P [this message]
2022-01-20 9:12 ` [dpdk-dev] [PATCH 3/4] net/bnxt: fix to alloc the memzone per VNIC Kalesh A P
2022-01-20 9:12 ` [dpdk-dev] [PATCH 4/4] net/bnxt: fix VF resource allocation strategy Kalesh A P
2022-01-25 5:00 ` [dpdk-dev] [PATCH 0/4] bnxt fixes Ajit Khaparde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220120091228.7076-3-kalesh-anakkur.purayil@broadcom.com \
--to=kalesh-anakkur.purayil@broadcom.com \
--cc=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).