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 7C575A0577; Wed, 15 Apr 2020 08:52:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F08351D177; Wed, 15 Apr 2020 08:52:18 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 31FE01D16E for ; Wed, 15 Apr 2020 08:52:18 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200415065217euoutp0115b50bb19dd66e0777122f986cf9670d~F66UCICEO1816818168euoutp01Z for ; Wed, 15 Apr 2020 06:52:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200415065217euoutp0115b50bb19dd66e0777122f986cf9670d~F66UCICEO1816818168euoutp01Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1586933537; bh=RC8gCxNd+h3cpjUTSlROYJhdvqZv7VFu3VzawvXDwD0=; h=Subject:To:From:Date:In-Reply-To:References:From; b=vLwy4DUYkONNuAt1mR677Z8zK29Wp8qp6qivPPpgn3zlqTb6F8JNOWsa8eeSv8uww si9Igi8AD5YlnzL+oCMdEIQ8xkiENkPf6C81f+e/bkH/AN6OQHPQTdvzNmd1h+6vQ8 aeQhluCxeLWYatFRZKud9Mk0yPUuRH4e8kUC3LWw= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200415065217eucas1p2289b0afbf266c95a748e723dfa675354~F66T4qz_F3254132541eucas1p2H; Wed, 15 Apr 2020 06:52:17 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id BB.90.61286.12FA69E5; Wed, 15 Apr 2020 07:52:17 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200415065217eucas1p12bcc00d32ab90b25a37665b1b527cdb1~F66Tk0sEw1766817668eucas1p1K; Wed, 15 Apr 2020 06:52:17 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200415065217eusmtrp2d7870cc5a2f8088dac85e738c387fb38~F66TkPecf1899818998eusmtrp2F; Wed, 15 Apr 2020 06:52:17 +0000 (GMT) X-AuditID: cbfec7f2-f0bff7000001ef66-7d-5e96af216a46 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 25.B0.07950.12FA69E5; Wed, 15 Apr 2020 07:52:17 +0100 (BST) Received: from [106.210.88.70] (unknown [106.210.88.70]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200415065216eusmtip28d4a17099e08e0bbfc4ec327c6eaa5e8~F66TQ1UO71644616446eusmtip2b; Wed, 15 Apr 2020 06:52:16 +0000 (GMT) To: Sarosh Arif , dev@dpdk.org From: Lukasz Wojciechowski Message-ID: Date: Wed, 15 Apr 2020 08:52:15 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200415064238.24012-1-sarosh.arif@emumba.com> Content-Transfer-Encoding: 8bit Content-Language: pl X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrPIsWRmVeSWpSXmKPExsWy7djPc7qK66fFGfzfImvx7tN2JotT676z OzB5/FqwlNXj9M8nzAFMUVw2Kak5mWWpRfp2CVwZR2+8Yyt4KFjR+dO0gfEWbxcjJ4eEgInE 1kPb2LsYuTiEBFYwSiw+sIEVwvnCKHGhcwkjhPOZUWLtxKksMC0v2zewgdh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jN KWAj0XV0GiuIzQw0fd7mh8wQtrxE89bZULaIxI1HLYwTGAVnIWmfhaRlFpKWWUhaFjCyrGIU SS0tzk3PLTbSK07MLS7NS9dLzs/dxAiMgm3Hfm7Zwdj1LvgQowAHoxIP74k1U+OEWBPLiitz DzFKcDArifCuzwUK8aYkVlalFuXHF5XmpBYfYjQF+m0is5Rocj4wQvNK4g1NDc0tLA3Njc2N zSyUxHk7BA7GCAmkJ5akZqemFqQWwfQxcXBKNTCG/H9k21WfqqKjJcvi8p1hzpz0joQn+oE3 8kXZNoi9Su6+5WfQoJmo1zDhRM96v90yU2VvZ3UVnt72q+r+4rqqHcGlrB/Xmc3at5T/b7pL yO1bkbbGIR2mK+fpXHn1/sxRFib23VmnOGaZX5F8d/lxmMRXRo1WKbF/xxeHTO5tkL/3KDlX b4ESS3FGoqEWc1FxIgCh8sMNmAIAAA== X-CMS-MailID: 20200415065217eucas1p12bcc00d32ab90b25a37665b1b527cdb1 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> 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" 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