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 10119A04E1; Tue, 22 Sep 2020 10:48:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 500EE1C222; Tue, 22 Sep 2020 10:48:57 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id E911F1C1B8 for ; Tue, 22 Sep 2020 10:48:54 +0200 (CEST) IronPort-SDR: ud12/ZcT95s4g3OxhN6BNuxlQjPsHQja2kaqRJdC+V66UiwsXhI9ibLaJma7IME3P8Z1ECIJmo Ofb7yWWlmD3Q== X-IronPort-AV: E=McAfee;i="6000,8403,9751"; a="159848679" X-IronPort-AV: E=Sophos;i="5.77,290,1596524400"; d="scan'208";a="159848679" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 01:48:54 -0700 IronPort-SDR: yEFLvkEcjeHDCy6L0kHc5NVSgD4R4g/pIFP1zSL96BEOOE0EDqRo9oycDMJKuutIfABAx74zO9 9vs5nL/4sIDQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,290,1596524400"; d="scan'208";a="485870494" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga005.jf.intel.com with ESMTP; 22 Sep 2020 01:48:53 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX602.amr.corp.intel.com (10.22.229.15) 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:48:53 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX607.amr.corp.intel.com (10.22.229.20) 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:48:53 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) 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:48:53 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.105) by edgegateway.intel.com (134.134.137.103) 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:48:51 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EkIkiX0nWYxxFnzUTms4wtYZKOeXTGk3rooLfgc0ySECPMcJrFFVyCcC/uLVsAvu8zawJoYS3CjpTZIpSXv83Qe9JGcHeZ2MMHXoNwq9PL0VozrDybeTN3nlAhr4SEOAHDvd68Dfi4ab23ASjDViS+axDeSWrBspZf65bKCDGKUnmm8bky41ClFkyl4TaSdOYIfEzOd860V3/Ll40yV2rmnWh8uA+uLiuYaA7vlfIpF+3w/ikiAO4ct4/4m5KyTXkxyh/PgCaE6Rit3oc37fOHWv8oq+ayhHY54WxHOOcngUvhJho4RNW90SHRomnfBULNmZ/nyLllpXWvst8lx3gA== 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=iRn9o7Yu/dOyaRWOk4h4gZEHiYhA9ogMSXHG3OaPat0=; b=TBibA9/aYAtANvGlqUFw26oYQt9YIXZuom1hJnInwgVCSj13VNA22BhvZe/Ttg4W4DPJR5AhaFnPsqS9cAarBqIOnSKSOhiba1w/4XYXelw96gAWZFF9QbAp13TXQZcGqHMTAbNW7wosxAsB1XkbntDyq/fWUy1s+qbPZjQGQGvIz6Z5bk5WqoinLXzo2P6MLmoYu0ZRP8j0Kc+pxD/TnRVkRMbbCljWApK508qi+2zyJaLpmvBL9WitnL+RahVmteyAJqT0wV+UM3ulWPSfDFCLJjoJ905mG3JEWOau2F9iBZzjRGdwUUjdlvGQhiwS6TgCGSIenaGqNtZ/l2Mufg== 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=iRn9o7Yu/dOyaRWOk4h4gZEHiYhA9ogMSXHG3OaPat0=; b=qB3aJzDx5FdsBRWqlV16wAh6sVhSmeH8FNQjla9wzhTqId8EzErKSvMdom4xY4BQ503/zWRgq/CFoxDRtH8S4GvXwMXJzvdy6DbCLHS6qdNbAa30JIIePHe37Vd7VooFm6Khl1JnwYWoSDq7BfZrNdHbZKOGfU/XTf3Um8MyvkQ= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BYAPR11MB2533.namprd11.prod.outlook.com (2603:10b6:a02:c8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.11; Tue, 22 Sep 2020 08:48:48 +0000 Received: from BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f43b:a137:dab8:8b0b]) by BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f43b:a137:dab8:8b0b%6]) with mapi id 15.20.3391.027; Tue, 22 Sep 2020 08:48:48 +0000 From: "Ananyev, Konstantin" To: "Zhang, Roy Fan" , Akhil Goyal , "dev@dpdk.org" , 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: AQHWkA68gqdw2CkVyUy7p/B+N1aHZ6lzO0oAgAACIYCAARU9AIAAA0sA Date: Tue, 22 Sep 2020 08:48:48 +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: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [46.7.39.127] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6480ecef-258b-4d5e-6afa-08d85ed452cc x-ms-traffictypediagnostic: BYAPR11MB2533: 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: I7D1TK+tas0hXKE63Ig/CvIW5dJZ3niSZzr2DUeQWFfEcRVlPY1+hq2FGJxRVWe+p/8MYHmWlVPMoCC4pmXdyHImYrKFrd1L0ooMsxm7p6/HfyFaTi0rJXAdlbOEdetlTxPebgGz5zlHfCNW2aUdnsIusVUG8ONmNtN9rMRn1SRZUOrKRSM/QJ3og9+sZqSSw0+66jbBElLiT2UNsSmFNzRN69T3nkHqy1N9LM9rxHq5duMdG7Ktm3Cm6Xs8XsFs7AUL1CQYlEs7bm3auGg5dmPgwEdDClSFKh6R8z7xD9FsK3IeV6ikInTP3LPylISh x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3301.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(376002)(136003)(346002)(39860400002)(66556008)(5660300002)(83380400001)(478600001)(4326008)(110136005)(26005)(8936002)(316002)(54906003)(33656002)(71200400001)(66946007)(186003)(64756008)(66446008)(9686003)(7696005)(52536014)(86362001)(66476007)(53546011)(6506007)(8676002)(2906002)(55016002)(76116006); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: 3ZVp+GPIqbGpGRO+7OuOm3vweHLOd7z+XRKl2aS2NfgzjQp4t+B0E+Y49zg4/2zZ2h4pkwzg0PYIpS9pvM9S/Cnbzdm0ngRnTygx9Xr1NAb9XElmxZhW39ewBG8tZRn326ECub1OidXbK4rEsLg8XzJgaCkfx8EIgdWd0Hcg4tsBCYk2k/fYhbxMlur1hvHRrWOLzxs8TTsQ0QwtR0KpFa8G2uGHcaAD/BuJntJJy8NP4Et9PYhM0sGFP73jrRRkHHUu+tTHEMBejb+cAS6c6tYubAFbcOVWS/pSyFBGvRyOyvLfIik9OHvUALDjh6CA+jxG9+8yA+kw56c+P1EtlIimasrQG5lJWMao0vVbbzXebRqDV4Q12aPeb45WXsooZ+oegxm/kSV7fwyV80Eptw+XgfoexUdXVamJ/AVmc//cZnC7LJcqWbEpkyrQTwKdEvIR+jDLiRN04Y8i+Os09H2xsfofofcCeLF1m/idW2jblIeauSkm28bT8oYx2rDwwHNxomhqvgpNzka1LC4rXRklPo2sG/2gVB4+SbYooulVFNRiYBonmZdpggPJTMMOa9nH+vMm6kDmNPInZCVoGq1AXKl0651sZ0vDT6Jdf/xKTdfP2zVQU9/zX4AI/auLld2x+LZm/cK9oUoQ7VbsXQ== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3301.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6480ecef-258b-4d5e-6afa-08d85ed452cc X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2020 08:48:48.6492 (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: EN5v8o8tuUZ4ae6zSn9Zd3EbmuKUVtXsYTHIFG8exY7r7DsZ7X1Xu1sSrbUNs0y9I3nuIj5mbO163730HyexNTTHZWWH5MQ9cbFeSIna1wI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2533 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 lads, >=20 > Hi Akhil, >=20 > Thanks again for the review! > To summarize, the following places to be changed for v10. >=20 > 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; >=20 > 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; > }; >=20 > /** > * array of statuses for each operation: > * - 0 on success > * - errno on error > */ > int32_t *status; > /** number of operations to perform */ > uint32_t num; > }; As I understand you just need to add pointers to iova[] for iv, aad and dig= est, correct? If so, why not simply: struct rte_va_iova_ptr { void *va; rte_iova_t *iova; }; struct rte_crypto_sym_vec { /** array of SGL vectors */ struct rte_crypto_sgl *sgl; /** array of pointers to IV */ struct rte_va_iova_ptr iv; /** array of pointers to AAD */ struct rte_va_iova_ptr aad; /** array of pointers to digest */ struct rte_va_iova_ptr digest; /** * array of statuses for each operation: * - 0 on success * - errno on error */ int32_t *status; /** number of operations to perform */ uint32_t num; }; BTW, it would be both ABI and API breakage, though all functions using this struct are marked as experimental, plus it is an LTS release, so it seems to be ok. Though I think it needs to be flagged in RN. Another option obviously - introduce completely new structure for it and leave existing one unaffected. >=20 > 5. Remove enum rte_crypto_dp_service, let the PMDs using the session priv= ate data to decide function handler. > 6. Remove is_update parameter. >=20 > The main point that is uncertain is the existance of "submit_single". > I am ok to remove "submit_single" function. In VPP we can use rte_cryptod= ev_dp_sym_submit_vec() with vec.num=3D1 each time to avoid > double looping. > But we have to put the rte_cryptodev_dp_sym_submit_vec() as an inline fun= ction - this will cause the API not traced in version map. >=20 > Any ideas? >=20 > Regards, > Fan >=20 > > -----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 = APIs > > > > 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 s= ingle > > job. > > > > So was your previous structure. Was it not tested before? > > > > > So we have to use something like > > > > > > struct { > > > void **cipher_iv_ptr; > > > > You can even drop _ptr from the name of each of them. > > > > > rtei_iova_t *cipher_iv_iova; > > > ... > > > } hw_chain; > > > struct { > > > void **iv_ptr; > > > rte_iova_t *iv_iova; > > > ... > > > } hw_aead; > > > > > > Is it ok? > > > > > > Regards, > > > Fan