DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: "Zhao1, Wei" <wei.zhao1@intel.com>,
	Renata Saiakhova <Renata.Saiakhova@ekinops.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v3 3/4] drivers/net: Fix in i40e HW rings memory overlap
Date: Fri, 19 Jun 2020 17:56:17 +0100	[thread overview]
Message-ID: <24a569ec-b863-4cb6-6541-2da224bccc3e@intel.com> (raw)
In-Reply-To: <MWHPR11MB139100AC17CA51BD04F46DA5B78A0@MWHPR11MB1391.namprd11.prod.outlook.com>

On 6/1/2020 8:58 AM, Zhao1, Wei wrote:
> Hi, Renata Saiakhova
> 
>    I think this patch is very important, It seems all kind of NIC has memory leak problem that used for store
> Tx or rx descriptor. If that is true, memory point by rxq-> rx_ring/ txq-> tx_ring will never be freed even if dev_close? 
> Is my understanding right or wrong?

That is right as far as I understand, and yes we should free them in dev_close.
I think DPDK relies on that the memory will be freed on the process exit and
sometimes behaves lazy on the memory free as being this case.

> 
> If that is true, it seems you should also add in functioni40e_fdir_teardown(), because
> Tx_ring allocated in i40e_fdir_setup_tx_resources() also need freed, and memzones need to be delete.
> Is that so?
> 
> Thanks.
> 
> 
> 
>> -----Original Message-----
>> From: dev <dev-bounces@dpdk.org> On Behalf Of Renata Saiakhova
>> Sent: Wednesday, May 13, 2020 9:14 PM
>> To: dev@dpdk.org
>> Cc: Renata Saiakhova <Renata.Saiakhova@ekinops.com>
>> Subject: [dpdk-dev] [PATCH v3 3/4] drivers/net: Fix in i40e HW rings memory
>> overlap
>>
>> Delete memzones for HW rings in i40e while freeing queues
>>
>> Signed-off-by: Renata Saiakhova <Renata.Saiakhova@ekinops.com>
>> ---
>>  drivers/net/i40e/i40e_rxtx.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> 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
> 


  reply	other threads:[~2020-06-19 16:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 13:14 [dpdk-dev] [PATCH v3 0/4] Memory corruption due to HW rings allocation Renata Saiakhova
2020-05-13 13:14 ` [dpdk-dev] [PATCH v3 1/4] librte_ethdev: Introduce a function to release HW rings Renata Saiakhova
2020-05-14 13:14   ` Burakov, Anatoly
2020-05-15  8:04   ` Jeff Guo
2020-06-19 17:06     ` Ferruh Yigit
2020-05-13 13:14 ` [dpdk-dev] [PATCH v3 2/4] drivers/net: Fix in igb and ixgbe HW rings memory Renata Saiakhova
2020-05-13 13:14 ` [dpdk-dev] [PATCH v3 3/4] drivers/net: Fix in i40e HW rings memory overlap Renata Saiakhova
2020-06-01  7:58   ` Zhao1, Wei
2020-06-19 16:56     ` Ferruh Yigit [this message]
2020-06-20  3:02       ` Zhao1, Wei
2020-05-13 13:14 ` [dpdk-dev] [PATCH v3 4/4] drivers/net: Fix in em and ice " Renata Saiakhova
2020-05-13 15:22 ` [dpdk-dev] [PATCH v3 0/4] Memory corruption due to HW rings allocation Ferruh Yigit
2020-05-18  9:48   ` Renata Saiakhova
2020-06-03  1:36     ` Zhao1, Wei
2020-06-19 16:54       ` Ferruh Yigit
2020-06-19 16:54     ` Ferruh Yigit
2020-06-22  9:59       ` Renata Saiakhova
2020-06-20  3:27 ` Zhao1, Wei

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=24a569ec-b863-4cb6-6541-2da224bccc3e@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=Renata.Saiakhova@ekinops.com \
    --cc=dev@dpdk.org \
    --cc=wei.zhao1@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).