From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A341BA09E4 for ; Thu, 28 Jan 2021 17:46:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B8570188A07; Thu, 28 Jan 2021 17:46:22 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 99BAD4067A; Thu, 28 Jan 2021 17:46:19 +0100 (CET) IronPort-SDR: LztzJkuvm47scFuzEjv/26VKUwpKkwIxY/Rb3WLVNDF0IaWcff2SXwuRvEm8WIg6yyWJX0hZzO WtM+o5AoBL4w== X-IronPort-AV: E=McAfee;i="6000,8403,9878"; a="241792047" X-IronPort-AV: E=Sophos;i="5.79,383,1602572400"; d="scan'208";a="241792047" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2021 08:46:18 -0800 IronPort-SDR: L0KYRNHz3nRz1IrATVAvIBYojueCHF418MtlZ4vKYnMaUT68ONGEFXkr5vh6yCDxnNCC9a9xoM UAbT6yqQSxvw== X-IronPort-AV: E=Sophos;i="5.79,383,1602572400"; d="scan'208";a="363841386" Received: from dhunt5-mobl5.ger.corp.intel.com (HELO [10.213.226.4]) ([10.213.226.4]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2021 08:46:16 -0800 To: Lukasz Wojciechowski , Bruce Richardson , David Marchand Cc: dev@dpdk.org, stable@dpdk.org References: <20210119035910.8324-1-l.wojciechow@partner.samsung.com> <20210119035910.8324-2-l.wojciechow@partner.samsung.com> From: David Hunt Message-ID: <51558b31-018f-98ae-53e6-9494ebe02b7a@intel.com> Date: Thu, 28 Jan 2021 16:46:14 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <20210119035910.8324-2-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 v1 1/1] test/distributor: prevent return buffer overload X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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" Hi Lukasz, On 19/1/2021 3:59 AM, Lukasz Wojciechowski wrote: > The distributor library implementation uses a cyclic queue to store > packets returned from workers. These packets can be later collected > with rte_distributor_returned_pkts() call. > However the queue has limited capacity. It is able to contain only > 127 packets (RTE_DISTRIB_RETURNS_MASK). > > Big burst tests sent 1024 packets in 32 packets bursts without waiting > until they are processed by the distributor. In case when tests were > run with big number of worker threads, it happened that more than > 127 packets were returned from workers and put into cyclic queue. > This caused packets to be dropped by the queue, making them impossible > to be collected later with rte_distributor_returned_pkts() calls. > However the test waited for all packets to be returned infinitely. > > This patch fixes the big burst test by not allowing more than > queue capacity packets to be processed at the same time, making > impossible to drop any packets. > It also cleans up duplicated code in the same test. > > Bugzilla ID: 612 > Fixes: c0de0eb82e40 ("distributor: switch over to new API") > Cc: david.hunt@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Lukasz Wojciechowski > --- This patch cleans up the code nicely, and it makes sense to return packets in the do..while. LGTM. Reviewed-by: David Hunt