From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0071.outbound.protection.outlook.com [104.47.36.71]) by dpdk.org (Postfix) with ESMTP id CD3B0397D for ; Tue, 3 Jul 2018 16:47:54 +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:X-MS-Exchange-SenderADCheck; bh=smQ9ZQYBqq/IgfK87VrbhQfho5/WOX9tMzEkmXfZMfM=; b=gwzctp2x+MBMbws6iiSqTmW0J9v5i8jMO2inJh4TGNGOQLDkoJJw2ef2bhTiyA7Fel20TqPVVn92DjOJaRGvSf+eZpLA33NievPzvYz/tNoJkbAYHRaZym6fmux9OgFJhXw2SHoJ/LJQKBMgOAbLry7EdhGgQVPRdZVwU0q3JtA= Received: from CY4PR0701MB3634.namprd07.prod.outlook.com (52.132.101.164) by CY4PR0701MB3618.namprd07.prod.outlook.com (52.132.101.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.23; Tue, 3 Jul 2018 14:47:52 +0000 Received: from CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::f55a:7354:8d2f:cf0b]) by CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::f55a:7354:8d2f:cf0b%4]) with mapi id 15.20.0906.026; Tue, 3 Jul 2018 14:47:52 +0000 From: "Verma, Shally" To: "Trahe, Fiona" , "De Lara Guarch, Pablo" CC: "akhil.goyal@nxp.com" , "dev@dpdk.org" , "Athreya, Narayana Prasad" , "Sahu, Sunila" , "Gupta, Ashish" Thread-Topic: [PATCH v3 3/6] lib/cryptodev: add asymmetric crypto capability in cryptodev Thread-Index: AQHUEtfY/tBbqaU5VUWPFG3QbcljbaR9jVuA Date: Tue, 3 Jul 2018 14:47:51 +0000 Message-ID: References: <1526450713-17299-1-git-send-email-shally.verma@caviumnetworks.com> <1526450713-17299-4-git-send-email-shally.verma@caviumnetworks.com> <348A99DA5F5B7549AA880327E580B435895BAB93@IRSMSX101.ger.corp.intel.com> In-Reply-To: <348A99DA5F5B7549AA880327E580B435895BAB93@IRSMSX101.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Shally.Verma@cavium.com; x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR0701MB3618; 7:aX31aRTBotEBiNFnfwC7Hg3cobufuPtgXxnmJKjLsbbk4YMMAB0EbGnnshk5ygVIagvGePfFYH2HgfEjfmHAyxJ5YIZ0FFSAgkJA9VTJv+kzK0PC4aFS0CxUWCD7OMRzryhhVzxBF1wG34aDsMQa1cFpcZ7DUe6k5szhSm/wGqdBeDsrTasW6egY5HPy0kkTEwcgD6zja/o0CqweL+5sKmPGBtYEzHtkvdnu6LXyGgpHSb99ZymdFeWb1S9N8BWT x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(396003)(366004)(376002)(39860400002)(346002)(136003)(199004)(13464003)(189003)(2900100001)(97736004)(486006)(26005)(229853002)(7736002)(55016002)(99286004)(9686003)(6436002)(33656002)(256004)(86362001)(5660300001)(478600001)(3846002)(6116002)(72206003)(25786009)(186003)(106356001)(66066001)(105586002)(5250100002)(11346002)(446003)(53936002)(6246003)(6506007)(55236004)(53546011)(81156014)(2906002)(14454004)(76176011)(74316002)(7696005)(316002)(305945005)(476003)(81166006)(4326008)(102836004)(107886003)(54906003)(68736007)(8936002)(110136005)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3618; H:CY4PR0701MB3634.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-office365-filtering-correlation-id: 064780eb-6d04-4bc5-9216-08d5e0f3f437 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:CY4PR0701MB3618; x-ms-traffictypediagnostic: CY4PR0701MB3618: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:CY4PR0701MB3618; BCL:0; PCL:0; RULEID:; SRVR:CY4PR0701MB3618; x-forefront-prvs: 0722981D2A received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: B48gn9pGvxJRWwuEnKZClkcdhYcAM396y8HAr3U5ehLnMRMMqpiLgHcKs//JqJM4WiTJqA1vPa0N07l9c27bZHbW6HQi9Je/MzYzIWfh8ovC9vCWNgagfYDHH4L9oM1AsmWDYe/WX1+DlTXFHR1vtJ63mkOp2aCXOxkz5bSKkWDFI9UFfwtKtME/aVTUa48FXgUBnYVavXxzmSCuCk71f6zx+DlXGgEj818eZccwWWa4HAWKRjr0+/o5I8xCy8yBSaWZO6whddBD5+sHOTuS85KDf0M9qtWx9vKR0aziVLbu3Ugo8sR9tFtimDfX2FG2UMiowbFqCWKvfBngHJjVytBM7JLSyIG6R0blU1a/QbE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: 064780eb-6d04-4bc5-9216-08d5e0f3f437 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jul 2018 14:47:52.0129 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0701MB3618 Subject: Re: [dpdk-dev] [PATCH v3 3/6] lib/cryptodev: add asymmetric crypto capability in cryptodev 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: Tue, 03 Jul 2018 14:47:55 -0000 HI Fiona Thanks for review. I was just about to send lib patch v4. So for now, I cou= ldn't consider all input but some of them. But , in any case, this version is experimental so it is open for further f= eedback after 1st version go in. Rest, please see my feedback inline. >-----Original Message----- >From: Trahe, Fiona [mailto:fiona.trahe@intel.com] >Sent: 03 July 2018 19:42 >To: Verma, Shally ; De Lara Guarch, Pablo >Cc: akhil.goyal@nxp.com; dev@dpdk.org; Athreya, Narayana Prasad ; Sahu, Sunila >; Gupta, Ashish ; Trahe, = Fiona >Subject: RE: [PATCH v3 3/6] lib/cryptodev: add asymmetric crypto capabilit= y in cryptodev > >External Email > >Hi Shally, > >> -----Original Message----- >> From: Shally Verma [mailto:shally.verma@caviumnetworks.com] >> Sent: Wednesday, May 16, 2018 7:05 AM >> To: De Lara Guarch, Pablo >> Cc: Trahe, Fiona ; akhil.goyal@nxp.com; dev@dpdk.= org; >> pathreya@caviumnetworks.com; Sunila Sahu ; Ashish Gupta >> >> Subject: [PATCH v3 3/6] lib/cryptodev: add asymmetric crypto capability = in cryptodev >> >> Extend cryptodev with asymmetric capability APIs and >> definitions. >> >> changes from v2: >> - remove redundant xform_type from asym capability struct >> - rename rte_cryptodev_get_asym_xform_enum to >> be more consistent with other API names >> >> Signed-off-by: Shally Verma >> Signed-off-by: Sunila Sahu >> Signed-off-by: Ashish Gupta >> >> --- >//snip// > >> diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev= /rte_cryptodev.h >> index 623459a95..6c13d23f8 100644 >> --- a/lib/librte_cryptodev/rte_cryptodev.h >> +++ b/lib/librte_cryptodev/rte_cryptodev.h >> @@ -178,6 +178,35 @@ struct rte_cryptodev_symmetric_capability { >> }; >> }; >> >> +/** >> + * Asymmetric Xform Crypto Capability >> + * >> + */ >> +struct rte_cryptodev_asymmetric_xfrm_capability { >> + enum rte_crypto_asym_xform_type xform_type; >> + /**< Transform type: RSA/MODEXP/DH/DSA/MODINV */ >> + >> + uint32_t op_types; >> + /**< bitmask for supported rte_crypto_asym_op_type */ >> + >> + __extension__ >> + union { >> + struct rte_crypto_param_range modlen; >> + /**< Range of modulus length supported by modulus based xf= orm. >> + * Value 0 mean implementation default >> + */ >[Fiona] Some other fields may be necessary here, e.g. > - A bitmask for supported RSA padding types > - Whether RSA private-key in quintuple format is supported > - Which hash-algorithms are supported if RSA padding =3D OAEP or PSS > - whether xform chaining is supported for DH keypair gen >These are not blockers for the first release, but are likely to be >needed before the experimental label is removed. > [Shally] Agree. Part of these capabilities might need to there as per xform= capability.=20 But as you indicated, in any case, they are experimental right now, so let= 's have them added on a requirement basis once current is accepted. >> + }; >> +}; >> + >> +/** >> + * Asymmetric Crypto Capability >> + * >> + */ >> +struct rte_cryptodev_asymmetric_capability { >> + struct rte_cryptodev_asymmetric_xfrm_capability xfrm_capa; >> +}; >[Fiona] Why the extra indirection? >Couldn't this be removed and the previous structure be >renamed rte_cryptodev_asymmetric_capability? [Shally] it is to keep consistency in rte_cryptodev_capability which uses n= ame asymmetric_capability on the similar line as symmetric. But again, change is trivial, so if intended will do in subsequent versions= . > >//snip// >> @@ -1164,7 +1265,7 @@ int __rte_experimental >> rte_cryptodev_asym_session_set_private_data( >[Fiona] I'd prefer to call this appl_data or appl_priv_data, I think the t= erm private_data is >over-used, sometimes means PMD data and sometimes means appl data. >Btw- same is true of sym private_data - but changing that is out of scope = for this patch > [Shally] ok. I can change it to get_app_priv_data and set_app_priv_data Thanks Shally > >> struct rte_cryptodev_asym_session = *sess, >> void *data, >> - uint16_t size) >> + uint16_t size); >> >> /** >> * Get private data of a session. >> @@ -1178,7 +1279,7 @@ rte_cryptodev_asym_session_set_private_data( >> */ >> void * __rte_experimental >> rte_cryptodev_asym_session_get_private_data( >> - struct rte_cryptodev_asym_session *sess) >> + struct rte_cryptodev_asym_session *sess); >> >> >> #ifdef __cplusplus >> diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map >> b/lib/librte_cryptodev/rte_cryptodev_version.map >> index 62b782444..817cf9f70 100644 >> --- a/lib/librte_cryptodev/rte_cryptodev_version.map >> +++ b/lib/librte_cryptodev/rte_cryptodev_version.map >> @@ -89,13 +89,18 @@ DPDK_17.11 { >> EXPERIMENTAL { >> global: >> >> - rte_cryptodev_asym_get_private_session_size >> + rte_cryptodev_asym_capability_get; >> + rte_cryptodev_asym_get_private_session_size; >> + rte_cryptodev_asym_get_xform_enum; >> + rte_crypto_asym_op_strings; >> rte_cryptodev_asym_session_clear; >> rte_cryptodev_asym_session_create; >> rte_cryptodev_asym_session_free; >> rte_cryptodev_asym_session_init; >> - rte_cryptodev_asym_session_get_private_data >> - rte_cryptodev_asym_session_set_private_data >> + rte_cryptodev_asym_session_get_private_data; >> + rte_cryptodev_asym_session_set_private_data; >> + rte_cryptodev_asym_xfrm_capability_check_optype; >> + rte_crypto_asym_xform_strings; >> rte_cryptodev_sym_session_get_private_data; >> rte_cryptodev_sym_session_set_private_data; >> } DPDK_17.11; >> -- >> 2.14.3