DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Hunt <david.hunt@intel.com>
To: Sarosh Arif <sarosh.arif@emumba.com>, l.wojciechow@partner.samsung.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [v3 PATCH] test_distributor: prevent memory leakages from the pool
Date: Fri, 25 Sep 2020 16:26:56 +0100	[thread overview]
Message-ID: <da6602d2-ec2f-78b9-66b4-f43842fc18b8@intel.com> (raw)
In-Reply-To: <20200908102204.727240-1-sarosh.arif@emumba.com>


On 8/9/2020 11:22 AM, Sarosh Arif wrote:
> rte_mempool_get_bulk is used to get bufs/many_bufs from the pool,
> but at some locations when test fails the bufs/many_bufs are
> not returned back to the pool.
> Due to this, multiple executions of distributor_autotest gives the
> following error message: Error getting mbufs from pool.
> To resolve this issue rte_mempool_put_bulk is used whenever the test
> fails and returns.
>
> Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
> ---
> v2:
> remove double freeing of mbufs
> v3:
> resubmit to run the tests again
> ---
> }

--snip--

Looks good to me. Even though I could not repeat the conditions to cause 
one of these errors, the additons make sense.

In my testing, I did add in several rte_mempool_avail_count() checks to 
see if there were leakages, and all the mempool counts were
stable, but that was due to the fixes in the patch set from Lukasz : 
http://patches.dpdk.org/project/dpdk/list/?series=12442

However, if there are situations where packets are not returned from 
workers, this should clean them up nicely before returning.

Reviewed-by: David Hunt <david.hunt@intel.com>





  parent reply	other threads:[~2020-09-25 15:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200413092039eucas1p1372014e18d014115634fc8eb23508004@eucas1p1.samsung.com>
2020-04-13  9:19 ` [dpdk-dev] [PATCH] test_distributor.c: " Sarosh Arif
2020-04-15  1:15   ` Lukasz Wojciechowski
2020-04-15  6:42   ` [dpdk-dev] [PATCH v2] app/test/test_distributor.c: " Sarosh Arif
2020-04-15  6:52     ` Lukasz Wojciechowski
2020-04-15  7:06       ` Sarosh Arif
2020-04-15  7:08         ` Lukasz Wojciechowski
     [not found]           ` <CABoZmYPV-GXESgjey7-g-j=cNif38O-SZ4L7TfrDTwb6KfDsog@mail.gmail.com>
     [not found]             ` <CABoZmYOhpYqV07Q4JguvSwJmAPzfhO-f8fMKUzsMoUdUGU5hjQ@mail.gmail.com>
2020-06-24 10:02               ` Sarosh Arif
2020-09-01 18:31                 ` Lukasz Wojciechowski
2020-09-08 10:22     ` [dpdk-dev] [v3 PATCH] test_distributor: " Sarosh Arif
2020-09-16 19:01       ` Lukasz Wojciechowski
2020-09-25 14:22       ` David Marchand
2020-09-25 15:31         ` David Hunt
2020-09-28  9:55         ` Sarosh Arif
2020-09-28 10:14           ` David Marchand
2020-09-25 15:26       ` David Hunt [this message]
2020-10-19  8:34         ` David Marchand

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=da6602d2-ec2f-78b9-66b4-f43842fc18b8@intel.com \
    --to=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=l.wojciechow@partner.samsung.com \
    --cc=sarosh.arif@emumba.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).