From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id A2B55293B for ; Sat, 27 Oct 2018 06:42:24 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Oct 2018 21:42:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,430,1534834800"; d="scan'208";a="244768756" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga004.jf.intel.com with ESMTP; 26 Oct 2018 21:42:23 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 26 Oct 2018 21:42:23 -0700 Received: from bgsmsx104.gar.corp.intel.com (10.223.4.190) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 26 Oct 2018 21:42:22 -0700 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.20]) by BGSMSX104.gar.corp.intel.com ([169.254.5.13]) with mapi id 14.03.0415.000; Sat, 27 Oct 2018 10:12:20 +0530 From: "Varghese, Vipin" To: "Pattan, Reshma" , "dev@dpdk.org" , "stephen@networkplumber.org" , "Tahhan, Maryam" CC: "Patel, Amol" , "Tummala, Sivaprasad" , "Byrne, Stephen1" , "Glynn, Michael J" Thread-Topic: [PATCH v2 6/9] app/procinfo: add code for debug crypto Thread-Index: AQHUa2YdUHNelxTskUGntxLz3YvtbaUxJSgAgAFhfZA= Date: Sat, 27 Oct 2018 04:42:19 +0000 Message-ID: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D2B4F8E@BGSMSX101.gar.corp.intel.com> References: <20181023135751.21536-1-vipin.varghese@intel.com> <20181024064805.23197-1-vipin.varghese@intel.com> <20181024064805.23197-6-vipin.varghese@intel.com> <3AEA2BF9852C6F48A459DA490692831F2A3BE6A5@irsmsx110.ger.corp.intel.com> In-Reply-To: <3AEA2BF9852C6F48A459DA490692831F2A3BE6A5@irsmsx110.ger.corp.intel.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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzk2MDQwM2QtMzY2ZS00M2NlLTg4YjEtYmViNTBhNGIyMjk4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiOVBRU3YwcXNJdEl4WDEzTTVyTm40bjJsXC9pcVhSeE56WG1US0RMVVJ6RFNEcTROa0NTNWJSTzZ4RzZ3OUNcL0lKIn0= 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 v2 6/9] app/procinfo: add code for debug crypto 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: Sat, 27 Oct 2018 04:42:25 -0000 Hi, > --- > + struct rte_cryptodev_info dev_info =3D {0}; > + struct rte_cryptodev_stats stats =3D {0}; > + >=20 > Memset for initialization as mentioned in other patch. >=20 Yes, I will correct the same as certain compiler flag combination will trea= t this as incorrect use. > + > +#define DSP_CRYPTO_FLAG(x) do { \ > +printf(" - feature flags\n"); \ > +printf("\t -- symmetric (%c) asymmetric (%c)" \ " symmetric operation > +chaining (%c)\n", \ (x & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO)?'y':'n', \ > +(x & RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO)?'y':'n', \ (x & > +RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING)?'y':'n'); \ printf("\t -- CPU > +SSE (%c) AVX (%c) AVX2 (%c) AVX512 (%c)\n", \ (x & > +RTE_CRYPTODEV_FF_CPU_SSE)?'y':'n', \ (x & > +RTE_CRYPTODEV_FF_CPU_AVX)?'y':'n', \ (x & > +RTE_CRYPTODEV_FF_CPU_AVX2)?'y':'n', \ (x & > +RTE_CRYPTODEV_FF_CPU_AVX512)?'y':'n'); \ printf("\t -- Acclerate CPU > +AESNI (%c) HW (%c)\n", \ (x & RTE_CRYPTODEV_FF_CPU_AESNI)?'y':'n', \ (x > +& RTE_CRYPTODEV_FF_HW_ACCELERATED)?'y':'n'); \ printf("\t -- INLINE > +(%c)\n", \ (x & RTE_CRYPTODEV_FF_SECURITY)?'y':'n'); \ printf("\t -- > +ARM NEON (%c) CE (%c)\n", \ (x & RTE_CRYPTODEV_FF_CPU_NEON)?'y':'n', \ > +(x & RTE_CRYPTODEV_FF_CPU_ARM_CE)?'y':'n'); \ printf(" - buffer > +offload\n"); \ printf("\t -- IN_PLACE_SGL (%c)\n", \ (x & > +RTE_CRYPTODEV_FF_IN_PLACE_SGL)?'y':'n'); \ printf("\t -- > +OOP_SGL_IN_SGL_OUT (%c)\n", \ (x & > +RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)?'y':'n'); \ printf("\t -- > +OOP_SGL_IN_LB_OUT (%c)\n", \ (x & > +RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT)?'y':'n'); \ printf("\t -- > +OOP_LB_IN_SGL_OUT (%c)\n", \ (x & > +RTE_CRYPTODEV_FF_OOP_LB_IN_SGL_OUT)?'y':'n'); \ printf("\t -- > +OOP_LB_IN_LB_OUT (%c)\n", \ (x & > +RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT)?'y':'n'); \ } while (0) >=20 > This is a very big macro, better have static function for this instead of= macro. >=20 There are two thoughts in choosing MACRO over function. 1. The information need to display in certain format within the same contex= t.=20 2. As the API are modified, co locating all at same scope is easier to clea= n up and correct in future. So I feel use of MACRO over function in this instance.