From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id BCFCB1B44A for ; Thu, 22 Nov 2018 15:21:25 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Nov 2018 06:21:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,266,1539673200"; d="scan'208";a="276056267" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga005.jf.intel.com with ESMTP; 22 Nov 2018 06:21:23 -0800 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 22 Nov 2018 06:21:23 -0800 Received: from BGSMSX108.gar.corp.intel.com (10.223.4.192) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 22 Nov 2018 06:21:23 -0800 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.234]) by BGSMSX108.gar.corp.intel.com ([169.254.8.68]) with mapi id 14.03.0415.000; Thu, 22 Nov 2018 19:51:20 +0530 From: "Varghese, Vipin" To: Stephen Hemminger CC: "dev@dpdk.org" , "thomas@monjalon.net" , "Pattan, Reshma" , "Mcnamara, John" , "Byrne, Stephen1" , "Glynn, Michael J" , "Patel, Amol" Thread-Topic: [PATCH v4 4/9] app/procinfo: add support for show port Thread-Index: AQHUdc+zXGOGRZv+60O84dNBN6Pj0KVaZ+QAgAGJjNA= Date: Thu, 22 Nov 2018 14:21:19 +0000 Message-ID: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D2C148D@BGSMSX101.gar.corp.intel.com> References: <20181106124912.40700-1-vipin.varghese@intel.com> <20181106124912.40700-4-vipin.varghese@intel.com> <20181121122200.786ffcd8@xeon-e3> In-Reply-To: <20181121122200.786ffcd8@xeon-e3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMGVmY2M3NzUtYjE0OS00MDg0LTliZjgtNzZlZDM5ZDUwOGI5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUjJQXC8wdGRYcGluN2x5TVcwN1FTRGZvemFqSjRcL21XN010WEIxT09mK3M1dTZ3dHhpVmNyMzEwUmtQSmhOOW82In0= dlp-product: dlpe-windows dlp-version: 11.0.400.15 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 v4 4/9] app/procinfo: add support for show 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, 22 Nov 2018 14:21:26 -0000 >=20 > Minor observations which are things that checkpatch etc won't see but mak= e > the code easier to read/maintain. >=20 > > +/* border variable to hold for show */ char bdr_str[MAX_STRING_LEN]; Done for v5 >=20 > Does this have to be global, could it just be static? >=20 > > + memset(&link, 0, sizeof(link)); > > + memset(&dev_info, 0, sizeof(dev_info)); > > + memset(&queue_info, 0, sizeof(queue_info)); > > + memset(&stats, 0, sizeof(stats)); > > + memset(&rss_conf, 0, sizeof(rss_conf)); >=20 > These memset's should be unnecessary. For example, dev_info is always > cleared already inside rte_eth_dev_info_get(). Done for v5 (link, dev_info, queue_info, stats) >=20 > > + if ((ret) || (rss_conf.rss_key =3D=3D NULL)) > > + continue; >=20 > Unnecessary parenthesis hurt readability in this if statement. done