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 32E0AA04AC; Tue, 1 Sep 2020 20:31:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3CE111C0B5; Tue, 1 Sep 2020 20:31:41 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id D66431C0AD for ; Tue, 1 Sep 2020 20:31:39 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200901183139euoutp0251cb6fe167605daac926a21a3e9829dd~wvHncY9Be1554215542euoutp024 for ; Tue, 1 Sep 2020 18:31:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200901183139euoutp0251cb6fe167605daac926a21a3e9829dd~wvHncY9Be1554215542euoutp024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1598985099; bh=r+S+yPOiYyQLkjq80p9WhL01Du8zHkny5Va2NfVoc5o=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=N+VOnQJAX9s+HFjYwoFxEVriUiFtJDTxceK08tKDMbeavwb/unN7xVwioXBX3UTA6 g7ppDqZL0z9/2EQAoqcGf0tdALeTiviYGP86Zn476Im52CHNQw2I4XMl/Gk5a35K8k 0RtE9MVN5lK5nAa1Zl/mRJ7kFWkIF+hVswa9klPU= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200901183139eucas1p24a771908d89a18b39d9c07c3ca2c7c07~wvHnW0Jxq2754527545eucas1p2D; Tue, 1 Sep 2020 18:31:39 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 30.1C.05997.B839E4F5; Tue, 1 Sep 2020 19:31:39 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200901183138eucas1p2487b17e16cb49e17b241707fbf4a4179~wvHnBp2302754527545eucas1p2B; Tue, 1 Sep 2020 18:31:38 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200901183138eusmtrp1c59ef0ba8f108276d148a6d2edbb6fd6~wvHnAiion1284212842eusmtrp1b; Tue, 1 Sep 2020 18:31:38 +0000 (GMT) X-AuditID: cbfec7f4-677ff7000000176d-05-5f4e938bc7f7 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 6D.0E.06314.A839E4F5; Tue, 1 Sep 2020 19:31:38 +0100 (BST) Received: from [106.210.88.70] (unknown [106.210.88.70]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200901183138eusmtip25f25dfb9406f5ce4b11b75f122624a7e~wvHmlijFk2871728717eusmtip2T; Tue, 1 Sep 2020 18:31:38 +0000 (GMT) To: Sarosh Arif , david.hunt@intel.com Cc: dev@dpdk.org From: Lukasz Wojciechowski Message-ID: Date: Tue, 1 Sep 2020 20:31:35 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Transfer-Encoding: 8bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphleLIzCtJLcpLzFFi42LZduznOd3uyX7xBjeXcln0TfrIZPHu03Ym i1PrvrM7MHv8WrCU1eP0zyfMHov3vGQKYI7isklJzcksSy3St0vgyuhf1M9ScFSlYstL2wbG nVJdjJwcEgImEkefHGLuYuTiEBJYwShx6eomKOcLo8SDlR9ZIZzPjBL/9s9i7GLkAGuZe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lgtqhA nMTj3v/MEDWCEidnPgFbxikQKLH2xi8WiAVmEvM2P2SGsOUlmrfOhrLFJW49mc80gVFoFpL2 WUhaZiFpmYWkZQEjyypGkdTS4tz03GJDveLE3OLSvHS95PzcTYzAuNl27OfmHYyXNgYfYhTg YFTi4Z0R7xcvxJpYVlyZe4hRgoNZSYTX6ezpOCHelMTKqtSi/Pii0pzU4kOMpkDPTWSWEk3O B8Z0Xkm8oamhuYWlobmxubGZhZI4b4fAwRghgfTEktTs1NSC1CKYPiYOTqkGRsMp59cr8SWl vmIIXWGsnVM8uUcrItrq2/89MhO+qArr9k4Mmb2zr/YU86mXMXsvHeh2uCHU9WRZXmrNS+Yp CtEeorsZOB+INUsqvXDydXuyerOhz/Zwz1C+aodZHgGi6kLORlMfzK1cNH3ugdqskivmj0Jt pJpPH3O+nmI+4fu7b2/fMPnIKbEUZyQaajEXFScCAEjzW1ixAgAA X-CMS-MailID: 20200901183138eucas1p2487b17e16cb49e17b241707fbf4a4179 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200415064629eucas1p1044d7741876d821ccb71d5dc4f472241 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200415064629eucas1p1044d7741876d821ccb71d5dc4f472241 References: <20200413091906.782-1-sarosh.arif@emumba.com> <20200415064238.24012-1-sarosh.arif@emumba.com> <205ece94-f6be-f4d9-0d6d-4c87e15dbb76@partner.samsung.com> 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" Sarosh, I cherry picked your patch on current main branch and it works and builds without problems, maybe try resubmitting it as v3. Best regards Lukasz W dniu 24.06.2020 o 12:02, Sarosh Arif pisze: > 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 >>>> >>>> >>>> >>>> -- Lukasz Wojciechowski Principal Software Engineer Samsung R&D Institute Poland Samsung Electronics Office +48 22 377 88 25 l.wojciechow@partner.samsung.com