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 A8F86A04DB for ; Sat, 17 Oct 2020 05:08:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B3192E307; Sat, 17 Oct 2020 05:08:14 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 79DB7E2B5 for ; Sat, 17 Oct 2020 05:07:43 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20201017030725euoutp0242d9c9e60b5e9a73cd031915bf4256b8~_qLyTBKqG2304823048euoutp02g for ; Sat, 17 Oct 2020 03:07:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201017030725euoutp0242d9c9e60b5e9a73cd031915bf4256b8~_qLyTBKqG2304823048euoutp02g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1602904045; bh=pLPHVpOWYNnED/LxEp7Q/jmg1Yu1zrs08910bMndYwk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S5Tr9R/T5FiogvfOAOmdpZBVvINADZ7t73sTfm2dPKD6zZne84VahfbveHbO0Fdos j9FSohY9uBKuZ+e8lkv1UwnHtZjdKKwvOQkZGSnzOF93qNTGoFgwGs6q8mv+/4FxKe xaa+RgqzEJGVEPn2xcXaEFia3esQ8oi6EWqwQlkc= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201017030718eucas1p123a567773460cb9b096cf12a5c044e9c~_qLsSUjdY0897308973eucas1p1q; Sat, 17 Oct 2020 03:07:18 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 68.E8.06456.6EF5A8F5; Sat, 17 Oct 2020 04:07:18 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201017030717eucas1p1ae327494575f851af4bdf77f3e8c83ae~_qLrFn0Z30896808968eucas1p1s; Sat, 17 Oct 2020 03:07:17 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201017030717eusmtrp13b0fa52643ce6311aa1ee54d7ef2cb4e~_qLrFHh5M3018830188eusmtrp1X; Sat, 17 Oct 2020 03:07:17 +0000 (GMT) X-AuditID: cbfec7f2-809ff70000001938-33-5f8a5fe6ec3d Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 2E.DE.06017.5EF5A8F5; Sat, 17 Oct 2020 04:07:17 +0100 (BST) Received: from localhost.localdomain (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201017030716eusmtip183da5deec2fee89bc17522d8bffbffa1~_qLqNdIkn3124931249eusmtip18; Sat, 17 Oct 2020 03:07:16 +0000 (GMT) From: Lukasz Wojciechowski To: David Hunt , Bruce Richardson Cc: dev@dpdk.org, l.wojciechow@partner.samsung.com, stable@dpdk.org Date: Sat, 17 Oct 2020 05:06:53 +0200 Message-Id: <20201017030701.16134-10-l.wojciechow@partner.samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201017030701.16134-1-l.wojciechow@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOIsWRmVeSWpSXmKPExsWy7djPc7rP4rviDZ4s17W4screom/SRyaL d5+2M1k861nHaPGv4w+7A6vHrwVLWT0W73nJ5HHw3R6mAOYoLpuU1JzMstQifbsErow15ycw FjznqTh06S1TA+NLri5GTg4JAROJScf6mbsYuTiEBFYwSpxY8oUNwvnCKHF49Q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MoYTKN543BViVSOjxNlZ61gmMPItYGRYxSiSWlqcm55bbKRXnJhbXJqXrpec n7uJERiI24793LKDsetd8CFGAQ5GJR7eDYs644VYE8uKK3MPMUpwMCuJ8DqdPR0nxJuSWFmV WpQfX1Sak1p8iNEU6KiJzFKiyfnAKMkriTc0NTS3sDQ0NzY3NrNQEuftEDgYIySQnliSmp2a WpBaBNPHxMEp1cBYlNa1bqGUndeyiTdff10Tlcp/YULuRb3twtYKG5ad2G4h3V5fLqP7yDtw w8uY55I507iWT1Zd061X9mJ95OzIGoH700Xvbpvxuf6i5y/JObkqOhvyWs+07I12m24VNnmp 4opr/z9pmZ5s82m8Y7E+13beW7n1NzPDEpfHzg7TUqo9LXzH/WqcEktxRqKhFnNRcSIAAG0y jloCAAA= X-CMS-MailID: 20201017030717eucas1p1ae327494575f851af4bdf77f3e8c83ae X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20201017030717eucas1p1ae327494575f851af4bdf77f3e8c83ae X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201017030717eucas1p1ae327494575f851af4bdf77f3e8c83ae References: <20201010160508.19709-1-l.wojciechow@partner.samsung.com> <20201017030701.16134-1-l.wojciechow@partner.samsung.com> Subject: [dpdk-stable] [PATCH v8 09/17] test/distributor: collect return mbufs X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" During quit_workers function distributor's main core processes some packets to wake up pending worker cores so they can quit. As quit_workers acts also as a cleanup procedure for next test case it should also collect these packets returned by workers' handlers, so the cyclic buffer with returned packets in distributor remains empty. Fixes: c3eabff124e6 ("distributor: add unit tests") Cc: bruce.richardson@intel.com Fixes: c0de0eb82e40 ("distributor: switch over to new API") Cc: david.hunt@intel.com Cc: stable@dpdk.org Signed-off-by: Lukasz Wojciechowski Acked-by: David Hunt --- 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 4343efed1..3f0aeb7b9 100644 --- a/app/test/test_distributor.c +++ b/app/test/test_distributor.c @@ -591,6 +591,7 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p) const unsigned num_workers = rte_lcore_count() - 1; unsigned i; struct rte_mbuf *bufs[RTE_MAX_LCORE]; + struct rte_mbuf *returns[RTE_MAX_LCORE]; if (rte_mempool_get_bulk(p, (void *)bufs, num_workers) != 0) { printf("line %d: Error getting mbufs from pool\n", __LINE__); return; @@ -606,6 +607,10 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p) rte_distributor_flush(d); rte_eal_mp_wait_lcore(); + while (rte_distributor_returned_pkts(d, returns, RTE_MAX_LCORE)) + ; + + rte_distributor_clear_returns(d); rte_mempool_put_bulk(p, (void *)bufs, num_workers); quit = 0; -- 2.17.1