From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Varghese, Vipin" Subject: Re: [PATCH v4 4/9] app/procinfo: add support for show port 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" , "thomas@monjalon.net" , "Pattan, Reshma" , "Mcnamara, John" , "Byrne, Stephen1" , "Glynn, Michael J" , "Patel, Amol" To: Stephen Hemminger 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) In-Reply-To: <20181121122200.786ffcd8@xeon-e3> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" >=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