DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Subject: [PATCH 1/7] net/bnxt: avoid seg fault in Tx queue release
Date: Thu,  8 Feb 2024 09:13:24 -0800	[thread overview]
Message-ID: <20240208171330.31139-2-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20240208171330.31139-1-ajit.khaparde@broadcom.com>

[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]

From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

The tx queue mutex should be freed before the tx queue structure and
similarly the completion ring stats should be reset before ring free.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_txq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index f99ad211db..7d91e88c9d 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -104,12 +104,12 @@ void bnxt_tx_queue_release_op(struct rte_eth_dev *dev, uint16_t queue_idx)
 
 		/* Free TX completion ring hardware descriptors */
 		if (txq->cp_ring) {
+			bnxt_free_txq_stats(txq);
 			bnxt_free_ring(txq->cp_ring->cp_ring_struct);
 			rte_free(txq->cp_ring->cp_ring_struct);
 			rte_free(txq->cp_ring);
 		}
 
-		bnxt_free_txq_stats(txq);
 		rte_memzone_free(txq->mz);
 		txq->mz = NULL;
 
-- 
2.39.2 (Apple Git-143)


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]

  reply	other threads:[~2024-02-08 17:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08 17:13 [PATCH 0/7] bnxt bug fixes Ajit Khaparde
2024-02-08 17:13 ` Ajit Khaparde [this message]
2024-02-08 17:13 ` [PATCH 2/7] net/bnxt: modify locking for representor Tx Ajit Khaparde
2024-02-08 17:13 ` [PATCH 3/7] net/bnxt: refactor VNIC context cleanup Ajit Khaparde
2024-02-08 17:13 ` [PATCH 4/7] net/bnxt: cleanup vnic ref count Ajit Khaparde
2024-02-08 17:13 ` [PATCH 5/7] net/bnxt: adjust session name on multi host system Ajit Khaparde
2024-02-08 17:13 ` [PATCH 6/7] net/bnxt: update consumer index of NQ regularly Ajit Khaparde
2024-02-08 17:13 ` [PATCH 7/7] net/bnxt: update RSS algorithm capability Ajit Khaparde
2024-02-08 21:50 ` [PATCH 0/7] bnxt bug fixes Ajit Khaparde
2024-02-22  2:50   ` Patrick Robb
2024-02-22  3:20     ` 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=20240208171330.31139-2-ajit.khaparde@broadcom.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=kishore.padmanabha@broadcom.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).