From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 0D8061B10C for ; Thu, 25 Oct 2018 17:38:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Oct 2018 08:38:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,424,1534834800"; d="scan'208";a="102448315" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga001.fm.intel.com with ESMTP; 25 Oct 2018 08:38:28 -0700 Received: from irsmsx110.ger.corp.intel.com ([169.254.15.182]) by IRSMSX103.ger.corp.intel.com ([169.254.3.248]) with mapi id 14.03.0319.002; Thu, 25 Oct 2018 16:38:27 +0100 From: "Pattan, Reshma" To: "Varghese, Vipin" , "dev@dpdk.org" , "Tahhan, Maryam" CC: "Patel, Amol" , "Tummala, Sivaprasad" , "Byrne, Stephen1" , "Glynn, Michael J" Thread-Topic: [PATCH v1 4/9] app/procinfo: add code for debug port Thread-Index: AQHUatj6WKdY/4bj3UWV2IIAn3PAi6UwFsHw Date: Thu, 25 Oct 2018 15:38:26 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831F2A3BE0A7@irsmsx110.ger.corp.intel.com> References: <20181023135751.21536-1-vipin.varghese@intel.com> <20181023135751.21536-4-vipin.varghese@intel.com> In-Reply-To: <20181023135751.21536-4-vipin.varghese@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v1 4/9] app/procinfo: add code for debug port 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: Thu, 25 Oct 2018 15:38:30 -0000 > -----Original Message----- > From: Varghese, Vipin > Sent: Tuesday, October 23, 2018 2:58 PM > To: dev@dpdk.org; Tahhan, Maryam ; Pattan, > Reshma > Cc: Patel, Amol ; Tummala, Sivaprasad > ; Byrne, Stephen1 > ; Glynn, Michael J > ; Varghese, Vipin > Subject: [PATCH v1 4/9] app/procinfo: add code for debug port >=20 > Function debug_port is used for displaying the port PMD under the primary > process. This covers basic and per queue configuration. >=20 > Signed-off-by: Vipin Varghese > --- > app/proc-info/main.c | 113 > ++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 112 insertions(+), 1 deletion(-) >=20 > diff --git a/app/proc-info/main.c b/app/proc-info/main.c index > 5511fcb71..668f7febf 100644 > --- a/app/proc-info/main.c > +++ b/app/proc-info/main.c > @@ -29,6 +29,9 @@ > #include > #include > #include > +#include > +#include > +#include >=20 > /* Maximum long option length for option parsing. */ #define > MAX_LONG_OPT_SZ 64 @@ -40,6 +43,8 @@ #define STATS_BDR_STR(w, s) > printf("%.*s%s%.*s\n", w, \ > STATS_BDR_FMT, s, w, STATS_BDR_FMT) >=20 > +char bdr_str[100]; #define for marco size would be good. Instead of hard code. > + > + snprintf(bdr_str, 100, " debug - Port PMD %"PRIu64, rte_get_tsc_hz()); > + STATS_BDR_STR(10, bdr_str); > + > + RTE_ETH_FOREACH_DEV(i) { > + uint16_t mtu =3D 0; > + struct rte_eth_link link =3D {0}; Initialize structs using memset here and in other places. > + > + for (j =3D 0; j < dev_info.nb_rx_queues; j++) { > + > + ret =3D rte_eth_dev_rss_hash_conf_get(i, &rss_conf); > + if ((ret) || (rss_conf.rss_key =3D=3D NULL)) > + continue; > + > + printf("\t -- RSS len %u key (hex):", > + rss_conf.rss_key_len); > + for (k =3D 0; k < rss_conf.rss_key_len; k++) > + printf(" %x", rss_conf.rss_key[k]); > + printf("\t -- hf 0x%"PRIx64"\n", > + rss_conf.rss_hf); Is this per port? not per queue. Can this be moved to outside of the queue = for loop. > + } > + > + printf(" - drop packet information\n"); Printf heading can be changed as it is printing input and output packets al= so. > + ret =3D rte_eth_stats_get(i, &stats); > + if (ret =3D=3D 0) { > + printf("\t -- input %"PRIu64 > + " output %"PRIu64"\n", > + stats.ipackets, > + stats.opackets);