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 46F19A04E1; Tue, 22 Sep 2020 12:19:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 040EC1D96A; Tue, 22 Sep 2020 12:19:41 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id E1EB51D927 for ; Tue, 22 Sep 2020 12:19:38 +0200 (CEST) IronPort-SDR: BEokF5azf2zHde5G93X4j4PVvcDuqnvlzn9jKO10CqIbS6dLX85wTsyyAIdzcZafsz5hACToRD RJgBvuUz3alA== X-IronPort-AV: E=McAfee;i="6000,8403,9751"; a="245414925" X-IronPort-AV: E=Sophos;i="5.77,290,1596524400"; d="scan'208";a="245414925" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 03:19:28 -0700 IronPort-SDR: fRx/3ocnlwCeK/KKnjHjgOvt9gRuIaLZclS41L52BjHFT8z47xo/R/G7osAMi9rVUKwJEFuk5b lwbk4UuGCTjQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,290,1596524400"; d="scan'208";a="454443095" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga004.jf.intel.com with ESMTP; 22 Sep 2020 03:19:27 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx606.amr.corp.intel.com (10.18.126.86) 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 03:19:27 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 22 Sep 2020 03:19:27 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 22 Sep 2020 03:18:06 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.176) by edgegateway.intel.com (192.55.55.70) 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 03:18:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iRdkGpax0/5wd8DmGEwBrdmHQbldI9IXytTkQMiLNV9s+O03Bfd+6GtvVSbKs9n38AC0AgX3T++cI0iud4utmac14VxoZQItrGfY4JTK+0sPz5L4lwpkycZFARo5PNFVNx4uYx5b+Lg4CllOF0rLOuPU65Ev+QTIxUheD3dlliBW/1cgXWrWYw55wLUD/XIkvD8P1JZOQYI7PNJ6OLtINfivZxu7lycJkVvJh5wbrMxoGJWH16snhQjebF8PwuY0eMRpQeZpLb9sb85LNvDOWrKzKia6WzSuaVoEAOhg1LOG0conH7sHsVdFmOy82RF2EsH27JhoUrLeRg6MobMdPA== 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=TmzyMuz7asSSqDCSNtWb4JhVDjdSbB4gqey1mrwzFEQ=; b=L/eH/m1M403C8HsuyiVmR1whteyFx7wYuDApvJCeWf82Wv4xGZCM5AiDvo+FnhgXDKw7yl71r8GG1rYWebQMdjRSxDh9q3P9r3nVXcvr8CSUWQNUIh1NIl7tmfo2hbbIq4Djymbfh5MrDgKiNcpt+Do6LP/eYtLcB+zNNMvZO9zTc2VtzYB7QCtcX/G2qgIvugU2a87zJs5WMM/ccv12EEjteSruoERJO6VaL50R8nejLGAFH1PeOTW0zVmccRwU4MeOor5CYuJD85pXbUa1HVlGQDzF2d9qxPCsvP3GKXosXfMYTeTm9Rhf0gW1ewfTapEMkRKxBVjxnieFW8WGsg== 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=TmzyMuz7asSSqDCSNtWb4JhVDjdSbB4gqey1mrwzFEQ=; b=l0zer5ReXpWN8SomReriwZCGqPN5BSosDtvBOqgIos2NV8mW+AVPKaY09KUgtnTX3TFWw6jtpqRfKbY7VFdjsIjDgISXxWranKMlWo/EsVn7HoOTxsv5LK0fBiKdFPYVGgagzLCoQcahD9Xg7V97g8xmkfjdV3s2b+//h5j/GFE= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BY5PR11MB4306.namprd11.prod.outlook.com (2603:10b6:a03:1bb::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.24; Tue, 22 Sep 2020 10:18:04 +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 10:18:04 +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+N1aHZ6lzO0oAgAACIYCAARU9AIAAA0sAgAAI/4CAAAZqAIAADW/g Date: Tue, 22 Sep 2020 10:18:04 +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: c7264b98-33f0-4df7-3ada-08d85ee0caf2 x-ms-traffictypediagnostic: BY5PR11MB4306: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Eh+KjuRolrOjet9OOLqGwR7h387efAvG2IqLSLXQiEeR5wc3yayRYmTAZBBcfiRkiQenm8iz+Btvr1zgJPBerhD8lDijdhk7lQobSTMVWhsqdG/dZJtUvBqPfEKaMCI5B+U4nai8L1aKj/xXuCBzC9zflO3l3xMZ+8l2q8lTHtxi4YkT2p+OsCospVIntGOHYP//IjGtm6srJQAJZOTTPHFjiHT4xvrq24x4ufrOjj009u4QbXsfxOijlq1ljEyueFPwxX30cw5FMXmhFDP8olqk9hEH9fyNJeMU2kGjWtyGA+MVWNpS4T5kYhIYf0u2 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)(39860400002)(136003)(396003)(366004)(376002)(346002)(26005)(7696005)(8676002)(54906003)(478600001)(71200400001)(66476007)(66946007)(6506007)(76116006)(9686003)(64756008)(66556008)(53546011)(55016002)(66446008)(5660300002)(2906002)(52536014)(8936002)(86362001)(4326008)(33656002)(186003)(110136005)(83380400001)(316002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: JAlgFse6pwjNbM3OS79Qu9wIUT+UKNwH+DIpYQUyP6AjPho4WVCk36FOEx5GdHDTYpsJXQby1zk1j7xbqxXCYAzzxgFHqtzYdJJGUNiwCQJS+FM8jCO4ktgYz1c0ZYXDyhS/mbH3ELDStDiU4xmIH4UpSnoFKIImHRkbLUVz2aZ4EM4zIQ9BhRIo+p+rdPgv061N2vT+B70qQDq6SanWMxDMQiDi97Ku8k4Q8Cm0meCC9gKvvoCxF/2e+Te9OT3spzGjKUSx3Dv1tsCAaCKtcAd+v54iNnqhZCs4vUTi2jCh2cPH/c5o0rnDq/bP8d/Ek2ceJDREFm1xy0cSQ57GbTQ7FTAMzO24x7OSZDBHjX1nfonPkIdRlPENPbrBsEdFYAKCH3XOIVh6nCYK2QmpkYOsYddU30sDq0i0LfCfiBuZsbT/rMQkNZM8IqOg2bgdNFZNkpEPLQH/xYnOUqJXiTXVSBv7oUS5xEjoukZYJsa3glVpz8Jpol9q7Ih1gjLam7FuDpcp7wYHpRzd4qYrONwOMK3sq05B3PvZ2GzQstWFSeQFE1SFkg+AHyQaXIN22yL68TJzLkmoQYSiz+lm3yA5jr3CVixRJRkP4tk/30Be/AIeIaoQvqTv0GAwyCJB+CSZB+60StCPN98UMo/wCA== 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: c7264b98-33f0-4df7-3ada-08d85ee0caf2 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2020 10:18:04.1414 (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: Bzdv5/xvzU/UzxLKjtee2QvCPm17x5wVY2lh/oafGPlRAqz90pgJb40Ws60QDPugjZ9G7z9CGwHc3+iQwKFxUt3aHR01ZV9neFj56RSUMUk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4306 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" >=20 > Hi Akhil and Konstantin, >=20 > > -----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 = APIs > > > > 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 a= nd > > 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; >=20 > We will need 2 IV here, one for cipher and one for auth (GMAC for example= ). Hmm, why do we need to different IVs for GMAC? And if so how does it work now with either rte_crypto_op or with rte_crypto= _sym_vec? >=20 > > > /** 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. > > > > This is a good suggestion. This will make some changes in the cpu-crypt= o > > support as well > > And should be a separate patch. > > We can take the API and ABI breakage in this release. That is not an is= sue. > > > > > > > > > > Another option obviously - introduce completely new structure for it > > > and leave existing one unaffected. > > > > > This will create some duplicate code. Would not prefer that. > > > > > > > > > > 5. Remove enum rte_crypto_dp_service, let the PMDs using the sessio= n > > 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 inli= ne > > > function - this will cause the API not traced in version map. > > > > > > > > Any ideas? > > > > > > > > Regards, > > > > Fan > > > >