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 B74D3A04BC for ; Sat, 10 Oct 2020 00:03:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 338881D653; Sat, 10 Oct 2020 00:03:04 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 93EF61D62F for ; Sat, 10 Oct 2020 00:02:59 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20201009220243euoutp028e5001ee34ef18e54060d53bdb6c7a85~8cgwJBPVy1684516845euoutp02t for ; Fri, 9 Oct 2020 22:02:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201009220243euoutp028e5001ee34ef18e54060d53bdb6c7a85~8cgwJBPVy1684516845euoutp02t DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1602280963; bh=Ijucr6xPwukpZ96boOK/+8uaapTvTE3KxkYfXLm/HJY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a+M2tcmLa3tpYMnx6NLaZmBvO3Ud6qD/nlNAwiMU1JnBDOZdmFIuyQuAX1b7o4E1u 1JB4I7A+uZjR4fcCJhgHMf1rOrjxjCDKhathAl7mymojHFpCNrny9F6u6hqfDDxpU6 yv1yG2ajdFG+BTwA7PdZtvOyXkz8yP6ETDVOYfsY= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201009220239eucas1p1d278a00f9834d426c8287460e249a6ad~8cgshJWT20450404504eucas1p10; Fri, 9 Oct 2020 22:02:39 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 9E.E2.06318.FFDD08F5; Fri, 9 Oct 2020 23:02:39 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20201009220238eucas1p2e86c0026064774e5b494c16c7fd384ec~8cgrUWBrL1922919229eucas1p2U; Fri, 9 Oct 2020 22:02:38 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201009220238eusmtrp262c786c28a818128d4a77c2df4959307~8cgrTx8-G1642116421eusmtrp2f; Fri, 9 Oct 2020 22:02:38 +0000 (GMT) X-AuditID: cbfec7f5-371ff700000018ae-a0-5f80ddffed8b Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 83.E2.06314.EFDD08F5; Fri, 9 Oct 2020 23:02:38 +0100 (BST) Received: from Padamandas.fritz.box (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201009220236eusmtip130620801bc7427f396306dbb816af2f6~8cgp7b6Ej1334813348eusmtip1x; Fri, 9 Oct 2020 22:02:36 +0000 (GMT) From: Lukasz Wojciechowski To: David Hunt , Bruce Richardson Cc: dev@dpdk.org, l.wojciechow@partner.samsung.com, stable@dpdk.org Date: Sat, 10 Oct 2020 00:01:54 +0200 Message-Id: <20201009220202.20834-8-l.wojciechow@partner.samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201009220202.20834-1-l.wojciechow@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEIsWRmVeSWpSXmKPExsWy7djPc7r/7zbEGyy9LWtxY5W9Rd+kj0wW 7z5tZ7J41rOO0eJfxx92B1aPXwuWsnos3vOSyePguz1MAcxRXDYpqTmZZalF+nYJXBkXl+xl LZjEXXH+zBy2BsbNnF2MnBwSAiYSn6/PYu1i5OIQEljBKDHl5yIo5wujxPa951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921lhxgv L7F6wwGwck4BN4nWXctYIFY1MkpsOfCSeQIj3wJGhlWMIqmlxbnpucWGesWJucWleel6yfm5 mxiBYbjt2M/NOxgvbQw+xCjAwajEw6uR2BAvxJpYVlyZe4hRgoNZSYTX6ezpOCHelMTKqtSi /Pii0pzU4kOMpkBHTWSWEk3OB8ZIXkm8oamhuYWlobmxubGZhZI4b4fAwRghgfTEktTs1NSC 1CKYPiYOTqkGxmjWk3oF1WH9MT4ZDm2Won1VudE3dLfd6v80Ua2TfeIBIZ5ehbVyxv2ROyZP Frz8+66+6JMEtpLeCzadx3Omu9lOOqmQPrPw/e7n0y47Bwtdyzr7Qob9xRb2D8/meltHpV8R 5135v2P/y1dzz/aYMtzyF+zdcK/06uETqZeEr9wQaQ3btX+vhRJLcUaioRZzUXEiAJoNUqlZ AgAA X-CMS-MailID: 20201009220238eucas1p2e86c0026064774e5b494c16c7fd384ec X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20201009220238eucas1p2e86c0026064774e5b494c16c7fd384ec X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201009220238eucas1p2e86c0026064774e5b494c16c7fd384ec References: <20201008052323.11547-1-l.wojciechow@partner.samsung.com> <20201009220202.20834-1-l.wojciechow@partner.samsung.com> Subject: [dpdk-stable] [PATCH v6 07/15] 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 115443fc0..9fd7dcab7 100644 --- a/lib/librte_distributor/rte_distributor.c +++ b/lib/librte_distributor/rte_distributor.c @@ -168,6 +168,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