From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id A71401B505 for ; Mon, 17 Dec 2018 21:29:53 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Dec 2018 12:29:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,366,1539673200"; d="scan'208";a="110183031" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga008.fm.intel.com with ESMTP; 17 Dec 2018 12:29:52 -0800 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.237]) by IRSMSX103.ger.corp.intel.com ([169.254.3.157]) with mapi id 14.03.0415.000; Mon, 17 Dec 2018 20:29:51 +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: AQHUkT01LGFS3zvTKkeGnsj9OPDBYKWDZbJA Date: Mon, 17 Dec 2018 20:29:51 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B435896A4029@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> In-Reply-To: <20181211103402.81914-3-roy.fan.zhang@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.180] 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: Mon, 17 Dec 2018 20:29:56 -0000 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 session st= ructure >=20 > This patch changes the symmetric session structure of cryptodev. > The symmetric session now contains extra information for secure > access purposes. The patch also includes the updates to the > PMDs, test applications, and examples to fit the change. >=20 > Signed-off-by: Fan Zhang > --- >=20 //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; >=20 > index =3D dev->driver_id; > + if (index > sess->nb_drivers) > + return -EINVAL; [Fiona] This should be <=3D > - > 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=20 now contains more than just a flag > * 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 sess= ion? Doesn't seem right?