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: [email protected]

Signed-off-by: Hemant Agrawal <[email protected]>
---
 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 3c3a1508fc..cf53ddf639 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -670,11 +670,13 @@ dpaa2_free_rx_tx_queues(struct rte_eth_dev *dev)
                                                RTE_MAX_LCORE);
                        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 */
@@ -682,8 +684,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

Reply via email to