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 31D8EA04DB for ; Sat, 17 Oct 2020 05:08:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 215F5E2C5; Sat, 17 Oct 2020 05:07:55 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id E4F4AE2A6 for ; Sat, 17 Oct 2020 05:07:37 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20201017030722euoutp0139db19e678bd73de5ab7ccfca0f6f9b3~_qLvbqNym1627116271euoutp01W for ; Sat, 17 Oct 2020 03:07:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20201017030722euoutp0139db19e678bd73de5ab7ccfca0f6f9b3~_qLvbqNym1627116271euoutp01W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1602904042; bh=HJPgphr+hd6bGoQWpMo7AknsNsjiDnUwTElgEuD8nH0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fdYV2FIlCB2H+6DJlCnkLXY5oCZKs2qLqn3M5yQfyeN3nb4yeG/0V/guaCGPNPeOG hg4iUkVNlTsE2ls7DjCfcBkFq0Q1+zWUAcNZ2ZEM1FHDGr6S4nYSJpmLvJ/fC6bg2n uVM+5pCkO73KmNk5VNmujrg4gUfs5HoY4O2oe+rs= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201017030714eucas1p111c6d82462a467c05637ee82293e45e0~_qLojKy1O0898408984eucas1p11; Sat, 17 Oct 2020 03:07:14 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 48.D5.06318.2EF5A8F5; Sat, 17 Oct 2020 04:07:14 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20201017030714eucas1p292bd71a85ea6d638256c21d279c8d533~_qLoG9HuY1942819428eucas1p2w; Sat, 17 Oct 2020 03:07:14 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201017030714eusmtrp1974fdc1fc6c79c752d7469f4bb206716~_qLoGZ7g-3018830188eusmtrp1V; Sat, 17 Oct 2020 03:07:14 +0000 (GMT) X-AuditID: cbfec7f5-38bff700000018ae-94-5f8a5fe228f5 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 6D.DE.06017.2EF5A8F5; Sat, 17 Oct 2020 04:07:14 +0100 (BST) Received: from localhost.localdomain (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201017030713eusmtip1d02f205519153d1c822ab4dba6c7058a~_qLngtj2l3071330713eusmtip1G; Sat, 17 Oct 2020 03:07:13 +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:50 +0200 Message-Id: <20201017030701.16134-7-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+NgFnrOIsWRmVeSWpSXmKPExsWy7djPc7qP4rviDR4t0rK4screom/SRyaL d5+2M1k861nHaPGv4w+7A6vHrwVLWT0W73nJ5HHw3R6mAOYoLpuU1JzMstQifbsErowFMzax FUzirjh19QNzA+Nmzi5GTg4JAROJx1+/sHUxcnEICaxglNi4bQGU84VR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8R8 eYnVGw4wg4zhFHCTaDzuCrGqkVHi7Kx1LBMY+RYwMqxiFEktLc5Nzy020itOzC0uzUvXS87P 3cQIDMRtx35u2cHY9S74EKMAB6MSD++GRZ3xQqyJZcWVuYcYJTiYlUR4nc6ejhPiTUmsrEot yo8vKs1JLT7EaAp01ERmKdHkfGCU5JXEG5oamltYGpobmxubWSiJ83YIHIwREkhPLEnNTk0t SC2C6WPi4JRqYDRTO+IUHPh73b3eZc5zDDYH7GwOSpXa+WzbQ7apeh2nyg26Jt+om8x8/q3A tT9OC7mcLMtmb36zYXXTpanHO96HOTn13XFcUaysZjGr7o7Z3H/HV82YvvP1uojdZ2TPrlrA GrXu/hO1I/onbJrq53Vm5R6Jm7T9T1JE7Ys1vxtZ4z682vz7R8wvJZbijERDLeai4kQAIzM0 SloCAAA= X-CMS-MailID: 20201017030714eucas1p292bd71a85ea6d638256c21d279c8d533 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20201017030714eucas1p292bd71a85ea6d638256c21d279c8d533 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201017030714eucas1p292bd71a85ea6d638256c21d279c8d533 References: <20201010160508.19709-1-l.wojciechow@partner.samsung.com> <20201017030701.16134-1-l.wojciechow@partner.samsung.com> Subject: [dpdk-stable] [PATCH v8 06/17] distributor: fix return pkt calls in single mode 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" In the single legacy version of the distributor synchronization requires continues exchange of buffers between distributor and workers. Empty buffers are sent if only handshake synchronization is required. However calls to the rte_distributor_return_pkt() with 0 buffers in single mode were ignored and not passed to the legacy algorithm implementation causing lack of synchronization. This patch fixes this issue by passing NULL as buffer which is a valid way of sending just synchronization handshakes in single mode. Fixes: 775003ad2f96 ("distributor: add new burst-capable library") Cc: david.hunt@intel.com Cc: stable@dpdk.org Signed-off-by: Lukasz Wojciechowski Acked-by: David Hunt --- lib/librte_distributor/rte_distributor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c index 7aa079d53..6e3eae58f 100644 --- a/lib/librte_distributor/rte_distributor.c +++ b/lib/librte_distributor/rte_distributor.c @@ -167,6 +167,9 @@ rte_distributor_return_pkt(struct rte_distributor *d, if (num == 1) return rte_distributor_return_pkt_single(d->d_single, worker_id, oldpkt[0]); + else if (num == 0) + return rte_distributor_return_pkt_single(d->d_single, + worker_id, NULL); else return -EINVAL; } -- 2.17.1