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 D6A92A04B1 for ; Sat, 10 Oct 2020 18:06:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B5ABC1D93F; Sat, 10 Oct 2020 18:05:53 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 3BE071D930 for ; Sat, 10 Oct 2020 18:05:48 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20201010160538euoutp026f385833d6f8c57f241d8257b15925fc~8rSQdx5lW2850728507euoutp02c for ; Sat, 10 Oct 2020 16:05:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201010160538euoutp026f385833d6f8c57f241d8257b15925fc~8rSQdx5lW2850728507euoutp02c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1602345938; bh=Ijucr6xPwukpZ96boOK/+8uaapTvTE3KxkYfXLm/HJY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vg5hJ9GXP2Jlz/WeqVolrGZnIhOD/6Xayiwmgj6GfPO0glN0M3CJp8kyCTFR2nCej 6VCZ6OQz9IV4K/7SXr299LeRl6pPYofxtPylR1eMWxjxcaUhQ7xHo/2ajaqp8R3d/u skEhJ2TWnM063EiTulO4Q1iM8vfmTRyrvPND3oxk= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201010160531eucas1p1af14b9af332ca0768510a13b5073d9eb~8rSKqAZZs2236122361eucas1p11; Sat, 10 Oct 2020 16:05:31 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 71.E6.06456.BCBD18F5; Sat, 10 Oct 2020 17:05:31 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201010160530eucas1p15baba6fba44a7caee8b4b0ff778a961d~8rSJdLNQY2308623086eucas1p1u; Sat, 10 Oct 2020 16:05:30 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201010160530eusmtrp1cad744914f12d64bee41c69af06fec47~8rSJcp5SC2920229202eusmtrp1x; Sat, 10 Oct 2020 16:05:30 +0000 (GMT) X-AuditID: cbfec7f2-809ff70000001938-20-5f81dbcbb6a0 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id F4.5A.06314.ACBD18F5; Sat, 10 Oct 2020 17:05:30 +0100 (BST) Received: from Padamandas.fritz.box (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201010160529eusmtip1170ef6cde66621f199933ec543f2e2f3~8rSIqCH3B2442224422eusmtip11; Sat, 10 Oct 2020 16:05:29 +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 18:04:58 +0200 Message-Id: <20201010160508.19709-8-l.wojciechow@partner.samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201010160508.19709-1-l.wojciechow@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOIsWRmVeSWpSXmKPExsWy7djP87qnbzfGG1x5rGtxY5W9Rd+kj0wW 7z5tZ7J41rOO0eJfxx92B1aPXwuWsnos3vOSyePguz1MAcxRXDYpqTmZZalF+nYJXBkXl+xl LZjEXXH+zBy2BsbNnF2MnBwSAiYSu5oOsXQxcnEICaxglPjzewsTSEJI4Auj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q0T3kceM EPPlJVZvOABWzyngJnG26yDUrkZGiRO3b7JNYORbwMiwilEktbQ4Nz232FCvODG3uDQvXS85 P3cTIzAUtx37uXkH46WNwYcYBTgYlXh4JU41xguxJpYVV+YeYpTgYFYS4XU6ezpOiDclsbIq tSg/vqg0J7X4EKMp0FUTmaVEk/OBcZJXEm9oamhuYWlobmxubGahJM7bIXAwRkggPbEkNTs1 tSC1CKaPiYNTqoGRfVK9Z+PxB73e8v+nv72z9/RWfeHn6YKHl83g/zmT/YBL4KW4uN4sg96z R18tCTmY/kVwSbyG/XGZ73XrEk79fZ2fK95We/vbk0X7XDUKHa1+XHB+5lDUzKLotn7tvSS9 E25KRWnmx0/ozs+I+hD22t7O1F1kS62AmkJLE0eIa1vY+lustmeVWIozEg21mIuKEwGbX32f WwIAAA== X-CMS-MailID: 20201010160530eucas1p15baba6fba44a7caee8b4b0ff778a961d X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20201010160530eucas1p15baba6fba44a7caee8b4b0ff778a961d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201010160530eucas1p15baba6fba44a7caee8b4b0ff778a961d References: <20201009220202.20834-1-l.wojciechow@partner.samsung.com> <20201010160508.19709-1-l.wojciechow@partner.samsung.com> Subject: [dpdk-stable] [PATCH v7 07/16] 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