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 62709A04E1; Tue, 22 Sep 2020 11:28:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 39B031DBA3; Tue, 22 Sep 2020 11:28:42 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id EC1A61DB79 for ; Tue, 22 Sep 2020 11:28:39 +0200 (CEST) IronPort-SDR: H6IRuw+SLqXGCuGxneXhTYbji1zU8HHwJE4TGJyDgrC5dpo/9y4SdtJoC74gZ5lmM/t8YiMJbW ZkCCzklJl7EA== X-IronPort-AV: E=McAfee;i="6000,8403,9751"; a="157945581" X-IronPort-AV: E=Sophos;i="5.77,290,1596524400"; d="scan'208";a="157945581" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 02:28:39 -0700 IronPort-SDR: 6kOBSXwDmAOiRFuayWnjvsLZ+fThrojxdtZrxjEGoTDZfVmBs7+2kZthwr+kiA8JqHArxcupo9 /FLzmR/wavng== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,290,1596524400"; d="scan'208";a="341957033" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga002.fm.intel.com with ESMTP; 22 Sep 2020 02:28:38 -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 02:28:38 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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 via Frontend Transport; Tue, 22 Sep 2020 02:28:38 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.102) 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 02:28:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VH8Mm0yVIt+wWJbBqJfRUtTVMHHWzqkn6l2I7ZBqqNq/zvPYtSuLCAk9DbY+MSgd7RhVcI96KZ+hTEGfGD4lH2FUvt5P0s/CsOcl1T5I4JNsJOGbcHNoPVGYhZTH0YNLx1BtxqKb1JVVbfGyMRhHs5INCxbjhyvx559JAmF3moFTcMhjmFHyw273T1ZvykDVeL4Y4eOnyr1csFmUyHPKl8ewYGNdy5uGt366Z7Wc007MOj4R2EeB5Z0/e6b/SvbzCiXaTZmHLWqXbkZhMF9fqsewwXH9rgm/xijg4/QbT4WsWC7hRAqmr10AWJXbgDOMOQvk2HUbeX6/HIJ99pcaYw== 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=paJ7GIMaxwsE2piA9ItPn6EAtGN0ZT5v3s8/nZnSDZI=; b=Ztpfz8MEYmeAaPr6ogSnwa2LQW5XyHGjtEjXKLUXvH8vjvUVSUcOZXU5Cg97co7vppWgd+RZ7QNGi29yoaQqpHkkdnL7Ph0OrGf6Lg1KVWikt8Ntvsy2d/cURkEudLwjlFwsr47q/1AgCY/o2eJP/+gETjwR8e3ECJGw2WMi0OgX58YeORkGqmHgSnbobyrSNXs9fHSRDj9P9tcwJ4bvhSTM/56ZoPp+VwGTAxYwmzTHE15f0rOthQB1crlpxUCLSkffrdYTKzqxFhYgWhounG2BZ/PxXmdbe4rtCFZiXpYB0FkEuamuiZ27YVsy/ISm0BR73HXRp2KsgROfeXldlQ== 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=paJ7GIMaxwsE2piA9ItPn6EAtGN0ZT5v3s8/nZnSDZI=; b=AWeHuGHMtcuSqrepiTox1YA04n6nEfNJNpe+TDyi0ny/ZJwgdRNMsIA6JoIQUHSKYW31QyTU75RgsUEh4gerJRdb64A/R6L3j4g2ZA7HaQsnYW1EnZtPTc0pG2Y4Q5gzaKDlHwv3jgK0Mak1bdqx1kY3qEH3WTy1aMbwWO2MjXU= Received: from BL0PR11MB3043.namprd11.prod.outlook.com (2603:10b6:208:33::19) by MN2PR11MB4240.namprd11.prod.outlook.com (2603:10b6:208:179::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.26; Tue, 22 Sep 2020 09:28:33 +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 09:28:33 +0000 From: "Zhang, Roy Fan" To: Akhil Goyal , "Ananyev, Konstantin" , "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: AQHWhbwaRQXVNw2ngE+5SqoPhUuyBqlu/9oAgAP1tgCAABxYAIAAPMewgAADYYCAARKlYIAACjIAgAAEsICAAAV7wA== Date: Tue, 22 Sep 2020 09:28:32 +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: cb632546-3eb2-4f4e-d538-08d85ed9dff5 x-ms-traffictypediagnostic: MN2PR11MB4240: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xrlKBmtKKiJBre/8u56ZHsjgFScPSq5Z5n1B8e3OzgOv5XedlhWjrzqsXQVJ0QrVXLBtNIqKapPmYUx6g120fL+yn8duM6xhxurZcG0yn2ZeJvc7oWkZvxt+JRYxZG1EJ3we4iPYehYJ5d/ZCWymiA9ROTV8fvrOPZ1RIrZlRniKPccu/6JM9Bw0gWms2FGQ/sc5OB0uvbez+OYjFu89aYC9CoLG6HYq3hFh+H7dIl4enKIi4jDipYk3zfYq1ExJp2An+FvGzkdjCfcDrIW9A8xPipPkNoAFl6GqLDguC8KZcofrOCJ4Ctu2OT1fUcfz 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)(136003)(39860400002)(396003)(376002)(366004)(346002)(55016002)(5660300002)(186003)(52536014)(2906002)(8676002)(54906003)(316002)(8936002)(4326008)(71200400001)(66946007)(76116006)(478600001)(9686003)(7696005)(86362001)(26005)(66446008)(64756008)(66476007)(110136005)(83380400001)(6506007)(53546011)(66556008)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: mnRHXFi9b/FtJek4fwjwT8fLNuktkfl5cKyUV1VM2cDTUanGgX2EXaOOogCrh+WOC+0Ai/bSftwchf/cRj5YefD3EK8Gmp2t9CbFU6TPdDTsTEF/RuH890rWsXBOSYIwlltEabW89aJ5N6HX4PkQEnWdgUkLBBmnINF6DCNsrYfEhJkyfInBtYuL2eMVLZvwvVOifGbRvGn5WR5G4T5OGWEZ5dPRvxaKAGi0uKFt8p37B9mfc0QJdxst262L0wqgqHUiiHECFuEC0DH70NcTqVJpWz0mIImZUT7GB78eWzRya/INADmv7WtlOmgrqQK2wCL6IMZbe4yGYHOKlkVsSJfmWMOKQA9jGoofJgYcNgqSwy+8hGvBPVSa/kk9bKy1UBGm5GFSe7hYqaIbRAkXC+1gp7ae/U89I/IWbH+OxlFPPvv1Y6tICVZ4oM1lpe45DdQSJL8X8mdWRy8+FGZ7hW7z/6uePcXKpJ8vCelWBzIPOorh1YTrf60TgaanvvBXvOtOZB7DleJTxOL96HErbLTMHoHgZyRuBI+/3CiL5s89Szq5grl8a4V3Gw5HX1I2HYjbUPpAcbq4MBpIVPI+319/Asgm2QTjXseMdfcmWirwzWDzD1e2+h66HLg4rnPZ/Y/OZBEnj6IBf2x6yzG/Ew== 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: cb632546-3eb2-4f4e-d538-08d85ed9dff5 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2020 09:28:32.8640 (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: 5+mRPfFs3xhP5Hqirxqwb3pSBm61lHfTERt/WPb9gEhFYBi4RZcjDM+2VAKBxrkgzFuOqe3GaptYi+w42u/J9Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4240 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 and Konstantin, > -----Original Message----- > From: Akhil Goyal > Sent: Tuesday, September 22, 2020 10:06 AM > To: Ananyev, Konstantin ; Zhang, Roy Fan > ; dev@dpdk.org; 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 Konstantin, > > Hi lads, > > > > > > > > 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; > > > }; > > > > > > As I understand you just need to add pointers to iova[] for iv, aad and > digest, > > 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; We will need 2 IV here, one for cipher and one for auth (GMAC for example). > > /** 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. >=20 > This is a good suggestion. This will make some changes in the cpu-crypto > support as well > And should be a separate patch. > We can take the API and ABI breakage in this release. That is not an issu= e. >=20 >=20 > > > > Another option obviously - introduce completely new structure for it > > and leave existing one unaffected. > > > This will create some duplicate code. Would not prefer that. >=20 > > > > > > 5. Remove enum rte_crypto_dp_service, let the PMDs using the session > private > > data to decide function handler. > > > 6. Remove is_update parameter. > > > > > > 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_cryptodev_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 > > function - this will cause the API not traced in version map. > > > > > > Any ideas? > > > > > > Regards, > > > Fan > > >