From: Renata Saiakhova <Renata.Saiakhova@ekinops.com>
To: dev@dpdk.org
Cc: Renata Saiakhova <Renata.Saiakhova@ekinops.com>
Subject: [dpdk-dev] [PATCH v4 3/4] drivers/net: Fix in i40e HW rings memory overlap
Date: Mon, 22 Jun 2020 11:54:42 +0200 [thread overview]
Message-ID: <20200622095443.26136-4-Renata.Saiakhova@ekinops.com> (raw)
In-Reply-To: <20200622095443.26136-1-Renata.Saiakhova@ekinops.com>
Delete memzones for HW rings in i40e while freeing queues
Signed-off-by: Renata Saiakhova <Renata.Saiakhova@ekinops.com>
---
drivers/net/i40e/i40e_fdir.c | 3 +++
drivers/net/i40e/i40e_rxtx.c | 2 ++
2 files changed, 5 insertions(+)
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index d59399afe..3a82cafac 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -269,6 +269,7 @@ i40e_fdir_teardown(struct i40e_pf *pf)
{
struct i40e_hw *hw = I40E_PF_TO_HW(pf);
struct i40e_vsi *vsi;
+ struct rte_eth_dev *dev = pf->adapter->eth_dev;
vsi = pf->fdir.fdir_vsi;
if (!vsi)
@@ -280,8 +281,10 @@ i40e_fdir_teardown(struct i40e_pf *pf)
if (err)
PMD_DRV_LOG(DEBUG, "Failed to do FDIR RX switch off");
i40e_dev_rx_queue_release(pf->fdir.rxq);
+ rte_eth_dma_zone_free(dev, "fdir_rx_ring", pf->fdir.rxq->queue_id);
pf->fdir.rxq = NULL;
i40e_dev_tx_queue_release(pf->fdir.txq);
+ rte_eth_dma_zone_free(dev, "fdir_tx_ring", pf->fdir.txq->queue_id);
pf->fdir.txq = NULL;
i40e_vsi_release(vsi);
pf->fdir.fdir_vsi = NULL;
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 5e7c86ed8..99cec9b99 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2900,6 +2900,7 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
continue;
i40e_dev_rx_queue_release(dev->data->rx_queues[i]);
dev->data->rx_queues[i] = NULL;
+ rte_eth_dma_zone_free(dev, "rx_ring", i);
}
for (i = 0; i < dev->data->nb_tx_queues; i++) {
@@ -2907,6 +2908,7 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
continue;
i40e_dev_tx_queue_release(dev->data->tx_queues[i]);
dev->data->tx_queues[i] = NULL;
+ rte_eth_dma_zone_free(dev, "tx_ring", i);
}
}
--
2.17.2
next prev parent reply other threads:[~2020-06-22 9:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-22 9:54 [dpdk-dev] [PATCH v4 0/4] Memory corruption due to HW rings allocation Renata Saiakhova
2020-06-22 9:54 ` [dpdk-dev] [PATCH v4 1/4] librte_ethdev: Introduce a function to release HW rings Renata Saiakhova
2020-06-22 17:09 ` Ferruh Yigit
2020-06-23 9:11 ` Renata Saiakhova
2020-06-23 12:25 ` Ferruh Yigit
2020-06-22 17:13 ` Ferruh Yigit
2020-06-22 9:54 ` [dpdk-dev] [PATCH v4 2/4] drivers/net: Fix in igb and ixgbe HW rings memory Renata Saiakhova
2020-06-22 9:54 ` Renata Saiakhova [this message]
2020-06-22 9:54 ` [dpdk-dev] [PATCH v4 4/4] drivers/net: Fix in em and ice HW rings memory overlap Renata Saiakhova
2020-07-10 14:36 ` [dpdk-dev] [PATCH v5 1/2] ethdev: add function to release HW rings Ferruh Yigit
2020-07-10 14:36 ` [dpdk-dev] [PATCH v5 2/2] drivers/net: delete HW rings while freeing queues Ferruh Yigit
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=20200622095443.26136-4-Renata.Saiakhova@ekinops.com \
--to=renata.saiakhova@ekinops.com \
--cc=dev@dpdk.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).