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 A4A4EA04BC for ; Thu, 8 Oct 2020 16:32:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6303C1C190; Thu, 8 Oct 2020 16:32:30 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 9B2131C113; Thu, 8 Oct 2020 16:32:26 +0200 (CEST) IronPort-SDR: c2n8gHptIyQi3SluUYFCtCm1+0ccmPMNTdK+L22P7x00veirorny+3jxfiJjnYi7UREJa3RxDV j+x31p2NCBeQ== X-IronPort-AV: E=McAfee;i="6000,8403,9768"; a="226989401" X-IronPort-AV: E=Sophos;i="5.77,351,1596524400"; d="scan'208";a="226989401" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2020 07:32:24 -0700 IronPort-SDR: UZXwS/9MSZK1FC9q2lMpkkCTXTJJt1lCMGMpkAlQtI3jcwfrOscXuCs7OzreRvgMJFRBrVEC6/ aohRJZGuXHCg== X-IronPort-AV: E=Sophos;i="5.77,351,1596524400"; d="scan'208";a="528515588" Received: from dhunt5-mobl5.ger.corp.intel.com (HELO [10.252.33.45]) ([10.252.33.45]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2020 07:32:23 -0700 To: Lukasz Wojciechowski , Bruce Richardson Cc: dev@dpdk.org, stable@dpdk.org References: <20200925224209.12173-1-l.wojciechow@partner.samsung.com> <20201008052323.11547-1-l.wojciechow@partner.samsung.com> <20201008052323.11547-8-l.wojciechow@partner.samsung.com> From: David Hunt Message-ID: <8c050f3c-ab04-a019-90dc-14fa6a7c0a40@intel.com> Date: Thu, 8 Oct 2020 15:32:19 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20201008052323.11547-8-l.wojciechow@partner.samsung.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [dpdk-stable] [PATCH v5 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" On 8/10/2020 6:23 AM, Lukasz Wojciechowski wrote: > 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 > --- > 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; > } Acked-by: David Hunt