From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F036CA0350; Wed, 24 Jun 2020 12:02:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8B5EA1D8F5; Wed, 24 Jun 2020 12:02:30 +0200 (CEST) Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by dpdk.org (Postfix) with ESMTP id 103F71D8D9 for ; Wed, 24 Jun 2020 12:02:29 +0200 (CEST) Received: by mail-il1-f194.google.com with SMTP id t85so1509386ili.5 for ; Wed, 24 Jun 2020 03:02:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emumba-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ODhBHrfbrYM3Cyqzz7x9EHfF40Y2VsLrFsd6CTkmpqU=; b=RsrDBzk1+7j5UcC3BsDO8I1fo1hAOlKuAzo7EkhMwf1siMAUlDk9HSj6x04jqiV75Y SP0f/4zXws4uYHiHU+D8KxnY1W5z5+u9vfDNJrd4RElRQwvFe2HbbM0cmXcWqtlerh0E bXDTykJ/k/4KMO4EgwjnmHXJND1vfTuen5dBuXQOxY1i+o8rPho3/6myFbbnJWcb06/H 9Bx96t83WTupE7irB8jbAPVgPQ/nbrKvt7UvTaMtYxWx9Qs9ftPoBUKnbt+1FQWMwazx AEmbAuYKiBpm+HUTlD2Nqvtl3jCFQWSmGsW2d2JgcfOXqRtOokGTYzqFkyjfO5sPH/EV BoFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ODhBHrfbrYM3Cyqzz7x9EHfF40Y2VsLrFsd6CTkmpqU=; b=htuo/eNjryj7Ue3v6EfjBLgXtbE21C/onY1uHncgfRaOmvXU9cHyYoMYjRDBkIkqBo o0o0oCCRE0OrUmCe8fFLdYqPdUcjlBZmJmzCZU2q0oFlGFfgMaGYWe06nDeieRK7gpeJ v7bbN9KS55TYggrRyxbKwCfsB4WEIlFEPQ3Hnd6hRq2L2lDGFFlDFeJ9LA8yNKaGEKpT LWRKne48PsYntgi96iQnQXOUHSMoTRZUO7xP8cJ/fD/+SiZtlwFDPvMtw7GJuOvvi7oU GRhKlbIORhOZ7HBqxm9HTxMl4jZKIXLyhUa49fSDSaU+Oy62x4eTkY+vOQFP+lFOs+cy yeoA== X-Gm-Message-State: AOAM530XJYlbRUFyFpA+aWJO/rTTqgBwwFbWsDSuxv+MQKMds9baqj3U 5bjE1TQTP6jNZFOEC5TMdsOU218hvC/DmPQ7sur8iw== X-Google-Smtp-Source: ABdhPJywxLHJkpCLQi7PcFagG2achXfpk/l2Ei9sP1l4nr8UfHRocEGNLcugZ+twP4/YYqIIddF5cHhmQR7orYbSfiI= X-Received: by 2002:a92:aa46:: with SMTP id j67mr1643662ili.220.1592992948296; Wed, 24 Jun 2020 03:02:28 -0700 (PDT) MIME-Version: 1.0 References: <20200413091906.782-1-sarosh.arif@emumba.com> <20200415064238.24012-1-sarosh.arif@emumba.com> <205ece94-f6be-f4d9-0d6d-4c87e15dbb76@partner.samsung.com> In-Reply-To: From: Sarosh Arif Date: Wed, 24 Jun 2020 15:02:17 +0500 Message-ID: To: Lukasz Wojciechowski , david.hunt@intel.com Cc: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2] app/test/test_distributor.c: prevent memory leakages from the pool X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 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 wrote: >> >> Sure, will do that. >> >> On Wed, Apr 15, 2020 at 12:08 PM Lukasz Wojciechowski 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 wrote: >>>> >>>> >>>> W dniu 15.04.2020 o 08:42, Sarosh Arif pisze: >>>> > v2: >>>> > remove double freeing of mbufs >>>> > >>>> > Signed-off-by: Sarosh Arif >>>> > --- >>>> > 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 >>> >>> >>> >>>