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 86B0AA04B5; Wed, 23 Sep 2020 03:47:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C3F651DAF4; Wed, 23 Sep 2020 03:47:21 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 2F4C71DAD6 for ; Wed, 23 Sep 2020 03:47:19 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200923014719euoutp029ad9caedcadd951d502c1bf3cabd290e~3Rm-uezaf1896818968euoutp02s for ; Wed, 23 Sep 2020 01:47:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200923014719euoutp029ad9caedcadd951d502c1bf3cabd290e~3Rm-uezaf1896818968euoutp02s DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1600825639; bh=1ZjDIfzp3kit75JR3/EkAVjMvtfycIkYAEwu8sANBgE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OUvRWzMmGD7FO3KCR2p33OSzVsWRspGUsfQB73lX16G3tXp0r8QeOjuoDkO9u8whQ yhWZujl81X6rB5K3vTJ2QjbHod5jLouo0q60BIvGuyxmXj1hQMq4nh+GwrKL4WB/MU 85ZOSsWZNzJLIwHUGbc4QzE0udDoMWcO7K2sNpLg= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200923014718eucas1p24b8b334448d7778530908ea85c4968d6~3Rm-GFCCY1449114491eucas1p2k; Wed, 23 Sep 2020 01:47:18 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id F4.6D.06456.629AA6F5; Wed, 23 Sep 2020 02:47:18 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200923014717eucas1p18699ad84d206e786a84f20dab9b65c33~3Rm9-OMkw1653216532eucas1p1A; Wed, 23 Sep 2020 01:47:17 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200923014717eusmtrp1c594024e75252864a4d206f2efc513ba~3Rm9_tTsi1355413554eusmtrp1I; Wed, 23 Sep 2020 01:47:17 +0000 (GMT) X-AuditID: cbfec7f2-7efff70000001938-d9-5f6aa926e7ab Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 29.DB.06017.529AA6F5; Wed, 23 Sep 2020 02:47:17 +0100 (BST) Received: from Padamandas.fritz.box (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200923014716eusmtip1135a7822fb9fe5c676e0cedbd79b33df~3Rm9lcof81064810648eusmtip1s; Wed, 23 Sep 2020 01:47:16 +0000 (GMT) From: Lukasz Wojciechowski To: Cc: dev@dpdk.org, l.wojciechow@partner.samsung.com Date: Wed, 23 Sep 2020 03:47:05 +0200 Message-Id: <20200923014713.16932-1-l.wojciechow@partner.samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200915193449.13310-1-l.wojciechow@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WRe0hTYRTAObvXdTeb3u40DyZICyvDR+uFUYnaS5AiqL8imysv09qm7DrL IBq4JGyFD0zMENHEzdBZypIUzCmaj0TykYGIgZUaDpwNncqo7U7673fO+R3OOd9HEcw4GU5l a/NYnVaplgnFpK3fPRq733JHcdhhCk1wON8LEn6aWiBJkLpR2xCQ2uPoElwRXBefzmTV2fms Lj4xQ5w1VjlH5DYG3jc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q53wYcYBTgYlXh4 XzzJjBdiTSwrrsw9xCjBwawkwut09nScEG9KYmVValF+fFFpTmrxIUZToKMmMkuJJucDwz+v JN7Q1NDcwtLQ3Njc2MxCSZy3Q+BgjJBAemJJanZqakFqEUwfEwenVAOjKwf7U+sp3UktMzaw LelxTuPQeHZ0/YwE74rDxxgKmFVPLVDM1Dxz7ssLVmdJjq/xD16uLU7OY/p926bx9Spr55TS 2UySjOp+Tvv6L7x5fqUhXGDhXmXzln8nP58orOHUbLOptTxTKnTumWN68Eedr0eYu26xX7br L2RcbrnjwFWt6DWl4d+VWIozEg21mIuKEwGr8IDRRwIAAA== X-CMS-MailID: 20200923014717eucas1p18699ad84d206e786a84f20dab9b65c33 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200923014717eucas1p18699ad84d206e786a84f20dab9b65c33 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200923014717eucas1p18699ad84d206e786a84f20dab9b65c33 References: <20200915193449.13310-1-l.wojciechow@partner.samsung.com> Subject: [dpdk-dev] [PATCH v2 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. --- 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): 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 distributor: do not use oldpkt when not needed distributor: align API documentation with code app/test/test_distributor.c | 113 +++++++++++------- lib/librte_distributor/rte_distributor.c | 27 ++++- lib/librte_distributor/rte_distributor.h | 23 ++-- .../rte_distributor_single.c | 4 + 4 files changed, 110 insertions(+), 57 deletions(-) -- 2.17.1