From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DC98BA054D; Thu, 26 May 2022 12:57:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8345640151; Thu, 26 May 2022 12:57:38 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 90F2540150 for ; Thu, 26 May 2022 12:57:36 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24Q2AV7B027629; Thu, 26 May 2022 03:57:35 -0700 Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2168.outbound.protection.outlook.com [104.47.56.168]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3g93ty8cqc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 26 May 2022 03:57:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P0Gc66D8UBMqYT2NRNFvIHQkL39SFEFKO66KruaDcRwkJJYHUxXTIpXLaQ/kfY1QBS4V2EYfgFJU+v28299woLBwPBkArdinuLE2sIHAnkor3sMi3kvRvVjj/ckST2+dWML6fEa+x5QHkiCAM1x2vA1LHdZFR7hipG7MAOFoJPJKKlcvdlkPkOqohb1v8RwrDpm93BusDSewm0IGWv+n9qhCW3Sz8x+MY1rnME2HwG+/rw9xi+XNdYA+rhOWZ1/n5tr6JUxwC0h1Q/xDAnhLIuPT1Z0C9VFJQZyiItignPorUSz6zIKNg7EPgZg9949Qm3Ga3j/tON810g/VUI84Kw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cntkZSmvtmE4hnToPUF6hcApGV0yU4EgVO7g8eDg5ek=; b=LFou1Jzg3CxE6iQUdjGSbOvwil8zF7pZajhptfrd3Kyoo6vOv5Ge2DPZhkcGy2vKRSQNZTr/4W77k7V8VKdfYfeO5eksWcWWmDjBrG5U63pRxhGUgpEnre0bnwmEXojfDTYREMPbayvnyHYluJw8e2Cpm9pM3sZgk4kgpdNpeYIDDZZw5rSoHQ6Oq1uhYTmwbyjI+SJvaeEpC9t4kjA4dHhv2B6x7qWkcTupeMkI58qVxxmAiG3ytnkSBFPlGv8gQHpgc5UEj1LF5tM5JXIc1y8De5BdMI+opYpNDrAwYh6ygyBIOyuIffBYZ0PSOFq8l/cdfWaV0CkFVPxJgFrKkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cntkZSmvtmE4hnToPUF6hcApGV0yU4EgVO7g8eDg5ek=; b=YwS/4uoN1UdkG7CCAeXqSGEQ5CCjHQyuJxNL9HxzJP+IAK0uzKrYsH6p5+wCs5CtJ/UXjdlxw7ul8nEI7XusSCP9co7ngaa+vtzh743yk3l1Lrzc28V0eDSGP5fNP8MQb7pwOsh5So3m5hih0B+fnQdd1jkVJVoHI9C+L4eACQk= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by SN1PR18MB2176.namprd18.prod.outlook.com (2603:10b6:802:22::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13; Thu, 26 May 2022 10:57:33 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::f154:453d:893:f6ce]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::f154:453d:893:f6ce%7]) with mapi id 15.20.5293.013; Thu, 26 May 2022 10:57:33 +0000 From: Akhil Goyal To: Arek Kusztal , "dev@dpdk.org" CC: "roy.fan.zhang@intel.com" Subject: RE: [EXT] [PATCH v2 03/14] cryptodev: separate key exchange operation enum Thread-Topic: [EXT] [PATCH v2 03/14] cryptodev: separate key exchange operation enum Thread-Index: AQHYcFlz6J7eEXLswUuvC9Xin+IA5q0w7LaA Date: Thu, 26 May 2022 10:57:33 +0000 Message-ID: References: <20220525155324.9288-1-arkadiuszx.kusztal@intel.com> <20220525155324.9288-4-arkadiuszx.kusztal@intel.com> In-Reply-To: <20220525155324.9288-4-arkadiuszx.kusztal@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c5f421b5-0ec5-4116-5540-08da3f068945 x-ms-traffictypediagnostic: SN1PR18MB2176:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: OFHPJtpFscxEsW7BN4VTifo25gp1YkKDIq/La7DCbPDQOcJsiUXiEm/RE6uTN/bWEMsoIhQNvhLy2HhcUUwHqqsZF70kplmi8J+AnpTq/SFeyJjr1TrwLRfPl0Ixp7gnLbb1xRrnqWnRvyzo7p2q2Pyr6hGtIj+X8PXuN+TFprYivA0aRILJMFKLfdnXK19Mg9RFmmE2F3e29dnnrnCCcsEG0I0lXguf9Ilq/ZKdIDVaCKwU4dXWFGiNrMMKfRY7LiXA5ELl8pP9O7xYzq59IK3kEQRIXl+8XKPhz8PeC8mRT5W94JZYuctOvZSbUEw3ec/iIqOgeQJs2H8sx+WvkiXpzuMbTy4ytJlBU2TGXGadWwKzr/JIUBNbQMUNknE8f0rHq6tEG+8ijlPp4I9vP4FI2MsmeSUBEwteDrQYwM6UcqJ1gSWZPKB6ZR94gIwbBqosqcVp7xMw48+xGSf3Mkgupu3p0met0pvgp6d5lugzA9MJLeVZ3g0fJ8zJApfS/aybawoysku9yA+OgYqNJDrLSs6hp6aRrtKRdpdkvHKvDjeFCoAlIaD747IZ4IfildVz/gJWmU2NdPOqeiVB+sjHOUdEUMa/0zvXy0cnI1iXkerPGZ9iejbV1vGKYh1xVQNJpjYcjx3eYs3EfRUi9iUfV5xRsOI4f1VASOi9Vy9bT5DDxcB/9Wed9z/NcMI+SUGmB5CMUZ/zfJ42CbA2uA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(71200400001)(33656002)(186003)(5660300002)(2906002)(52536014)(508600001)(55016003)(8936002)(316002)(38070700005)(86362001)(110136005)(38100700002)(64756008)(66556008)(66946007)(8676002)(66476007)(76116006)(4326008)(66446008)(9686003)(26005)(7696005)(122000001)(6506007)(55236004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?VzzxcNeCHUB8bNQal8bFv1sT79a39haGin7Iu2pEiRcY2LdOPvIbt0cUuomK?= =?us-ascii?Q?+7VEvgu0b9jxKpPDE4yFcE/T8WbcIQ9SLl4/FX/pcW1gMd2vbG9TDoR4N2wl?= =?us-ascii?Q?POolGiC70HMhe1+Of0K3uwKrcK8NPKvYv1/EoO0YYM9ERSfES//v9Ya3exbe?= =?us-ascii?Q?ksYvkpGdlKm3zop/dvhuAdMlTEPjFUenu1uzSh4QeNzAcmaCvWCRTLs6Qd1s?= =?us-ascii?Q?BDwwxQPMQZUJ+Q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QsIYU?= =?us-ascii?Q?mJkbIp6NAmoaM3JaWurrvVVcqktKca/096Z7q6VJtcsd9o4u2aeUX4nKn5vD?= =?us-ascii?Q?JsBi9mP/sG8by8PdiSdWyIi07R1RavMQFtiT3QoL/u3HNIxdhhS7AjbtOR6y?= =?us-ascii?Q?os93OCnGcAwx9ZOuuZLPoLFL7kZNrL6RDUU+OvvIOC+G7oJ4uRj8Pg+XX+kW?= =?us-ascii?Q?7yJWhyLCN5anQ3vnMPE0zcxUTq+BL/170sU9uyF4EtgS5jpmW982VewHvSZr?= =?us-ascii?Q?3YBOzUuCPDCqQeKxroXvCZUW9wtPdSKX9UspQQP6TJG/CX+PfrLF72OhnM3j?= =?us-ascii?Q?fkx9qo5tVuKDDp8wQB/xGlutTc+R/1Z7goaKH0qwG4vfHkLHsZDv73hs0Zou?= =?us-ascii?Q?ZPFoYqkNrXGanXNwSDa1iwQdHJGqKHm5bXuWFYKy6pJwAjwKVgFv7i/H65f0?= =?us-ascii?Q?0K8R1h0PEvhgQspPkdrutVkmpxBZvHEyzY7jYgsM0nX/Z6M1LQu+bxhEV+su?= =?us-ascii?Q?DTkG8Dc5cKndDI1c0Sa5rJoR9rUa1L0l/7a7TT4fxJ04fDtsf6r25OUns1yY?= =?us-ascii?Q?DKZUDPEoZomA1xoPBM28KDjKv/Huo1a9RSC4G/+ClAGv0LiIaX33coW23Jin?= =?us-ascii?Q?aFpMSay6XA=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c5f421b5-0ec5-4116-5540-08da3f068945 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 May 2022 10:57:33.1566 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: BzB7z2N4FvpOuZBiQIfZ6TjQEqfoqB2Bp8YYX6YNutrWOgh7lCKt7rmUoDMdx5PpK4R1Gahgu1xVekMF4NmhGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR18MB2176 X-Proofpoint-GUID: YvxangV4a8nnSYXVrtitu0WAxDmBLLBg X-Proofpoint-ORIG-GUID: YvxangV4a8nnSYXVrtitu0WAxDmBLLBg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-26_03,2022-05-25_02,2022-02-23_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > /** > + * Asymmetric crypto key exchange operation type > + */ > +enum rte_crypto_asym_ke_type { > + RTE_CRYPTO_ASYM_KE_PRIVATE_KEY_GENERATE, Is it better to shorten it to=20 RTE_CRYPTO_ASYM_KE_PRIV_KEY_GENERATE RTE_CRYPTO_ASYM_KE_PUB_KEY_GENERATE > + /**< Private Key generation operation */ > + RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE, > + /**< Public Key generation operation */ > + RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE > + /**< Shared Secret compute operation */ > +}; > + > +/** > * Padding types for RSA signature. > */ > enum rte_crypto_rsa_padding_type { > @@ -238,7 +248,7 @@ struct rte_crypto_modinv_xform { > * > */ > struct rte_crypto_dh_xform { > - enum rte_crypto_asym_op_type type; > + enum rte_crypto_asym_ke_type type; > /**< Setup xform for key generate or shared secret compute */ > rte_crypto_uint p; > /**< Prime modulus data */ > @@ -375,26 +385,27 @@ struct rte_crypto_rsa_op_param { > struct rte_crypto_dh_op_param { > rte_crypto_uint pub_key; > /**< > - * Output generated public key when xform type is > - * DH PUB_KEY_GENERATION. > - * Input peer public key when xform type is DH > - * SHARED_SECRET_COMPUTATION > + * Output - generated public key, when xform type is It is not xform type, Right? It should be key exchange type. Check at other places also. > + * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE. > * > + * Input - peer's public key, when xform type is > + * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE. > */ >=20 > rte_crypto_uint priv_key; > /**< > - * Output generated private key if xform type is > - * DH PRIVATE_KEY_GENERATION > - * Input when xform type is DH SHARED_SECRET_COMPUTATION. > + * Output - generated private key, when xform type is > + * RTE_CRYPTO_ASYM_KE_PRIVATE_KEY_GENERATE. > * > + * Input - private key, when xform type is one of: > + * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE, > + * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE. > */ >=20 > rte_crypto_uint shared_secret; > /**< > - * Output with calculated shared secret > - * when dh xform set up with op type =3D > SHARED_SECRET_COMPUTATION. > - * > + * Output - calculated shared secret when xform type is > + * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE. > */ > }; >=20