From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=KDwrHJ0wWk2iv4RxbYEY/fqZeuF0CjOsYE0tltJulMk=; b=fSGzZVyR4O02/7MTxe4rmREXVftuigTiflAadI+m0A86LQA/CsA/3diEsR5Q4FJbRGmb/5DncR5jH65efP+VslLYPn0EaKsJC8ZkTHJp4x/t7hLyY3+zys7mDpNpDcJ+wuyU6MWa3EwXI1EkXvJQMSKpTOCN9JPDLvmzea8m+Tw= Received: from CY4PR0701MB3634.namprd07.prod.outlook.com (52.132.101.164) by CY4PR0701MB3635.namprd07.prod.outlook.com (52.132.102.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.13; Fri, 20 Apr 2018 12:23:18 +0000 Received: from CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::70e9:85be:bc6f:72f]) by CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::70e9:85be:bc6f:72f%13]) with mapi id 15.20.0696.013; Fri, 20 Apr 2018 12:23:18 +0000 From: "Verma, Shally" To: "Gujjar, Abhinandan S" , "De Lara Guarch, Pablo" , "Doherty, Declan" , "Jacob, Jerin" , "hemant.agrawal@nxp.com" , "akhil.goyal@nxp.com" , "dev@dpdk.org" CC: "Vangati, Narender" , "Rao, Nikhil" Thread-Topic: [dpdk-dev] [v2, 2/3] cryptodev: support session private data setting Thread-Index: AQHT1U/SgQXoxcFIu0WmLNe7G57KpKQH8zAAgAGmIgCAAABEQA== 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> In-Reply-To: <5612CB344B05EE4F95FC5B729939F780706F0302@PGSMSX106.gar.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=cavium.com; x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR0701MB3635; 7:4C4sraOvsJaCNll3c4Tnfmbpa4HSX9HdBnLjUW55LvhgNdmM1XNt1ogVZhcuDMJPrQ3LyMO4brfSX5V06m8JmVGsJ5X0L2PMnAHLThGvim/UsVD+Nuuw7ixzlQPs4KChQ6R8rMS7kZcCctL2kH7clXogVndlaLrMGlqokn3cPhYgibHigLcTkyg9A2vb7IF33QrSNOyEQ5Gq3n3RRqnenyBw1JMuaCcOUZSJMGgCzhdOuj6LuqgaYKpdv2IkPkvS x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(376002)(39380400002)(39850400004)(396003)(366004)(346002)(7696005)(74316002)(316002)(6436002)(4326008)(229853002)(446003)(110136005)(8676002)(476003)(72206003)(25786009)(76176011)(93886005)(305945005)(54906003)(6506007)(81166006)(55236004)(102836004)(8936002)(3660700001)(9686003)(7736002)(55016002)(5660300001)(8656006)(3280700002)(26005)(186003)(5250100002)(2501003)(53936002)(2201001)(33656002)(66066001)(478600001)(86362001)(486006)(6116002)(2906002)(2900100001)(11346002)(6246003)(3846002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3635; H:CY4PR0701MB3634.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; MLV:sfv; x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:CY4PR0701MB3635; x-ms-traffictypediagnostic: CY4PR0701MB3635: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231232)(944501393)(52105095)(10201501046)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:CY4PR0701MB3635; BCL:0; PCL:0; RULEID:; SRVR:CY4PR0701MB3635; x-forefront-prvs: 0648FCFFA8 x-microsoft-antispam-message-info: OZLjoFiwKs37AedypWF8NYwc9W7mI4MkXzVzBrxynEbtglFpOMr3tU0pXNTZCOYvke3fO89SM9yfg54hMrmKpWQ+kNUDBWe5yJ9UpuzaM/NacTRUwIy+JcR/3yJAdbXwVW0EnGzwAdE9KXYy3X+4ETeS2R84INKwIh2PlA375VJl7cFdS3BBoZa6aeOvWfwy spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 99b0d11d-4c25-4400-d49a-08d5a6b97f7c X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99b0d11d-4c25-4400-d49a-08d5a6b97f7c X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2018 12:23:18.0059 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0701MB3635 Subject: Re: [dpdk-dev] [v2, 2/3] cryptodev: support session private data setting 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: Fri, 20 Apr 2018 12:23:20 -0000 //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