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 67537A04C0; Sat, 26 Sep 2020 00:42:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F39151E9CF; Sat, 26 Sep 2020 00:42:23 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 6921F1D59C for ; Sat, 26 Sep 2020 00:42:19 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200925224217euoutp029270464d09444e31860ea1eeec6b3d1b~4KBTl392r2280822808euoutp02G for ; Fri, 25 Sep 2020 22:42:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200925224217euoutp029270464d09444e31860ea1eeec6b3d1b~4KBTl392r2280822808euoutp02G DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1601073737; bh=QU15WoFYnp3ylpwwfvLP2dOSUhNoF+G9OH/zNtFbqSA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ChjIYWa/uSzJrM+Aftt64CqVKig8PPTn8E20nWJKglSfoxiV4/77O9xUjhRRYRGiw JQLWnJnxnu6/+cuP0/+zZrwGsPAgb4HVCpX/6oVMmY66JpPOOUM81aeigVNhyTKXD4 itjqFZJeKzgBgsuBwxF/CEkSvt8hmtWD5mV/ztwc= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200925224217eucas1p2ea2014b473cd36f9fac10743bc11ba8a~4KBTL7pAs3149831498eucas1p2a; Fri, 25 Sep 2020 22:42:17 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id AB.0A.06318.9427E6F5; Fri, 25 Sep 2020 23:42:17 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200925224216eucas1p28b73b1b56c6f3372db4fcaba0890522f~4KBSFq7Of0959909599eucas1p2f; Fri, 25 Sep 2020 22:42:16 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200925224216eusmtrp11386c8b3ce0edd08a5c4b6eab2b4887b~4KBSFHt5G1720917209eusmtrp17; Fri, 25 Sep 2020 22:42:16 +0000 (GMT) X-AuditID: cbfec7f5-38bff700000018ae-04-5f6e7249f4bf Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id DD.3C.06314.7427E6F5; Fri, 25 Sep 2020 23:42:16 +0100 (BST) Received: from localhost.localdomain (unknown [106.210.88.70]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200925224215eusmtip2f13fee067bf7f9420f7d473eaf649047~4KBRvOd811081510815eusmtip2x; Fri, 25 Sep 2020 22:42:15 +0000 (GMT) From: Lukasz Wojciechowski To: Cc: dev@dpdk.org, l.wojciechow@partner.samsung.com Date: Sat, 26 Sep 2020 00:42:01 +0200 Message-Id: <20200925224209.12173-1-l.wojciechow@partner.samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200923132541.21417-1-l.wojciechow@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrKIsWRmVeSWpSXmKPExsWy7djP87qeRXnxBhMu8Vu8+7SdyeJZzzpG ByaPXwuWsnocfLeHKYApissmJTUnsyy1SN8ugStj+6tLrAUveCpuPp/E3sA4jauLkZNDQsBE Yuv8fuYuRi4OIYEVjBK7jr2Gcr4wShxYcIwRwvnMKHFw0RVWmJalz1awQSSWM0pMe7+FBSQB VnXzRSGIzSZgK3Fk5lewB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pY3BhxgFOBiV eHhPPMqNF2JNLCuuzD3EKMHBrCTC63T2dJwQb0piZVVqUX58UWlOavEhRlOgmyYyS4km5wPD P68k3tDU0NzC0tDc2NzYzEJJnLdD4GCMkEB6YklqdmpqQWoRTB8TB6dUA6Oke1rPUb30JJ3z VbcX1n/+Ni9jyvyNK5lZjb0b8s6zMH8JXr/YbYln3f10UVPrnx//Ln7mrHCV67mMTcG1vSGC kvGLHvRFxxh48yYwLZq/urrsGX9tc+aM2PIzMcUfM94FPvz6YmPPG4fGwCRLp8Ozvz9RzL9p veiXfNVz9fV7/xxMmTkzokuJpTgj0VCLuag4EQCPnF4wRwIAAA== X-CMS-MailID: 20200925224216eucas1p28b73b1b56c6f3372db4fcaba0890522f X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200925224216eucas1p28b73b1b56c6f3372db4fcaba0890522f X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200925224216eucas1p28b73b1b56c6f3372db4fcaba0890522f References: <20200923132541.21417-1-l.wojciechow@partner.samsung.com> Subject: [dpdk-dev] [PATCH v4 0/8] 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. --- v4: * adjust commit name prefixes app/test -> test/distributor: * reorder patches * use NULL oldpkt in rte_distributor_get_pkt() calls in tests v3: * add missing acked and tested by statements from v1 v2: * assign NULL to freed mbufs in distributor test * fix handshake check on legacy single distributor rte_distributor_return_pkt_single() * add patch 7 passing NULL to legacy API calls if no bufs are returned * add patch 8 fixing API documentation Lukasz Wojciechowski (8): test/distributor: fix deadlock with freezed worker test/distributor: synchronize lcores statistics distributor: do not use oldpkt when not needed test/distributor: fix freeing mbufs test/distributor: collect return mbufs distributor: fix missing handshake synchronization distributor: fix handshake deadlock distributor: align API documentation with code app/test/test_distributor.c | 117 ++++++++++-------- lib/librte_distributor/rte_distributor.c | 27 +++- lib/librte_distributor/rte_distributor.h | 23 ++-- .../rte_distributor_single.c | 4 + 4 files changed, 102 insertions(+), 69 deletions(-) -- 2.17.1