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 9B5C4A04B5; Wed, 16 Sep 2020 21:01:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C1FD11D174; Wed, 16 Sep 2020 21:01:53 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 273CD1D159 for ; Wed, 16 Sep 2020 21:01:52 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200916190152euoutp01a33c300c134c6f1360a1525e507792da~1WNR2q1yV1953919539euoutp01i for ; Wed, 16 Sep 2020 19:01:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200916190152euoutp01a33c300c134c6f1360a1525e507792da~1WNR2q1yV1953919539euoutp01i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1600282912; bh=Shl/WufyWUekByZnzep0gL3ue6pLDPxTaTIhQVK801w=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=dSqbGdsin80Drp1gq4Wax3ULMyoG11YmPXUUZF6I4stADV40XNgwUGRXVuZXxwB2d AY0TTw64YBd8/VNpr2+DObr2gMSuWkpN3EsXSyDHQy/HydNsVlMLthV3hRkvoVWF7W PvydnBGV6F0uZvQv/hJVWb1Ulq2UgdNeUABo/Gek= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200916190151eucas1p1981c5280fd01ba3326be266c5e3a7ea0~1WNRpyCAO2289522895eucas1p1m; Wed, 16 Sep 2020 19:01:51 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id DF.7A.05997.F11626F5; Wed, 16 Sep 2020 20:01:51 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200916190151eucas1p2190faa1a736fd673380a512a2df9bdd0~1WNRS7Juf2108921089eucas1p2i; Wed, 16 Sep 2020 19:01:51 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200916190151eusmtrp125e65fd71acc4108cf8b90a66b5c2f4f~1WNRSV4Or2384823848eusmtrp1J; Wed, 16 Sep 2020 19:01:51 +0000 (GMT) X-AuditID: cbfec7f4-65dff7000000176d-d4-5f62611f5598 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 35.1C.06017.F11626F5; Wed, 16 Sep 2020 20:01:51 +0100 (BST) Received: from [106.210.88.70] (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200916190150eusmtip10c2f07e63419dbf3a6a455e3062e8323~1WNQv5Lw50401904019eusmtip19; Wed, 16 Sep 2020 19:01:50 +0000 (GMT) To: Sarosh Arif , david.hunt@intel.com Cc: dev@dpdk.org, "\"'Lukasz Wojciechowski'\"," From: Lukasz Wojciechowski Message-ID: <672b1766-c30d-0def-ecb6-6587115e123c@partner.samsung.com> Date: Wed, 16 Sep 2020 21:01:50 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200908102204.727240-1-sarosh.arif@emumba.com> Content-Transfer-Encoding: 8bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprGKsWRmVeSWpSXmKPExsWy7djPc7ryiUnxBstvm1j0TfrIZPHu03Ym i2c96xgtTq37zu7A4vFrwVJWj9M/nzB7LN7zksnj4Ls9TAEsUVw2Kak5mWWpRf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cWT2bqYuQASshIfLgEVSMs8edaFxtEzWtGicWfnrCDJIQFAiWW 7H4AZosI2EnsfP2GEcRmFgiRWDxpHVTDIUaJjknTWUASbAK2EkdmfmUFWcAr4CZx9DAzSJhF QFVixrbrbCC2qECcxJmeF2A2r4CgxMmZT8BaOYFaO3/fYIKYbyYxb/NDZghbXqJ562woW1zi 1pP5TBMYhWYhaZ+FpGUWkpZZSFoWMLKsYhRJLS3OTc8tNtIrTswtLs1L10vOz93ECIylbcd+ btnB2PUu+BCjAAejEg/vBtGkeCHWxLLiylyg/ziYlUR4nc6ejhPiTUmsrEotyo8vKs1JLT7E aAr03ERmKdHkfGCc55XEG5oamltYGpobmxubWSiJ83YIHIwREkhPLEnNTk0tSC2C6WPi4JRq YDQ6ZG3W4y3VEi7xS/bN35Vt9Vrae3ZnWW6xDvyXfk75nGGd69fk5K8KKysZA/3uzp405Wjm 6gp/yablG+yW32Gs1DLP2yeQevG55b0ZKun8at1ped2m3Dd0v8jfMezIyhQ6tsrq7qaaJ/t1 c1h/7U3KyXg1lTtng2r2O+eop+LVQSejMrytlFiKMxINtZiLihMB0aGR2LsCAAA= X-CMS-MailID: 20200916190151eucas1p2190faa1a736fd673380a512a2df9bdd0 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200908102250eucas1p22d98cfa1a687590667dd803570d81eb8 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200908102250eucas1p22d98cfa1a687590667dd803570d81eb8 References: <20200415064238.24012-1-sarosh.arif@emumba.com> <20200908102204.727240-1-sarosh.arif@emumba.com> Subject: Re: [dpdk-dev] [v3 PATCH] test_distributor: 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" W dniu 08.09.2020 o 12:22, Sarosh Arif pisze: > 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 > --- > v2: > remove double freeing of mbufs > v3: > resubmit to run the tests again > --- > app/test/test_distributor.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c > index ba1f81cf8..1a893a7d9 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; > } > } Acked-by: Lukasz Wojciechowski -- Lukasz Wojciechowski Principal Software Engineer Samsung R&D Institute Poland Samsung Electronics Office +48 22 377 88 25 l.wojciechow@partner.samsung.com