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 246B142B2A; Wed, 17 May 2023 10:07:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A7AD241611; Wed, 17 May 2023 10:07:04 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2060.outbound.protection.outlook.com [40.107.93.60]) by mails.dpdk.org (Postfix) with ESMTP id 88E6A4114A for ; Wed, 17 May 2023 10:07:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g+0CRwLFHAB+lTSCo+MeG9mGHPMZjsk3aPICNCBN41EtPqceOOHFTRsFLQzsa9b4vkaZF+EmOf4CdlSKd8SDJ5QOjk4qzl/85HOEfi5DCg2+Igv1YqYB+t9hcQKo91lVXDGMi69CVwUmqXsR4je+iHI7kGnI3JVCGZBuvf2V/LkCy3kf7kX95RaRSKj4x7xBLNqPLuKjK/J5YMGNBkl4mCtcukbbPQnQnYnDdHuxUZCJan4DPBrc3g6j4lH4CKgpzpXNnPAYbRAQyYqIy2xCL7rCbW/RGpzHIZ726NdtChD/E5dl2LXdk1FjjL1/v+mlbOKu/MfSJHWHoq1dAAyTyg== 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=oYM34GRex1Db+odbdqbytEcZ7IQfLZCYLEKC+Kj2sb0=; b=dN7z9Xo/UYm+5EMZ6diJrrvhd2Bc8TFL4JOxEeMUPwH0FqKLgYEjZQoBkuRYrDx6+qNlClgeBPTJpmrB5qCgF/R7CutagPHybUT8+mgQypx28CHqiOjZs1+Hmh6bJzFhEBDjRLQ6qPGZhFavMw2IglD5ECG70CdBCK85PiJmMfK/zsJYXGa5wZh3z9cFWvnzB2KQ8C4q1FqGEMQOiuQFO7asCdjDiV+AuS8tNxBb0NtQhTs21uqKMUyKa4NrpsxYTgnlphTk+E8Fa26AMn8ie+a43iFzvla31C1geGx0KpGsGAvFj2hap2SDkol/RpENhbue1n1rbuPBzjn9YZ1fTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oYM34GRex1Db+odbdqbytEcZ7IQfLZCYLEKC+Kj2sb0=; b=TGmHA6uYXWVl508Ai0KqTFm+P48PcV8KC9ACag8nykmIPOCeZqgEN2zifp2mOmB4cXuiEsmp1BGnwBUpCx1EeJcRp31vDDquVDdu1gZsfAkrQ1Nq+35x07A+NJlngPFFWNfVFoGROXxdW8QOvr8jXTLULMwgI2vHFrWncfr6/jGQ8alsF6Ih3yXiVH1X4+jUNmUrN329UJbW3evJ4rCOP1jTEUQUrPeIGXilvkxR3YbGcz31tVoH/AmATFYMeXXQNTeBI1uo9XapXdji17cfsfijVyRMDlgFTpB/Z3QLXsGLOiiWndI9Kj/labv7ja+CItgaoZCoILQYmp++gLOwOA== Received: from CO6PR12MB5396.namprd12.prod.outlook.com (2603:10b6:303:139::8) by PH0PR12MB8125.namprd12.prod.outlook.com (2603:10b6:510:293::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.29; Wed, 17 May 2023 08:06:59 +0000 Received: from CO6PR12MB5396.namprd12.prod.outlook.com ([fe80::1ff3:30ef:e7d1:8596]) by CO6PR12MB5396.namprd12.prod.outlook.com ([fe80::1ff3:30ef:e7d1:8596%6]) with mapi id 15.20.6387.029; Wed, 17 May 2023 08:06:59 +0000 From: Suanming Mou To: Akhil Goyal , Matan Azrad CC: Raslan Darawsheh , Maayan Kashani , "dev@dpdk.org" , "NBU-Contact-Thomas Monjalon (EXTERNAL)" Subject: RE: [EXT] [RFC PATCH 1/5] crypto/mlx5: add AES-GCM capability Thread-Topic: [EXT] [RFC PATCH 1/5] crypto/mlx5: add AES-GCM capability Thread-Index: AQHZcdeOwDEUUa5Oyk21Cok2IGw/qq9eQQ2AgAAA0HCAAAINAIAAAEfAgAAEFQCAAABNkA== Date: Wed, 17 May 2023 08:06:59 +0000 Message-ID: References: <20230418092325.2578712-1-suanmingm@nvidia.com> <20230418092325.2578712-2-suanmingm@nvidia.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO6PR12MB5396:EE_|PH0PR12MB8125:EE_ x-ms-office365-filtering-correlation-id: d9418b88-43cb-4112-03de-08db56adb094 x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3eESZMEyOsoSigCK5ihKXrV0Rx93sgm+yTpzOzqr6/X1Z8bBG+1Y9hql8rTie7QWqyTejARUYSPTUqI8owT69pfRFqW6a/1C6askHWh8PHI5AfkAJK0UfQeANPRjJwiGSsudxTiof1OgyEdNdM6B8QwbwhmdpxSFWGMcHyhM4bxv4dmC67rWWnGr74zHf3Qi8ayW5IlJXBgHX3rcMcyMIhuQBbPemkGX03eZGtQybGuNLqfAIbPjWrpt6wabLv99lBHotlD7MLoGpi9GbbfpOgo6gteAWcI3thkk3gjY5wv48VdvNjhC2wc9PJfjsoO9mFmmHD0SADzYv2VOF18lpE884spRxsIEHIM4C9ZBY0snXgfZy6eUJL/XTdF4SY5wl8ONdKh2clq0Mvxkwc44b5SeO7NP4IZzfc+sbOavTpPzSRS7kMfvX+NXoKd7W3j2dFMw1TwhCxnExnjFYNxNDnWoq5arNw7j4l73gjnNPLEH3w4nnbbwFsubFhct3uQdifEoEzkLWJy5LxZQCNJ27FceHucJusLYh9/cFfbqnBwDsY5DJyP6KT1MUO97OW2m2JdlCRXMnpOueYnFgi1g2v6P3bKN2//bhaLmofbs9rzrO8MjVVTlsoBU4bwOfArO x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR12MB5396.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(366004)(376002)(136003)(39860400002)(396003)(346002)(451199021)(478600001)(83380400001)(7696005)(186003)(122000001)(71200400001)(54906003)(110136005)(9686003)(53546011)(26005)(6506007)(33656002)(2906002)(66556008)(4326008)(6636002)(52536014)(38100700002)(64756008)(66446008)(66476007)(38070700005)(41300700001)(76116006)(5660300002)(86362001)(316002)(66946007)(55016003)(8676002)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?XwPP+I9TcDGkTTYHbvOr096BXPvFMpUAnRyju2J5qEqIkm1y6vXA0lXJqf9Z?= =?us-ascii?Q?vm1AwKuYgm9LzQkUHUTWhVp/fvoD3SjvwFnVeeQMVHY1sqCzDxpW90nQnn5X?= =?us-ascii?Q?uNBGCHGCucIsAM4ih3TAFGfQMsll7TBsl1FK8eqcpE8gx7mpfS3BfaVM8MSe?= =?us-ascii?Q?2t57TOeudtBFRx/KDMrBewlE5GXPOjxgtrWUOMJKbYhPYvs7UTqqE1/uQVzN?= =?us-ascii?Q?cD02w9BJwX1tDMhiwLbhMqC/XMKbsKnk+VgKAPjbG+3hJLKboA+mIHuyzkR8?=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iny/H6SJR2zQc9KON9y92Jn+YzQWk?= =?us-ascii?Q?cf7+54+YVVcBJf4OQ6sr4I3AhVMTBkiT42AHHcB0oM3EBdexX/QV6zsKUZAd?= =?us-ascii?Q?AxlmarbesxD16upT8cgu80gqX1uHeSpEsmx2lkcx3andwJi07wbz14dz8dQa?= =?us-ascii?Q?EQkcQMSXEmfJ6qDKmWtEX8YOWnO9UrJLLU6qiMYJEQqCj55xLT9kCgJZI7MI?= =?us-ascii?Q?dESv0VqhGeV6Ju25tamPVmlbdY4PmCDFOZCY2yiYlmBWO2XJuR86ihkYbzbF?= =?us-ascii?Q?4QsRKPHYfujxc6Pys5hj/QUmDmfxEYyNxxFar0p2bU+qlPNqBSVyibfHzRgj?= =?us-ascii?Q?0o7saoW8vreUwEFrnkDoE8zpReo1KPYa1r7lXYO5TQW3q46lcdYhzDbj8KFd?= =?us-ascii?Q?DoR6Bol4IuK5m/S6OKL4Rr58ITov7pIQolgDigRG?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR12MB5396.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9418b88-43cb-4112-03de-08db56adb094 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 May 2023 08:06:59.4318 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: EUAP9dYNY3+iaC2gLCeHmIuCRZKgrU7+n2AI7NcZYdmOEN9p+WPIx2hSkXwm77O61m9/sWGB1TTLu4em3c4F4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB8125 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 > -----Original Message----- > From: Akhil Goyal > Sent: Wednesday, May 17, 2023 4:03 PM > To: Suanming Mou ; Matan Azrad > > Cc: Raslan Darawsheh ; Maayan Kashani > ; dev@dpdk.org; NBU-Contact-Thomas Monjalon > (EXTERNAL) > Subject: RE: [EXT] [RFC PATCH 1/5] crypto/mlx5: add AES-GCM capability >=20 > > > Subject: RE: [EXT] [RFC PATCH 1/5] crypto/mlx5: add AES-GCM > > > capability > > > > > > > > Subject: RE: [EXT] [RFC PATCH 1/5] crypto/mlx5: add AES-GCM > > > > > capability > > > > > > > > > > > Subject: [EXT] [RFC PATCH 1/5] crypto/mlx5: add AES-GCM > > > > > > capability > > > > > > > > > > > > AES-GCM provides both authenticated encryption and the ability > > > > > > to check the integrity and authentication of additional > > > > > > authenticated data (AAD) that is sent in the clear. > > > > > > > > > > > > This commit adds the AES-GCM capability query and check. An > > > > > > new devarg "algo" is added to identify if the crypto PMD will > > > > > > be initialized as > > > > > > AES-GCM(algo=3D1) or AES-XTS(algo=3D0, default). > > > > > > > > > > Why do you need a devarg for identifying the algorithm? > > > > > Is it not sufficient to use enums rte_crypto_aead_algorithm and > > > > > rte_crypto_cipher_algorithm? > > > > > > > > > > Devargs are normally added for things which are specific to a > > > > > particular PMD > > > > And > > > > > which is not exposed via public APIs. > > > > > For identification of algo, it is not needed to use devargs. > > > > Due to current HW limitation, the NIC can only be initialized as > > > > GCM or XTS working mode during probe. It's not able to provide > > > > both in running time. That's the main reason for the devarg. > > > > Session configure with algo is too late. > > > > > > Is it not possible to reconfigure the NIC when GCM is detected in > > > session > > create? > > That means in dev info, we need to put both XTS and GCM in the > > capability. But the fact is if we reconfigure the NIC to GCM, XTS > > will not be supported. If user wants to create both XTS and GCM session= , one of > them will fail. >=20 > That would fail even in current patchset. > On another thought, is it not good to create 2 separate instances of driv= ers in > same folder, like ipsec_mb and cnxk drivers are organized. > You can change the function pointers based on the driver instance(mlx5_gc= m, > mlx5_xts) Current, we are initial the capability based on the algo, so it will not fa= il. Regarding separate the instance, yes, we will do that in the next version. = We will reuse the most of the common code in mlx5_crypto.c, mlx5_crypto_gcm= .c for GCM and mlx5_crypto_xts.c for XTS.