From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 768391B01F for ; Wed, 10 Jan 2018 13:47:25 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jan 2018 04:47:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,340,1511856000"; d="scan'208";a="18136871" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by FMSMGA003.fm.intel.com with ESMTP; 10 Jan 2018 04:47:23 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.167]) by IRSMSX106.ger.corp.intel.com ([169.254.8.36]) with mapi id 14.03.0319.002; Wed, 10 Jan 2018 12:47:22 +0000 From: "De Lara Guarch, Pablo" To: Akhil Goyal , "dev@dpdk.org" CC: "hemant.agrawal@nxp.com" , "Gonzalez Monroy, Sergio" , "Nicolau, Radu" Thread-Topic: [PATCH] examples/ipsec-secgw: add cryptodev mask option Thread-Index: AQHTdKiPlUN0yCEM402bvVpKgUU406NtNvZw Date: Wed, 10 Jan 2018 12:47:22 +0000 Message-ID: References: <20171214065202.9128-1-akhil.goyal@nxp.com> In-Reply-To: <20171214065202.9128-1-akhil.goyal@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTI2YWZiMTEtYTM5YS00Zjk5LTk4MmQtZWI1NjVmZTU3NGIxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImJ4Z2xsYkhzekgrMTVDaU9sbmw0NWRnTkluQUc3STMxYkFZOFR6SWd4VUU9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 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] examples/ipsec-secgw: add cryptodev mask option 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: Wed, 10 Jan 2018 12:47:25 -0000 Hi Akhil, > -----Original Message----- > From: Akhil Goyal [mailto:akhil.goyal@nxp.com] > Sent: Thursday, December 14, 2017 6:52 AM > To: dev@dpdk.org > Cc: De Lara Guarch, Pablo ; > hemant.agrawal@nxp.com; Gonzalez Monroy, Sergio > ; Nicolau, Radu > ; Akhil Goyal > Subject: [PATCH] examples/ipsec-secgw: add cryptodev mask option >=20 > Previously, ipsec-secgw application did not give user the flexibility to = decide > which crypto device(s) will be used. >=20 > In this patch, a new cryptodev_mask option is added to the application. > Same as portmask, the cryptodev_mask avails the user to mask out the > unwanted crypto devices in the system. >=20 > This patch is similar to the support added in l2fwd-crypto > (d2797f51cc63: examples/l2fwd-crypto: add cryptodev mask option) >=20 > Signed-off-by: Akhil Goyal > --- ... Not sure if you should change the order of the crypto devices that was set = previously (starting from the end and not from the beginning). Shouldn't we keep it as= it was? > idx =3D 0; > - /* Start from last cdev id to give HW priority */ > - for (cdev_id =3D rte_cryptodev_count() - 1; cdev_id >=3D 0; cdev_id--) = { > + for (cdev_id =3D 0; cdev_id < rte_cryptodev_count(); cdev_id++) { > struct rte_cryptodev_info cdev_info; >=20 > + if (check_cryptodev_mask((uint8_t)cdev_id)) > + continue; > + > rte_cryptodev_info_get(cdev_id, &cdev_info); >=20 > if (nb_lcore_params > cdev_info.max_nb_queue_pairs) > -- > 2.9.3 For the rest, I don't have other objections, so apart from the comment abov= e: Acked-by: Pablo de Lara