From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 4FE011BAD3 for ; Fri, 11 May 2018 13:18:22 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 May 2018 04:18:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,388,1520924400"; d="scan'208";a="50041225" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga003.jf.intel.com with ESMTP; 11 May 2018 04:18:20 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.150]) by IRSMSX102.ger.corp.intel.com ([169.254.2.83]) with mapi id 14.03.0319.002; Fri, 11 May 2018 12:18:19 +0100 From: "Iremonger, Bernard" To: Daniel Shelepov , "Lu, Wenzhuo" , "Wu, Jingjing" CC: "dev@dpdk.org" Thread-Topic: [PATCH] app/testpmd: fix burst stat reporting Thread-Index: AQHT4+Q0gG+VksHpkUmIkIqcG/aK5KQqaz6g Date: Fri, 11 May 2018 11:18:18 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C24E0CA1D8@IRSMSX108.ger.corp.intel.com> References: <20180504201209.2964-1-dashel@microsoft.com> In-Reply-To: <20180504201209.2964-1-dashel@microsoft.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMmQxOTJmMTYtZTFlMS00ZjNiLWIzNTgtMzVmZWRlOGNiNjEzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJRcVwvMHRFc3kzMlFieDFidW9CNnFSeXJ1Y2dSNmJzS0V1RWp6c05zWTFrNlJnaTJHbXlsb0tOVjJJN2Q1eWtRRiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix burst stat reporting 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: , X-List-Received-Date: Fri, 11 May 2018 11:18:22 -0000 Hi Daniel, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Daniel Shelepov > Sent: Friday, May 4, 2018 9:12 PM > To: Lu, Wenzhuo ; Wu, Jingjing > > Cc: dev@dpdk.org; Daniel Shelepov > Subject: [dpdk-dev] [PATCH] app/testpmd: fix burst stat reporting >=20 > When RTE_TEST_PMD_RECORD_BURST_STATS is enabled, testpmd collects > burst statistics and includes them in the port stats report. The summary > should include top 2 most frequent burst sizes, but there is a bug in fin= ding > the top-2. During the scan of burst size counts, the > top-2 can change only if top-1 also changes. >=20 > Added logic to update the top-2 if current burst size is larger than exis= ting > top-2, but smaller than existing top-1. Could you add a fixes line. >=20 > Signed-off-by: Daniel Shelepov > --- > app/test-pmd/testpmd.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > db23f23e5..cc38e51fc 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -927,6 +927,9 @@ pkt_burst_stats_display(const char *rx_tx, struct > pkt_burst_stats *pbs) > pktnb_stats[1] =3D pktnb_stats[0]; > burst_stats[0] =3D nb_burst; > pktnb_stats[0] =3D nb_pkt; > + } else if (nb_burst > burst_stats[1]) { > + burst_stats[1] =3D nb_burst; > + pktnb_stats[1] =3D nb_pkt; > } > } > if (total_burst =3D=3D 0) > -- > 2.15.1.gvfs.2.39.g03d366a Regards, Bernard