Message ID | 20180504201209.2964-1-dashel@microsoft.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Thomas Monjalon |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7BBF12B82; Fri, 4 May 2018 22:12:23 +0200 (CEST) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0102.outbound.protection.outlook.com [104.47.38.102]) by dpdk.org (Postfix) with ESMTP id 935B52952 for <dev@dpdk.org>; Fri, 4 May 2018 22:12:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=4MgilUM1+xvP3laGeWCAtgd6DY59BTUD8AnL1RCmzPQ=; b=Uwg00p+yKtqDNiKyEGknq+a+vAvB1T5Cwx5UmPP/BbN16OJpJpYJ0Ov+e5hnKupq0WtD4JBFH5Ex2YsAmk00nlZvChJZ7jPySYw02EfEngiL9IYF52j0cP8uKLc+MSMN9VDvQMsRALeO2nnuPMcYr/cZ0i2sR6yL5blahr9aZDU= Received: from MW2PR2101MB1017.namprd21.prod.outlook.com (52.132.146.30) by MW2PR2101MB1098.namprd21.prod.outlook.com (52.132.149.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.755.0; Fri, 4 May 2018 20:12:19 +0000 Received: from MW2PR2101MB1017.namprd21.prod.outlook.com ([fe80::3d0b:204b:4c9:82ee]) by MW2PR2101MB1017.namprd21.prod.outlook.com ([fe80::3d0b:204b:4c9:82ee%4]) with mapi id 15.20.0755.014; Fri, 4 May 2018 20:12:19 +0000 From: Daniel Shelepov <dashel@microsoft.com> To: "wenzhuo.lu@intel.com" <wenzhuo.lu@intel.com>, "jingjing.wu@intel.com" <jingjing.wu@intel.com> CC: "dev@dpdk.org" <dev@dpdk.org>, Daniel Shelepov <dashel@microsoft.com> Thread-Topic: [PATCH] app/testpmd: fix burst stat reporting Thread-Index: AQHT4+Q0gG+VksHpkUmIkIqcG/aK5A== Date: Fri, 4 May 2018 20:12:19 +0000 Message-ID: <20180504201209.2964-1-dashel@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: CY4PR19CA0027.namprd19.prod.outlook.com (2603:10b6:903:103::13) To MW2PR2101MB1017.namprd21.prod.outlook.com (2603:10b6:302:4::30) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [2001:4898:80e8:f::416] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; MW2PR2101MB1098; 7:ZH+23LQlTLtnccVep3g3NgXNvIOqybN4svJRexYN/NU9rjinwFz/LQ0eb4QQni/UDHKmsY49UTvGAyiZZq9Rg+1kA96XSkbI/qZ8E9cLOYi3b+UXPzIWk94ceBi9hN2TjjugmKhQo5vBaywnAxvyk+/ppVfFXklgiP16eRz0TEfazACaKz/ImUJoKAoEb4NNcpK9VuGk9ZRfFYB5YYH8/g076Y149nvFJoP8vguDSeg9Io7xXAL2mju7Inzx7Z2c; 20:HW6qHGIm3DjY8Fyl4SCOOEAoQ+jHMOsuPUjNso/0S7Vh3pglYysX15Bi91aqn70/Dt99d+O7Dwi4t6RyfqpEMrUHEdB91JOm9TcDzMWD+LcafRnAC2oaoxZUnc9O2YgbcJZTV8CnufZ7qiylAb1mfF7rSUW6hZSVT5dp8qyf504= x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(48565401081)(2017052603328)(7193020); SRVR:MW2PR2101MB1098; x-ms-traffictypediagnostic: MW2PR2101MB1098: x-microsoft-antispam-prvs: <MW2PR2101MB1098B5C72A34BFD60C69AA08D6860@MW2PR2101MB1098.namprd21.prod.outlook.com> x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(211171220733660); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231254)(2018427008)(944501410)(52105095)(10201501046)(6055026)(149012)(150012)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:MW2PR2101MB1098; BCL:0; PCL:0; RULEID:; SRVR:MW2PR2101MB1098; x-forefront-prvs: 06628F7CA4 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(39380400002)(396003)(39860400002)(366004)(376002)(199004)(189003)(305945005)(7736002)(53936002)(105586002)(22452003)(14454004)(10090500001)(186003)(386003)(59450400001)(6346003)(316002)(102836004)(6512007)(54906003)(6506007)(110136005)(5660300001)(2501003)(3280700002)(81166006)(6486002)(86362001)(81156014)(2906002)(1857600001)(5250100002)(8936002)(6116002)(476003)(86612001)(1076002)(46003)(486006)(68736007)(2616005)(8676002)(2900100001)(6436002)(52116002)(3660700001)(97736004)(10290500003)(478600001)(106356001)(25786009)(107886003)(99286004)(4326008)(36756003)(22906009); DIR:OUT; SFP:1102; SCL:1; SRVR:MW2PR2101MB1098; H:MW2PR2101MB1017.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=dashel@microsoft.com; x-microsoft-antispam-message-info: JygqKVYcG1iQCRatgiP7a8YLVjVYpvURTet4qe8XZt+gg2ztpb0nnYpQwk3CG1asrjsbI0uCOWYbxAaC1pYD+Wzip6hEwwumfEXJhKgPKyU7bE4ZlB88VDX9vaFYEoLwQ2WSEvkIVIfHytNqfGiBVSdhjSnELdqGkmKrA04k4JBZjLou9jnLulKzaIqpH3Zq spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 81a0ca54-664c-4713-0b4f-08d5b1fb5690 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 81a0ca54-664c-4713-0b4f-08d5b1fb5690 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 May 2018 20:12:19.2794 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR2101MB1098 Subject: [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 <dev.dpdk.org> List-Unsubscribe: <https://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/Intel-compilation | success | Compilation OK |
Commit Message
Daniel Shelepov
May 4, 2018, 8:12 p.m. UTC
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 finding the top-2. During the scan of burst size counts, the
top-2 can change only if top-1 also changes.
Added logic to update the top-2 if current burst size is larger than
existing top-2, but smaller than existing top-1.
Signed-off-by: Daniel Shelepov <dashel@microsoft.com>
---
app/test-pmd/testpmd.c | 3 +++
1 file changed, 3 insertions(+)
Comments
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 <wenzhuo.lu@intel.com>; Wu, Jingjing > <jingjing.wu@intel.com> > Cc: dev@dpdk.org; Daniel Shelepov <dashel@microsoft.com> > Subject: [dpdk-dev] [PATCH] app/testpmd: fix burst stat reporting > > 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 finding > the top-2. During the scan of burst size counts, the > top-2 can change only if top-1 also changes. > > Added logic to update the top-2 if current burst size is larger than existing > top-2, but smaller than existing top-1. Could you add a fixes line. > > Signed-off-by: Daniel Shelepov <dashel@microsoft.com> > --- > app/test-pmd/testpmd.c | 3 +++ > 1 file changed, 3 insertions(+) > > 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] = pktnb_stats[0]; > burst_stats[0] = nb_burst; > pktnb_stats[0] = nb_pkt; > + } else if (nb_burst > burst_stats[1]) { > + burst_stats[1] = nb_burst; > + pktnb_stats[1] = nb_pkt; > } > } > if (total_burst == 0) > -- > 2.15.1.gvfs.2.39.g03d366a Regards, Bernard
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] = pktnb_stats[0]; burst_stats[0] = nb_burst; pktnb_stats[0] = nb_pkt; + } else if (nb_burst > burst_stats[1]) { + burst_stats[1] = nb_burst; + pktnb_stats[1] = nb_pkt; } } if (total_burst == 0)