DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: dev@dpdk.org, stephen@networkplumber.org,
	david.marchand@redhat.com, maxime@leroys.fr
Cc: hemant.agrawal@nxp.com
Subject: [PATCH v3 3/4] net/dpaa2: fix queue free cleanup
Date: Thu, 13 Nov 2025 15:29:16 +0530	[thread overview]
Message-ID: <20251113095917.1973514-3-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <20251113095917.1973514-1-hemant.agrawal@nxp.com>

The RX error queue was not being free.
Also, set the free queues pointers to NULL.

Fixes: 407ce3e5384b ("net/dpaa2: replace global variables with flags")
Cc: hemant.agrawal@nxp.com

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index c94034104a..f82c50341d 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -669,11 +669,13 @@ dpaa2_free_rx_tx_queues(struct rte_eth_dev *dev)
 			dpaa2_clear_queue_active_dps(dpaa2_q);
 			dpaa2_queue_storage_free(dpaa2_q,
 				RTE_MAX_LCORE);
+			priv->rx_vq[i] = NULL;
 		}
 		/* cleanup tx queue cscn */
 		for (i = 0; i < priv->nb_tx_queues; i++) {
 			dpaa2_q = priv->tx_vq[i];
 			rte_free(dpaa2_q->cscn);
+			priv->tx_vq[i] = NULL;
 		}
 		if (priv->flags & DPAA2_TX_CONF_ENABLE) {
 			/* cleanup tx conf queue storage */
@@ -681,8 +683,14 @@ dpaa2_free_rx_tx_queues(struct rte_eth_dev *dev)
 				dpaa2_q = priv->tx_conf_vq[i];
 				dpaa2_queue_storage_free(dpaa2_q,
 					RTE_MAX_LCORE);
+				priv->tx_conf_vq[i] = NULL;
 			}
 		}
+		if (priv->flags & DPAAX_RX_ERROR_QUEUE_FLAG) {
+			dpaa2_q = priv->rx_err_vq;
+			dpaa2_queue_storage_free(dpaa2_q, RTE_MAX_LCORE);
+		}
+
 		/*free memory for all queues (RX+TX) */
 		rte_free(priv->rx_vq[0]);
 		priv->rx_vq[0] = NULL;
-- 
2.25.1


  parent reply	other threads:[~2025-11-13  9:59 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-06 16:38 [PATCH 1/3] net/dpaa2: fix duplicate calling of dpaa2 dev close Hemant Agrawal
2025-11-06 16:38 ` [PATCH 2/3] net/dpaa2: clear active VDQ state when freeing Rx queues Hemant Agrawal
2025-11-06 19:29   ` Stephen Hemminger
2025-11-07  9:51     ` Maxime Leroy
2025-11-07 10:38       ` Hemant Agrawal
2025-11-07  8:34   ` David Marchand
2025-11-06 16:38 ` [PATCH 3/3] bus/fslmc: add support for hotplug of dpni Hemant Agrawal
2025-11-07  8:32 ` [PATCH 1/3] net/dpaa2: fix duplicate calling of dpaa2 dev close David Marchand
2025-11-08 15:35   ` David Marchand
2025-11-12 23:06 ` Stephen Hemminger
2025-11-13  5:29 ` [PATCH v2 1/5] " Hemant Agrawal
2025-11-13  5:29   ` [PATCH v2 2/5] net/dpaa2: clear active VDQ state when freeing Rx queues Hemant Agrawal
2025-11-13  5:29   ` [PATCH v2 3/5] net/dpaa2: fix queue free cleanup Hemant Agrawal
2025-11-13  5:29   ` [PATCH v2 4/5] net/dpaa2: bifurcate close into close and deinit Hemant Agrawal
2025-11-13  9:48     ` Maxime Leroy
2025-11-13  9:49     ` Maxime Leroy
2025-11-13  9:55       ` Hemant Agrawal
2025-11-13  5:29   ` [PATCH v2 5/5] bus/fslmc: add support for hotplug of dpni Hemant Agrawal
2025-11-13  9:59   ` [PATCH v3 1/4] net/dpaa2: fix duplicate calling of dpaa2 dev close Hemant Agrawal
2025-11-13  9:59     ` [PATCH v3 2/4] net/dpaa2: clear active VDQ state when freeing Rx queues Hemant Agrawal
2025-11-13 11:27       ` Maxime Leroy
2025-11-13  9:59     ` Hemant Agrawal [this message]
2025-11-13  9:59     ` [PATCH v3 4/4] bus/fslmc: add support for hotplug of dpni Hemant Agrawal
2025-11-13 11:43     ` [PATCH v4 1/4] net/dpaa2: fix duplicate calling of dpaa2 dev close Hemant Agrawal
2025-11-13 11:43       ` [PATCH v4 2/4] net/dpaa2: clear active VDQ state when freeing Rx queues Hemant Agrawal
2025-11-13 11:43       ` [PATCH v4 3/4] net/dpaa2: fix queue free cleanup Hemant Agrawal
2025-11-13 11:43       ` [PATCH v4 4/4] bus/fslmc: add support for hotplug of dpni Hemant Agrawal

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=20251113095917.1973514-3-hemant.agrawal@nxp.com \
    --to=hemant.agrawal@nxp.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=maxime@leroys.fr \
    --cc=stephen@networkplumber.org \
    /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).