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 989DAA3201 for ; Mon, 21 Oct 2019 05:29:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0A20B29C6; Mon, 21 Oct 2019 05:29:14 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 8584A29AC for ; Mon, 21 Oct 2019 05:29:11 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Oct 2019 20:29:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,322,1566889200"; d="scan'208";a="397197887" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga005.fm.intel.com with ESMTP; 20 Oct 2019 20:29:10 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 20 Oct 2019 20:29:10 -0700 Received: from BGSMSX108.gar.corp.intel.com (10.223.4.192) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 20 Oct 2019 20:29:10 -0700 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.199]) by BGSMSX108.gar.corp.intel.com ([169.254.8.14]) with mapi id 14.03.0439.000; Mon, 21 Oct 2019 08:59:09 +0530 From: "Varghese, Vipin" To: "pbhagavatula@marvell.com" , "jerinj@marvell.com" , "Richardson, Bruce" , "hemant.agrawal@nxp.com" , Thomas Monjalon , "Kovacevic, Marko" , Ori Kam , "Nicolau, Radu" , Akhil Goyal , "Kantecki, Tomasz" , Sunil Kumar Kori CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v6 01/10] examples/l2fwd-event: add default poll mode routines Thread-Index: AQHVgrx7s88r5gBVqkKwnbAM+TfCj6dkeSCQ Date: Mon, 21 Oct 2019 03:29:08 +0000 Message-ID: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D3DCA8C@BGSMSX101.gar.corp.intel.com> References: <20191002205754.11746-1-pbhagavatula@marvell.com> <20191014182247.961-1-pbhagavatula@marvell.com> <20191014182247.961-2-pbhagavatula@marvell.com> In-Reply-To: <20191014182247.961-2-pbhagavatula@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjEzZTQxNmItZTVmOC00MjIwLTlhYmUtYWRmZTVkOWM0ZDg0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVlZpb1NwaUR6UUwzQjBzUWFrb3dnckx2dUQrVytXMHp5YzZCUUU3bVZBXC9aQ1R3U1M2OEl2eUJwSWltY1NwNDUifQ== dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v6 01/10] examples/l2fwd-event: add default poll mode routines 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 Pavan, snipped > + > +/* Print out statistics on packets dropped */ void print_stats(struct > +l2fwd_resources *rsrc) { > + uint64_t total_packets_dropped, total_packets_tx, total_packets_rx; > + uint32_t port_id; > + > + total_packets_dropped =3D 0; > + total_packets_tx =3D 0; > + total_packets_rx =3D 0; > + > + const char clr[] =3D {27, '[', '2', 'J', '\0' }; > + const char topLeft[] =3D {27, '[', '1', ';', '1', 'H', '\0' }; > + > + /* Clear screen and move to top left */ > + printf("%s%s", clr, topLeft); > + > + printf("\nPort statistics =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D"); > + > + for (port_id =3D 0; port_id < RTE_MAX_ETHPORTS; port_id++) { > + /* skip disabled ports */ > + if ((rsrc->enabled_port_mask & (1 << port_id)) =3D=3D 0) > + continue; > + printf("\nStatistics for port %u ------------------------------" > + "\nPackets sent: %24"PRIu64 > + "\nPackets received: %20"PRIu64 > + "\nPackets dropped: %21"PRIu64, > + port_id, > + rsrc->port_stats[port_id].tx, > + rsrc->port_stats[port_id].rx, > + rsrc->port_stats[port_id].dropped); > + > + total_packets_dropped +=3D > + rsrc->port_stats[port_id].dropped; > + total_packets_tx +=3D rsrc->port_stats[port_id].tx; > + total_packets_rx +=3D rsrc->port_stats[port_id].rx; > + } > + printf("\nAggregate statistics =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D" > + "\nTotal packets sent: %18"PRIu64 > + "\nTotal packets received: %14"PRIu64 > + "\nTotal packets dropped: %15"PRIu64, > + total_packets_tx, > + total_packets_rx, > + total_packets_dropped); > + > printf("\n=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > =3D=3D=3D=3D\n"); > +} Would not it be useful to in co-operate Eventdev stats and RX-TX event adap= ter stats? So one can see drops at each stage as `RX ports-queues stats =3D=3D> RX event adapter =3D=3D> Eventdev =3D=3D> TX= adapter =3D=3D> TX ports-queues stats` snipped