From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id B980F1B5A4 for ; Fri, 23 Nov 2018 15:57:29 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Nov 2018 06:57:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,270,1539673200"; d="scan'208";a="94343163" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga008.jf.intel.com with ESMTP; 23 Nov 2018 06:57:27 -0800 Received: from irsmsx110.ger.corp.intel.com ([169.254.15.20]) by IRSMSX104.ger.corp.intel.com ([169.254.5.131]) with mapi id 14.03.0415.000; Fri, 23 Nov 2018 14:57:26 +0000 From: "Pattan, Reshma" To: "Varghese, Vipin" , "dev@dpdk.org" , "thomas@monjalon.net" , "stephen@networkplumber.org" , "Mcnamara, John" CC: "Byrne, Stephen1" , "Glynn, Michael J" , "Patel, Amol" Thread-Topic: [PATCH v4 5/9] app/procinfo: add support for show tm Thread-Index: AQHUdc+0V50cegGGF0+pwf8ISnNk1KVaYNkQgAGB+ACAAXKYMIAAIA4AgAAAWPCAAAcAgIAAEE3w Date: Fri, 23 Nov 2018 14:57:26 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831F2A3D62FB@irsmsx110.ger.corp.intel.com> References: <20181106124912.40700-1-vipin.varghese@intel.com> <20181106124912.40700-5-vipin.varghese@intel.com> <3AEA2BF9852C6F48A459DA490692831F2A3D58A3@irsmsx110.ger.corp.intel.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D2C1435@BGSMSX101.gar.corp.intel.com> <3AEA2BF9852C6F48A459DA490692831F2A3D61A6@irsmsx110.ger.corp.intel.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D2C1A45@BGSMSX101.gar.corp.intel.com> <3AEA2BF9852C6F48A459DA490692831F2A3D6264@irsmsx110.ger.corp.intel.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D2C1A79@BGSMSX101.gar.corp.intel.com> In-Reply-To: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D2C1A79@BGSMSX101.gar.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2Q5MmRlYjMtMDM5OS00M2FmLWI2MmEtNDRiNjg5OWU3OWI4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidjVPTDVwN1NhYVAzRzB1QUQxYUZPVWk1V21aejhVQUxJWXd1QlJnWWVcL2RlU1VRcGZTZVpJTDFYSXdacXF0T1cifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 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 v4 5/9] app/procinfo: add support for show tm 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: Fri, 23 Nov 2018 14:57:30 -0000 > -----Original Message----- > From: Varghese, Vipin > Sent: Friday, November 23, 2018 1:56 PM > To: Pattan, Reshma ; dev@dpdk.org; > thomas@monjalon.net; stephen@networkplumber.org; Mcnamara, John > > Cc: Byrne, Stephen1 ; Glynn, Michael J > ; Patel, Amol > Subject: RE: [PATCH v4 5/9] app/procinfo: add support for show tm >=20 >=20 >=20 > > -----Original Message----- > > From: Pattan, Reshma > > Sent: Friday, November 23, 2018 7:04 PM > > To: Varghese, Vipin ; dev@dpdk.org; > > thomas@monjalon.net; stephen@networkplumber.org; Mcnamara, John > > > > Cc: Byrne, Stephen1 ; Glynn, Michael J > > ; Patel, Amol > > Subject: RE: [PATCH v4 5/9] app/procinfo: add support for show tm > > > > > > > > > -----Original Message----- > > > From: Varghese, Vipin > > > Sent: Friday, November 23, 2018 1:29 PM > > > To: Pattan, Reshma ; dev@dpdk.org; > > > thomas@monjalon.net; stephen@networkplumber.org; Mcnamara, John > > > > > > Cc: Byrne, Stephen1 ; Glynn, Michael J > > > ; Patel, Amol > > > Subject: RE: [PATCH v4 5/9] app/procinfo: add support for show tm > > > > > > > > > > -----Original Message----- > > > > From: Pattan, Reshma > > > > Sent: Friday, November 23, 2018 5:21 PM > > > > To: Varghese, Vipin ; dev@dpdk.org; > > > > thomas@monjalon.net; stephen@networkplumber.org; Mcnamara, John > > > > > > > > Cc: Byrne, Stephen1 ; Glynn, Michael J > > > > ; Patel, Amol > > > > Subject: RE: [PATCH v4 5/9] app/procinfo: add support for show tm > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Varghese, Vipin > > > > > Sent: Thursday, November 22, 2018 1:28 PM > > > > > To: Pattan, Reshma ; dev@dpdk.org; > > > > > thomas@monjalon.net; stephen@networkplumber.org; Mcnamara, John > > > > > > > > > > Cc: Byrne, Stephen1 ; Glynn, Michael J > > > > > ; Patel, Amol > > > > > Subject: RE: [PATCH v4 5/9] app/procinfo: add support for show > > > > > tm > > > > > > > > > > Hi Reshma, > > > > > > > > > > > > > > > > > > > > > > > > > > > > + if ((ret) | (!is_leaf)) > > > > > > > + > > > > > > > > > > > > Is the operator here should be || ? > > > > > > > > > > > > > > > > > > > > > > Check is done for 'if either ret is not 0 or if it ret is 0 but > > > > > not leaf' we skip leaf details print. If 'ret is 0 and is leaf' > > > > > we skip continue to print > > > > leaf details. > > > > > > > > IMO, using logical operator over bitwise operator is good here in > > > > if statement > > > . > > > > Like below.? > > > > > > > > If (ret || (is_leaf =3D=3D 0 )) > > > > > > Thanks for the information, if the logic is correct do I need to > > > change for v6 > > > > > > > OK in v6, but you can wait to hear more comments from others if any > > before sending v6 . >=20 > Ok thanks Reshma, but can you tell me how the earlier logic fails and run= s slow > compared to logical or? Not about faster or slower.=20 Logical operators are commonly used in decision making in C programming.=20 Bitwise operators are used in C programming to perform bit-level operations= . Since , above if condition is for decision making here logical || operator = will fit , so I am suggesting to use that.=20 We don't need to do any bitwise manipulation in if condition to make the d= ecision, so bitwise | operator is not needed