From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Verma, Shally" Subject: Re: [v2, 2/3] cryptodev: support session private data setting Date: Fri, 20 Apr 2018 12:23:17 +0000 Message-ID: References: <1523861696-103397-1-git-send-email-abhinandan.gujjar@intel.com> <1523861696-103397-2-git-send-email-abhinandan.gujjar@intel.com> <5612CB344B05EE4F95FC5B729939F780706F0302@PGSMSX106.gar.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "Vangati, Narender" , "Rao, Nikhil" To: "Gujjar, Abhinandan S" , "De Lara Guarch, Pablo" , "Doherty, Declan" , "Jacob, Jerin" , "hemant.agrawal@nxp.com" , "akhil.goyal@nxp.com" , "dev@dpdk.org" Return-path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0064.outbound.protection.outlook.com [104.47.42.64]) by dpdk.org (Postfix) with ESMTP id 0CFCE7D09 for ; Fri, 20 Apr 2018 14:23:20 +0200 (CEST) In-Reply-To: <5612CB344B05EE4F95FC5B729939F780706F0302@PGSMSX106.gar.corp.intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" //snip >> >+int __rte_experimental >> >+rte_cryptodev_sym_session_set_private_data( >> >+ struct rte_cryptodev_sym_session >> *sess, >> >+ void *data, >> >+ uint16_t size) >> >+{ >> >+ uint16_t off_set =3D sizeof(void *) * nb_drivers; >> >+ uint8_t *private_data_present =3D (uint8_t *)sess + off_set; >> >> [Shally] I was going through this in context of crypto event adapter an= d realize >> probably it is safer to set priv_data_size after (sess =3D=3D NULL) chec= k. >> Same is applicable in get_private_data(). >[Abhinandan] I guess you are pointing *private_data_present* which is calc= ulated prior, it will not be used if the sess is NULL. > Oh. Ya . sorry I missed that. //snip Thanks Shally