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 A7BF0A0471 for ; Wed, 17 Jul 2019 17:31:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 97F691BE19; Wed, 17 Jul 2019 17:31:00 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id D20361BE0C; Wed, 17 Jul 2019 17:30:58 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2019 08:30:56 -0700 X-IronPort-AV: E=Sophos;i="5.64,274,1559545200"; d="scan'208";a="251521089" Received: from dhunt5-mobl4.ger.corp.intel.com (HELO [10.237.221.141]) ([10.237.221.141]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/AES256-SHA; 17 Jul 2019 08:30:55 -0700 To: Harman Kalra , "thomas@monjalon.net" , "ferruh.yigit@linux.intel.com" Cc: "dev@dpdk.org" , Jerin Jacob Kollanukkaran , "stable@dpdk.org" References: <223181000.veHZD1QNU4@xps> <1562321046-25195-1-git-send-email-hkalra@marvell.com> From: "Hunt, David" Message-ID: <1a4c963a-6d89-7c42-905b-afc71366f460@intel.com> Date: Wed, 17 Jul 2019 16:30:53 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <1562321046-25195-1-git-send-email-hkalra@marvell.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v3 1/2] test/distributor: fix flush with worker shutdown test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Harman, On 05/07/2019 11:05, Harman Kalra wrote: > On restarting worker 0 after shutdown, packets handled by > worker 0 must be incremented only when a packet is received by > it. > > Fixes: c3eabff124e6 ("distributor: add unit tests") > Cc: stable@dpdk.org > > Signed-off-by: Harman Kalra > --- > app/test/test_distributor.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c > index 8084c0794..5d71bf87c 100644 > --- a/app/test/test_distributor.c > +++ b/app/test/test_distributor.c > @@ -374,7 +374,8 @@ handle_work_for_shutdown_test(void *arg) > id, buf, buf, num); > > while (!quit) { > - worker_stats[id].handled_packets++, count++; > + worker_stats[id].handled_packets += num; > + count += num; > rte_pktmbuf_free(pkt); > num = rte_distributor_get_pkt(d, id, buf, buf, num); > } Change makes sense. Builds OK, Runs OK, test passes. Acked-by: David Hunt