DPDK patches and discussions
 help / color / mirror / Atom feed
From: Sarosh Arif <sarosh.arif@emumba.com>
To: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>,
	david.hunt@intel.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] app/test/test_distributor.c: prevent memory leakages from the pool
Date: Wed, 24 Jun 2020 15:02:17 +0500
Message-ID: <CABoZmYN5D5MMNxkcD97DwB+u3N3evS4VZHz0QRf_t=mEk_q+LA@mail.gmail.com> (raw)
In-Reply-To: <CABoZmYOhpYqV07Q4JguvSwJmAPzfhO-f8fMKUzsMoUdUGU5hjQ@mail.gmail.com>

Some tests are failing on this patch but I don't think the reason
behind the failure is this patch. Is there a certain way to know that
the problem is in the patch or somewhere else?


On Wed, Jun 24, 2020 at 2:04 PM Sarosh Arif <sarosh.arif@emumba.com> wrote:
>
> Some tests are failing on this patch but I don't think the reason behind the failure is this patch. Is there a certain way to know that the problem is in the patch or somewhere else?
>
> On Wed, Apr 15, 2020 at 12:20 PM Sarosh Arif <sarosh.arif@emumba.com> wrote:
>>
>> Sure, will do that.
>>
>> On Wed, Apr 15, 2020 at 12:08 PM Lukasz Wojciechowski <l.wojciechow@partner.samsung.com> wrote:
>>>
>>>
>>> W dniu 15.04.2020 o 09:06, Sarosh Arif pisze:
>>>
>>> Yes, I plan to work on them when I get time.
>>>
>>> Great, please add me to CC. I would be glad to review it.
>>>
>>>
>>> On Wed, Apr 15, 2020 at 11:52 AM Lukasz Wojciechowski <l.wojciechow@partner.samsung.com> wrote:
>>>>
>>>>
>>>> W dniu 15.04.2020 o 08:42, Sarosh Arif pisze:
>>>> > v2:
>>>> > remove double freeing of mbufs
>>>> >
>>>> > Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
>>>> > ---
>>>> >   app/test/test_distributor.c | 9 +++++++
>>>> >   1 file changed, 7 insertions(+)
>>>> >
>>>> > diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
>>>> > index ba1f81cf8..5e972bb2e 100644
>>>> > --- a/app/test/test_distributor.c
>>>> > +++ b/app/test/test_distributor.c
>>>> > @@ -128,6 +128,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
>>>> >               printf("Line %d: Error, not all packets flushed. "
>>>> >                               "Expected %u, got %u\n",
>>>> >                               __LINE__, BURST, total_packet_count());
>>>> > +             rte_mempool_put_bulk(p, (void *)bufs, BURST);
>>>> >               return -1;
>>>> >       }
>>>> >
>>>> > @@ -153,6 +154,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
>>>> >                       printf("Line %d: Error, not all packets flushed. "
>>>> >                                       "Expected %u, got %u\n",
>>>> >                                       __LINE__, BURST, total_packet_count());
>>>> > +                     rte_mempool_put_bulk(p, (void *)bufs, BURST);
>>>> >                       return -1;
>>>> >               }
>>>> >
>>>> > @@ -179,6 +181,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
>>>> >               printf("Line %d: Error, not all packets flushed. "
>>>> >                               "Expected %u, got %u\n",
>>>> >                               __LINE__, BURST, total_packet_count());
>>>> > +             rte_mempool_put_bulk(p, (void *)bufs, BURST);
>>>> >               return -1;
>>>> >       }
>>>> >
>>>> > @@ -233,6 +236,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
>>>> >       if (num_returned != BIG_BATCH) {
>>>> >               printf("line %d: Missing packets, expected %d\n",
>>>> >                               __LINE__, num_returned);
>>>> > +             rte_mempool_put_bulk(p, (void *)many_bufs, BIG_BATCH);
>>>> >               return -1;
>>>> >       }
>>>> >
>>>> > @@ -247,6 +251,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
>>>> >
>>>> >               if (j == BIG_BATCH) {
>>>> >                       printf("Error: could not find source packet #%u\n", i);
>>>> > +                     rte_mempool_put_bulk(p, (void *)many_bufs, BIG_BATCH);
>>>> >                       return -1;
>>>> >               }
>>>> >       }
>>>> >
>>>> > 2.17.1
>>>> >
>>>> The sanity_test is ok now and does not have any mempool leaks.
>>>>
>>>> What about other tests in this file: Do you plan to work on them also?
>>>>
>>>> --
>>>>
>>>> Lukasz Wojciechowski
>>>> Principal Software Engineer
>>>>
>>>> Samsung R&D Institute Poland
>>>> Samsung Electronics
>>>> Office +48 22 377 88 25
>>>> l.wojciechow@partner.samsung.com
>>>>
>>> --
>>>
>>> Lukasz Wojciechowski
>>> Principal Software Engineer
>>>
>>> Samsung R&D Institute Poland
>>> Samsung Electronics
>>> Office +48 22 377 88 25
>>> l.wojciechow@partner.samsung.com
>>>
>>>
>>>
>>>

  parent reply	other threads:[~2020-06-24 10:02 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 [this message]
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
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='CABoZmYN5D5MMNxkcD97DwB+u3N3evS4VZHz0QRf_t=mEk_q+LA@mail.gmail.com' \
    --to=sarosh.arif@emumba.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=l.wojciechow@partner.samsung.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git