From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5FB8C7618F for ; Wed, 17 Jul 2019 15:31:01 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 7677B2173B for ; Wed, 17 Jul 2019 15:31:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7677B2173B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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