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 D6C695F0F for ; Tue, 18 Dec 2018 17:32:14 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Dec 2018 08:32:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,368,1539673200"; d="scan'208";a="260473769" Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by orsmga004.jf.intel.com with ESMTP; 18 Dec 2018 08:32:13 -0800 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by IRSMSX108.ger.corp.intel.com (163.33.3.3) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 18 Dec 2018 16:32:12 +0000 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.237]) by irsmsx111.ger.corp.intel.com ([169.254.2.183]) with mapi id 14.03.0415.000; Tue, 18 Dec 2018 16:32:11 +0000 From: "Trahe, Fiona" To: "Zhang, Roy Fan" , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "Ananyev, Konstantin" , "Trahe, Fiona" Thread-Topic: [dpdk-dev] [PATCH v2 2/2] cryptodev: change symmetric session structure Thread-Index: AQHUkT01LGFS3zvTKkeGnsj9OPDBYKWDZbJAgAFUW4CAAAE10A== Date: Tue, 18 Dec 2018 16:32:11 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B435896A4D8C@IRSMSX101.ger.corp.intel.com> References: <20181115172427.67607-1-roy.fan.zhang@intel.com> <20181211103402.81914-1-roy.fan.zhang@intel.com> <20181211103402.81914-3-roy.fan.zhang@intel.com> <348A99DA5F5B7549AA880327E580B435896A4029@IRSMSX101.ger.corp.intel.com> <9F7182E3F746AB4EA17801C148F3C6043351D265@IRSMSX101.ger.corp.intel.com> In-Reply-To: <9F7182E3F746AB4EA17801C148F3C6043351D265@IRSMSX101.ger.corp.intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWMyYzFiZTMtZTczOS00Y2IxLTkxN2QtOGUzOGExNzQzY2JmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZWtFXC9Ta2dDdm5SbWdic0tGditCR3BLb0ppdVNiZXczNExOZW1WUlYrUk9uSUJiOGNWTForOVVMSDljRDUrV3oifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 2/2] cryptodev: change symmetric session structure 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: Tue, 18 Dec 2018 16:32:15 -0000 Hi Fan, > -----Original Message----- > From: Zhang, Roy Fan > Sent: Tuesday, December 18, 2018 9:25 AM > To: Trahe, Fiona ; dev@dpdk.org > Cc: akhil.goyal@nxp.com; Ananyev, Konstantin > Subject: RE: [dpdk-dev] [PATCH v2 2/2] cryptodev: change symmetric sessio= n structure >=20 > Hi Fiona, >=20 > Thanks for the review. Comments inline. >=20 > > -----Original Message----- > > From: Trahe, Fiona > > Sent: Monday, December 17, 2018 8:30 PM > > To: Zhang, Roy Fan ; dev@dpdk.org > > Cc: akhil.goyal@nxp.com; Ananyev, Konstantin > > ; Trahe, Fiona > > Subject: RE: [dpdk-dev] [PATCH v2 2/2] cryptodev: change symmetric sess= ion > > structure > > > > Hi Fan, > > > > > -----Original Message----- > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Fan Zhang > > > Sent: Tuesday, December 11, 2018 3:34 AM > > > To: dev@dpdk.org > > > Cc: akhil.goyal@nxp.com; Ananyev, Konstantin > > > > > > Subject: [dpdk-dev] [PATCH v2 2/2] cryptodev: change symmetric sessio= n > > > structure > > > > > > This patch changes the symmetric session structure of cryptodev. > > > The symmetric session now contains extra information for secure acces= s > > > purposes. The patch also includes the updates to the PMDs, test > > > applications, and examples to fit the change. > > > > > > Signed-off-by: Fan Zhang > > > --- > > > > > > > > > //snip//// > > > int > > > rte_cryptodev_sym_session_init(uint8_t dev_id, > > > struct rte_cryptodev_sym_session *sess, @@ -1160,12 > > +1206,15 @@ > > > rte_cryptodev_sym_session_init(uint8_t dev_id, > > > return -EINVAL; > > > > > > index =3D dev->driver_id; > > > + if (index > sess->nb_drivers) > > > + return -EINVAL; > > [Fiona] This should be <=3D > [Fan] I assume it is >=3D right? [Fiona] oops, yes. > > > > > > > - > > > unsigned int > > > rte_cryptodev_sym_get_header_session_size(void) > > > { > > > /* > > > - * Header contains pointers to the private data > > > + * Header contains all dpointers to the private data > > [Fiona] typo. And comment should be updated as it also now contains mor= e > > than just a flag > [Fan] Will change. Thanks for the catch. > > > > > > > * of all registered drivers, and a flag which > > > * indicates presence of user data > > > */ > > > - return ((sizeof(void *) * nb_drivers) + sizeof(uint8_t)); > > > + struct rte_cryptodev_sym_session s =3D {0}; > > > + s.nb_drivers =3D nb_drivers; > > > + s.user_data_sz =3D 0; > > [Fiona] Why is a get_header_session_size fn initialising fields in the = session? > > Doesn't seem right? >=20 > [Fan] Header session includes the rte_cryptodev_sym_session structure plu= s the extended area to > store session's driver specific private data. This function is used to ob= tain a "safe" session size > (structure itself and the session private data pointers) with existing nb= _drivers up-to-date exclude the > user data size. A temporary sym session variable here is used to pass int= o > rte_cryptodev_sym_session_data_size() function call so the data area size= can be obtained. [Fiona] ok