From patchwork Tue Sep 15 19:34:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Wojciechowski X-Patchwork-Id: 77810 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9F1B3A04C7; Tue, 15 Sep 2020 21:35:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B21C01C0D8; Tue, 15 Sep 2020 21:34:59 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id BE7CE1C0D2 for ; Tue, 15 Sep 2020 21:34:58 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200915193458euoutp02ee7bed9aac2f5bc27120327c4b2417b6~1DA5EJNQE2234022340euoutp02Q for ; Tue, 15 Sep 2020 19:34:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200915193458euoutp02ee7bed9aac2f5bc27120327c4b2417b6~1DA5EJNQE2234022340euoutp02Q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1600198498; bh=H66o+YihMKYZxZEgbXV0KFSAyY3kvb2swP5l4ZzUBKk=; h=From:To:Cc:Subject:Date:References:From; b=S/HMymhEVU9khV6LRuyNygBHcvmg3bIFIYeUUiYiOAnWuyh8jr7anbIVxZ+IfeIvh CNsqSpeoEm689rQmVOhJCsjVB4kdY4G/62Xwa0x7STGao+c/gHG1e8alHuLsw/nwUy BtSi18GX84zvW9p/XfOkbwkZ7+4MegQu/bbgw8Ic= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200915193457eucas1p1f548ce412beb1d6331fce8183c92c6c0~1DA4ZPl_10266502665eucas1p1i; Tue, 15 Sep 2020 19:34:57 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 3F.E3.06456.167116F5; Tue, 15 Sep 2020 20:34:57 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200915193456eucas1p1a38a0bb16e9c81ed587f916aeb8c41e5~1DA3g5fEX0221002210eucas1p1l; Tue, 15 Sep 2020 19:34:56 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200915193456eusmtrp1d1ad4483366d166e62850f2fa0dd1550~1DA3gcXqD1473114731eusmtrp17; Tue, 15 Sep 2020 19:34:56 +0000 (GMT) X-AuditID: cbfec7f2-809ff70000001938-fd-5f611761cd9c Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 33.7C.06314.067116F5; Tue, 15 Sep 2020 20:34:56 +0100 (BST) Received: from Padamandas.fritz.box (unknown [106.210.88.70]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200915193455eusmtip23ad85cce92ebd2979a1ff7404502f3e9~1DA3JlSm22437224372eusmtip2x; Tue, 15 Sep 2020 19:34:55 +0000 (GMT) From: Lukasz Wojciechowski To: Cc: dev@dpdk.org, l.wojciechow@partner.samsung.com Date: Tue, 15 Sep 2020 21:34:43 +0200 Message-Id: <20200915193449.13310-1-l.wojciechow@partner.samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrGIsWRmVeSWpSXmKPExsWy7djPc7qJ4onxBg+f81m8+7SdyeJZzzpG ByaPXwuWsnocfLeHKYApissmJTUnsyy1SN8ugStjT7dhwT72infXprE1MHazdTFyckgIm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88CRoZVjCKppcW5 6bnFhnrFibnFpXnpesn5uZsYgQGz7djPzTsYL20MPsQowMGoxMO74HZCvBBrYllxZe4hRgkO ZiURXqezp+OEeFMSK6tSi/Lji0pzUosPMZoCLZ/ILCWanA8M5rySeENTQ3MLS0NzY3NjMwsl cd4OgYMxQgLpiSWp2ampBalFMH1MHJxSDYzzOXm/MDm+ZzOQ5K51yz15/IH7idlSD3pDE07t PVkVWzgnyWXVF3cO65vnalb8vFf97duJ1eZaWw59XHhu21snq4c/5506IznlbkK0/El3FoXQ NT5TL53i+mBT+fX8kfP2kfrS+xb7RPgfLT5e3nZ2aYezXNSphxfPVbdZFexnlE1Ue2+3LdNJ iaU4I9FQi7moOBEAFOyWay4CAAA= X-CMS-MailID: 20200915193456eucas1p1a38a0bb16e9c81ed587f916aeb8c41e5 X-Msg-Generator: CA X-RootMTR: 20200915193456eucas1p1a38a0bb16e9c81ed587f916aeb8c41e5 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200915193456eucas1p1a38a0bb16e9c81ed587f916aeb8c41e5 References: Subject: [dpdk-dev] [PATCH v1 0/6] fix distributor synchronization issues 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" During review and verification of the patch created by Sarosh Arif: "test_distributor: prevent memory leakages from the pool" I found out that running distributor unit tests multiple times in a row causes fails. So I investigated all the issues I found. There are few synchronization issues that might cause deadlocks or corrupted data. They are fixed with this set of patches for both tests and librte_distributor library. Lukasz Wojciechowski (6): app/test: fix deadlock in distributor test app/test: synchronize statistics between lcores app/test: fix freeing mbufs in distributor tests app/test: collect return mbufs in distributor test distributor: fix missing handshake synchronization distributor: fix handshake deadlock app/test/test_distributor.c | 98 ++++++++++++++---------- lib/librte_distributor/rte_distributor.c | 23 +++++- 2 files changed, 79 insertions(+), 42 deletions(-)