From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E6211A04E1; Tue, 22 Sep 2020 10:21:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 39C571D582; Tue, 22 Sep 2020 10:21:48 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 93C9B1D580 for ; Tue, 22 Sep 2020 10:21:46 +0200 (CEST) IronPort-SDR: yahQKIQzLERyJKf5w1bhOUoD/7JVxX9lErmOtIzD/mtYeoTCZkdVzvU8K9TwldqdmQG3IJVTxd QQsDX2tn/0aQ== X-IronPort-AV: E=McAfee;i="6000,8403,9751"; a="161485795" X-IronPort-AV: E=Sophos;i="5.77,290,1596524400"; d="scan'208";a="161485795" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 01:21:45 -0700 IronPort-SDR: UJDxoq1PGCzmOM8HemsG+QJtqxvv7QYH8tS7BKxUE7N2wGthgeOe/ATui4/ni8flSmwFBACXBE Ly+IeCs16rlg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,290,1596524400"; d="scan'208";a="341941639" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga002.fm.intel.com with ESMTP; 22 Sep 2020 01:21:45 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 22 Sep 2020 01:21:44 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 22 Sep 2020 01:21:44 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.175) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Tue, 22 Sep 2020 01:21:39 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n9HAERWh5vrS3Wh9nezZKuf5KG4ohRYVSinBC4WNLbrRvDX8WrrzsC1J2td1gTXZ6GS2cY2tTeAVnK+Sg60kVw4gZ4uHPNyfIai4Jmoe1OC6VgVuWZzYpyZ82+cekm/YHTnDg2OFhfNPOb6joXlCBsmZgiUpv5QFZEI535ENjQgxH2iXv8m0gCCMtI8GV51XRrEXsdkqCjsYsk23I36vbaBIHRGSOgYlBVZpV3iL1WR3//mAKSo4hVo1IHtz03VpWiqC123nHoButO7QdziMVOLTXHjBct3nmvGUMKSWP3LL1qxOJvArkn8IHyApiZJKpi4OWsnR16nMTWLkHSQVFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OXqSNtVh3tQjROonIHrG+HfhfNojP3sDbaKYnrgPy/I=; b=YvR3HU5nzn+OXXT9bKy/7wUAd3wviYjhYcnpamIdEEOqID1rs9nRoAPhjWXAQb/GN5f+thQdDICgujmDZEUEsLj2IKyP/oJtVKy1aB6s6XnQveoqbqY7C7yAiD1Gaho199o3901Og8Ub9S1kA6VJLu1tnGUh9n58m5WjGA0FGbTSkHH98eatyGMakD7FE8AZiJW3JPMrm1LZ8E8r8kJkGkyYJb2s8C+Kglm0UInZM1YRlEuJ3rN8X0//2JbCbJT+qROVCAtGhqZBAPJ5rasS0PhWXvsFBUmndx/Ydwt0EENFhRhAZV53eZqlAoN4u3CP1y/QUgsFx11Nic53sK1aOw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OXqSNtVh3tQjROonIHrG+HfhfNojP3sDbaKYnrgPy/I=; b=LUtAyrrvDpcu4J+8fVU4/tSo0ZLhTdM+IoreOHx4gpic93mTTS+kgOTUH8rCGPxPUwRGosQ6I/VSvFnEWb7kMmOnx+N/kRmhgYkPnBaqLYs6m6ADCO2VnbMChDOpw9k/sOUeRxDch3G3sImiNid/Lm0YqtAec6w8CzBAhR6WCKY= Received: from BL0PR11MB3043.namprd11.prod.outlook.com (2603:10b6:208:33::19) by BL0PR11MB2947.namprd11.prod.outlook.com (2603:10b6:208:33::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.14; Tue, 22 Sep 2020 08:21:36 +0000 Received: from BL0PR11MB3043.namprd11.prod.outlook.com ([fe80::11fa:a7fe:329d:9239]) by BL0PR11MB3043.namprd11.prod.outlook.com ([fe80::11fa:a7fe:329d:9239%5]) with mapi id 15.20.3391.024; Tue, 22 Sep 2020 08:21:36 +0000 From: "Zhang, Roy Fan" To: Akhil Goyal , "dev@dpdk.org" , "Ananyev, Konstantin" , Thomas Monjalon CC: "Trahe, Fiona" , "Kusztal, ArkadiuszX" , "Dybkowski, AdamX" , "Bronowski, PiotrX" , Anoob Joseph Thread-Topic: [dpdk-dev v9 1/4] cryptodev: add crypto data-path service APIs Thread-Index: AQHWhbwaRQXVNw2ngE+5SqoPhUuyBqlu/9oAgAP1tgCAABxYAIAAPMewgAADYYCAARKlYA== Date: Tue, 22 Sep 2020 08:21:36 +0000 Message-ID: References: <20200904152539.20608-1-roy.fan.zhang@intel.com> <20200908084253.81022-1-roy.fan.zhang@intel.com> <20200908084253.81022-2-roy.fan.zhang@intel.com> In-Reply-To: Accept-Language: zh-Hans-HK, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [95.44.220.85] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7b9569a6-94bb-402e-8fca-08d85ed08615 x-ms-traffictypediagnostic: BL0PR11MB2947: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: sxGLkOhkwy/f0OFcW8p+zliayB+zt7jEFnNSBwrWd+LzZwY/wD0zrmH7zk61PDWPsoN071iza3rtZ51PKB8p/UV1TtWyJSFN4ny1DV4u1AIMDmEtjBHT4zPggpkA1SmSExoF6icpwu+AplP8wmiw3HlmAdLRpOVvx0Q20iZpMI4tU4gY1Z5xJEU+t3bphXTODY/Hla02PNRmYUVgndjiZzU1lAB4gnoqvL9P690OmEfKvGlgqc7chXu2zVle92v8zWT9W8urZAh2UbtVp5YpJpxc3/8BsUJPs1qZ+Ve30HRsoOVTjStsGXdILRTbsR38E9xeuTWrgNtuLAwnKxA9VvdofE95j4V0RfpJ6sI7PFhlzJ075KsWOwbeQGHPOLEO x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR11MB3043.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(346002)(396003)(39860400002)(376002)(83380400001)(55016002)(54906003)(4326008)(52536014)(86362001)(316002)(110136005)(9686003)(26005)(33656002)(7696005)(53546011)(66446008)(66556008)(64756008)(8936002)(76116006)(186003)(2906002)(66476007)(6506007)(478600001)(5660300002)(71200400001)(66946007)(8676002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: qvqNxBTJdy3mMOjajpDm6QDPNRSpx9sVfQhA792jVPkXfg2b2hBhpPaLho6r4YA3cuCy3Dr5Bwwx0vw9BzfwmNLBVZEFvDFqGtgJh+sBKM0k0I//2c+Zkk7ndajMh6fC/27CHwWUBfmq24x0/1IS2Rwa85fBjVuy4OdccBMIt0uaadRqV2I+IDz1zqq6eOqu6Apnid8RXK0cLus95SGFNCgF3a/P3zKatXga1zPYuH5Kw4nn7q3ZJ2R8NCO0w+q6t7mZMqM9YWeLIZzSLqf+NdIG3T0mkdWlvmW/DAtI3OVaoBmvSsllfTYch/SKKYlhtQG4CDAdVX4TXVDwcNzqWFutxuhYsxdc+ORt4jUAPzL+ji/jKfBU+ha/Z0nXZPWk3WrvGQPfccdaXDx5Lf819+CDkpUhx4ip5rZLksCtPLtANrfVKy+xQfjecD8E7Lq2F3YVgUnM9tDI//NfocVGZqaQ+UlfwwIovq+aau79Yw3Nn4PxUCnl3abMi/hKMw++vpeY+iLjs/nWfElirqLOthEp8pE6jO4ye55w3UjyZj+UDaS60Dq/PyFFicnCBwW0lMVU0idogiJ5E7hqJpIy3xYHy7RJ3Zf3o9Sz0buHV+CQN3DLhFLvdid2v7MBu3CHwEqIMST7AZJ62WyPy04cDQ== Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL0PR11MB3043.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b9569a6-94bb-402e-8fca-08d85ed08615 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2020 08:21:36.6385 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: iXzCDeDXHwT49zjmr4P3mmedfh9qQ7N4rUATMQwOnXmNE5iVjEMhyfukzmKsu92mheGVa62XPe0ediIDJk40pA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB2947 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [dpdk-dev v9 1/4] cryptodev: add crypto data-path service APIs 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Akhil, Thanks again for the review! To summarize, the following places to be changed for v10. 1. Documentation update and reviewed internally in Intel first. 2. Add the missing comments to the structure. 3. Change the name "dp_service" to "raw_dp" to all APIs and documentation. 4. Change the structure struct rte_crypto_sym_vec { /** array of SGL vectors */ struct rte_crypto_sgl *sgl; union { /** Supposed to be used with CPU crypto API call. */ struct { /** array of pointers to IV */ void **iv; /** array of pointers to AAD */ void **aad; /** array of pointers to digest */ void **digest; } cpu_crypto; /** Supposed to be used with HW raw crypto API call. */ struct { /** array of pointers to cipher IV */ void **cipher_iv_ptr; /** array of IOVA addresses to cipher IV */ rte_iova_t *cipher_iv_iova; /** array of pointers to auth IV */ void **auth_iv_ptr; /** array of IOVA addresses to auth IV */ rte_iova_t *auth_iv_iova; /** array of pointers to digest */ void **digest_ptr; /** array of IOVA addresses to digest */ rte_iova_t *digest_iova; } hw_chain; /** Supposed to be used with HW raw crypto API call. */ struct { /** array of pointers to AEAD IV */ void **iv_ptr; /** array of IOVA addresses to AEAD IV */ rte_iova_t *iv_iova; /** array of pointers to AAD */ void **aad_ptr; /** array of IOVA addresses to AAD */ rte_iova_t *aad_iova; /** array of pointers to digest */ void **digest_ptr; /** array of IOVA addresses to digest */ rte_iova_t *digest_iova; } hw_aead; }; /** * array of statuses for each operation: * - 0 on success * - errno on error */ int32_t *status; /** number of operations to perform */ uint32_t num; }; 5. Remove enum rte_crypto_dp_service, let the PMDs using the session privat= e data to decide function handler. 6. Remove is_update parameter. =20 The main point that is uncertain is the existance of "submit_single".=20 I am ok to remove "submit_single" function. In VPP we can use rte_cryptodev= _dp_sym_submit_vec() with vec.num=3D1 each time to avoid double looping.=20 But we have to put the rte_cryptodev_dp_sym_submit_vec() as an inline funct= ion - this will cause the API not traced in version map. Any ideas? Regards, Fan > -----Original Message----- > From: Akhil Goyal > Sent: Monday, September 21, 2020 4:49 PM > To: Zhang, Roy Fan ; dev@dpdk.org; Ananyev, > Konstantin ; Thomas Monjalon > > Cc: Trahe, Fiona ; Kusztal, ArkadiuszX > ; Dybkowski, AdamX > ; Bronowski, PiotrX > ; Anoob Joseph > Subject: RE: [dpdk-dev v9 1/4] cryptodev: add crypto data-path service AP= Is >=20 > Hi Fan, > > Hi AKhil > > > > ... > > > IMO, the following union can clarify all doubts. > > > @Ananyev, Konstantin: Any suggestions from your side? > > > > > > /** IV and aad information for various use cases. */ > > > union { > > > /** Supposed to be used with CPU crypto API call. */ > > > struct { > > > /** array of pointers to IV */ > > > void **iv; > > > /** array of pointers to AAD */ > > > void **aad; > > > /** array of pointers to digest */ > > > void **digest; > > > } cpu_crypto; < or any other useful name> > > > /* Supposed to be used with HW raw crypto API call. */ > > > struct { > > > void *cipher_iv_ptr; > > > rte_iova_t cipher_iv_iova; > > > void *auth_iv_ptr; > > > rte_iova_t auth_iv_iova; > > > void *digest_ptr; > > > rte_iova_t digest_iova; > > > } hw_chain; > > > /* Supposed to be used with HW raw crypto API call. */ > > > struct { > > > void *iv_ptr; > > > rte_iova_t iv_iova; > > > void *digest_ptr; > > > rte_iova_t digest_iova; > > > void *aad_ptr; > > > rte_iova_t aad_iova; > > > } hw_aead; > > > }; > > > > > > > > > > The above structure cannot support the array of multiple jobs but a sin= gle > job. >=20 > So was your previous structure. Was it not tested before? >=20 > > So we have to use something like > > > > struct { > > void **cipher_iv_ptr; >=20 > You can even drop _ptr from the name of each of them. >=20 > > rtei_iova_t *cipher_iv_iova; > > ... > > } hw_chain; > > struct { > > void **iv_ptr; > > rte_iova_t *iv_iova; > > ... > > } hw_aead; > > > > Is it ok? > > > > Regards, > > Fan