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 0FF98A0C4E; Tue, 2 Nov 2021 09:27:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B74534069F; Tue, 2 Nov 2021 09:27:42 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2063.outbound.protection.outlook.com [40.107.237.63]) by mails.dpdk.org (Postfix) with ESMTP id 91B4D4068F for ; Tue, 2 Nov 2021 09:27:40 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FpTYkvqYPuOvkqAoi0L/a1yg6DPn1NMc+Wdg1/qTvWvZm03FYLmqJDpa7a5JggcMYGmjdiaEg1UGkbgCzDOhV8m5BQMLsUHzPUK3qyWp00jB0zUxgsZDtukfqUpEh1axZn4ZihqGFEet8zJ14s17qhUp+lQcNnSeFSaEUN+3p/lwBOda76IIuCaJGWDQmJxX7xTPzZqKHcWx6a2rU02p05phmtiqR2SzfBHmqThKmOis8Ic9AHtXrri6FzWxGENO06mEwN4E7vzqcpT5QoqFPTpYUgQJnWtxwBCw3rP00+X2SbVrhjiJsD6/sRAEkusJmJP+Awf2/MbGG+UWmRd+Bg== 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=7+1vZIrXzQTku8lvbxd7N7xEHUe4qvVDnSzUVwZkd8c=; b=Zb5c07y3A03ttw7MClBn1zoS+f9qL5Q7nC5BFe3KctRadAcJCDepmvARXRIkYadkLRZQlKTBLUGn6+FaWS2qfT0BwbzRhete+M7pijNXL+KWKsKook54ym4rD9Qhc6/UYZS0SXSDY74ozLQrJ0YxofoJhbYltoxaXBEHQR//Vf/Q8A3SgapIaGnMkpWQpwTklauamaEZvemef+rp8RE+9rDZ/mG+DKxoyojrXEtX8jwExSzH0zNvmomf/g8grffywTmVDrCcsxHnuqV5dUaQ4xUIVpqoj2KyPUS3URNQM3PazwtF3E4jkvFjfqVFtGjBjwUxXb0eyxiRJ44YWz7rGA== 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=7+1vZIrXzQTku8lvbxd7N7xEHUe4qvVDnSzUVwZkd8c=; b=Yb2cBJeX5dk0ZmTPXX8QGF6YKVn6jgySFB+gpILnQnhJk7F4wmobsllbkOnKGHnz6qtjf0UoeUG4Q7Fhvx+FdNelMe+i9/rVH2gG6XRrFikVZBUkphuamt19N5a18lP0k3+JdRiBoQMCVl2LwRZkwTUalw6KWilU+OwsFMe45CDWxlVCcgGcMtmhdJx4gKKsZLEEzVdtb/KAFzcwf6AjeeNpDwh3INJQsQ2aT9bdMx9dPGcK9NiqeCSWPqx0Om7GeeiMIx278L999rdDffseFmn7aRAmHnR5gTNtrSM4KohGz1F6mkXbLgefx78ltBvy2EUOh8QI8A5LzT0cqQRIcw== Received: from DM4PR12MB5389.namprd12.prod.outlook.com (2603:10b6:5:39a::7) by DM4PR12MB5037.namprd12.prod.outlook.com (2603:10b6:5:388::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14; Tue, 2 Nov 2021 08:27:39 +0000 Received: from DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::45be:2914:19ef:f4bb]) by DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::45be:2914:19ef:f4bb%3]) with mapi id 15.20.4649.019; Tue, 2 Nov 2021 08:27:39 +0000 From: Matan Azrad To: Raja Zidane , "dev@dpdk.org" Thread-Topic: [PATCH] crypto/mlx5: support 1MB data-unit Thread-Index: AQHXzzIHpWeySjposk+ULyGeequFQavv5+2w Date: Tue, 2 Nov 2021 08:27:39 +0000 Message-ID: References: <20211101150547.34040-1-rzidane@nvidia.com> In-Reply-To: <20211101150547.34040-1-rzidane@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c193d9af-45d0-4a8e-d555-08d99ddaa1d7 x-ms-traffictypediagnostic: DM4PR12MB5037: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8Hec279TJq9TzCKBgLSdqGpaJakHLvVkyly5/QqeRAS7aBNSt7KckyaCE9MgQAh0C98sLsRNAZvpaOVwnKthOxoBfeZwydzr5MXliAsQYv7ChI3YkEF1WVBTgYkzCreN7Cf2XoLefNSPwJZY5/3wgCVvpTCpS/qqVApB1RU1U5wUsxZdmo7MP6eIBdPcTLIccS20n5TgLckCPG9HmJmqH1CsXKgDVHJurfVcDZP0dKtYmXeRkEPRxAGBxUO1Ii+Af18/vjPHkZqTX/Hc1WpKUd8DYcPcMD1f5ssMgN0706yM4gcioOobrFL6kciNA83qqnmQjZcm/kUry4y4Tm8WqDGxu2fYPrmdFVL3LdIW+g3W5ZgvOBrm8t6q7uneZ6FjnLb8mlt20iVrFa/UwKjFhRMe6U15rsLaNjILOdwfo1GZz7yfiFSz+jWE+ig6vGrPbatYsP8wTITIZklGk9bdwkNAkVgN6yMZnaA3s+oRSZ/UO06jjZqC1pSVPFL7YLZtIFNuKmkJ3YXHvRNYNBsNnZsTOn9C9gV664G3Lu+SFxVtngBZPguLfHGRdGPxNFQcYEbDPLDZJoXqKoKaqeo5iu4FzbtrJtcl1B2ohKbAXyPlKTPjsS+w/MXSN7jpivoGapsmLfDPTeirV/PkZ7osiJYlJzGZXiWDgHwr/xC3C2UWJewVMJoQ4J3HKuMuRx3SbqV9LnfV+3tGFuxpg+5b0w== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5389.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(76116006)(86362001)(55016002)(2906002)(508600001)(33656002)(110136005)(71200400001)(83380400001)(186003)(26005)(9686003)(316002)(66946007)(5660300002)(8936002)(7696005)(122000001)(52536014)(38070700005)(38100700002)(8676002)(6506007)(64756008)(66446008)(66556008)(66476007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?v81pg6PziXUMQo3UTCWxGxPZF0ERB8yihmgE5NGIhJRqEQdk4ZTk4QDnhF3A?= =?us-ascii?Q?0VnWOjpFOWpbsSkrXhsXZ6gHXDW2qLnVA6058Bopq4AeMjd9Q2H6UixYVCSC?= =?us-ascii?Q?y0Rx5izFmF3slrRmqczFTK6sf1/5qjnh/MI5m1MDb+HbBUwVxKyNzPfTtnHo?= =?us-ascii?Q?6Ce0MNMDYfog4fG4tq7/UZQQv1/YnUzS5hzgl8S5pAWYHYtWEr2xKR/fQIOD?= =?us-ascii?Q?g90GL/noW0xsqZieuGR/uIe0QZYrqEfcqyAzRRIdX1ye6UG2gedChtLYCl5c?= =?us-ascii?Q?rjq2XaDCgi8qNJqyLYddgZ9HcHutfAglbMf/zbY+uJk/zzptGAFt/e2kHFj8?= =?us-ascii?Q?mjUDKTo1/3yRje70kCe6t1kWgQshJKCvp3Tkh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5kV1YClOnOE/7zX1PgxfcxQ57cLAWZZ6TH9jTOsU5PjIXkU0UYeaCv64i8Z+?= =?us-ascii?Q?fIe+upaZC4qMXaSsby4GtnEwQl7rF5VTARZPSrO65gM6TsHBDVpdJGrF/Ex+?= =?us-ascii?Q?xnQlILkvxvKBEr616GuQo8yD6qn/k7b3gIksYSmEmOIKkd4bOmaHEyTWAZzL?= =?us-ascii?Q?2pYfDs0me7WbZ+2ZRb69fvVXROZ0199meJXhCkpEUI6bgZAlyq1ULVNsHHw1?= =?us-ascii?Q?yhwE3a9hRBJHFdk7cLk5sYQQpiK1AxNbuPIW4X37uk7nl5F9DIH+9hWaNDYL?= =?us-ascii?Q?kTnqDfcBv3owhF0oLE1GEU5yW7h0apSvmsrN4uMfSFwBLuhyYGfjewlrKQ63?= =?us-ascii?Q?8qUxswDyKNYoPvqbQt/DQFo=3D?= 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: DM4PR12MB5389.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c193d9af-45d0-4a8e-d555-08d99ddaa1d7 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Nov 2021 08:27:39.1800 (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: B01MeBA1EqdrqDkbXcddx9oCdHP3uYIyCvD4reXancsh373a2k+MJkHTJWF985IsMEDW5F67VMVSHVGhYVTCeg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5037 Subject: Re: [dpdk-dev] [PATCH] crypto/mlx5: support 1MB data-unit 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 Sender: "dev" From: Raja Zidane > Add 1MB data-unit length to the capability's bitmap. > Handle 1MB data-unit length in the mlx5 session create operation, and exp= ose > its capability in the mlx5 capabilities. >=20 > Signed-off-by: Raja Zidane > Acked-by: Matan Azrad > --- > doc/guides/cryptodevs/mlx5.rst | 2 +- > drivers/crypto/mlx5/mlx5_crypto.c | 8 +++++++- > examples/l2fwd-crypto/main.c | 5 +++++ > lib/cryptodev/rte_cryptodev.h | 1 + > 4 files changed, 14 insertions(+), 2 deletions(-) >=20 > diff --git a/doc/guides/cryptodevs/mlx5.rst b/doc/guides/cryptodevs/mlx5.= rst > index 68bfdf3a83..bc6ae82d40 100644 > --- a/doc/guides/cryptodevs/mlx5.rst > +++ b/doc/guides/cryptodevs/mlx5.rst > @@ -147,7 +147,7 @@ Limitations > ----------- >=20 > - AES-XTS keys provided in xform must include keytag and should be wrapp= ed. > -- The supported data-unit lengths are 512B and 1KB. In case the `datauni= t_len` > +- The supported data-unit lengths are 512B and 4KB. In case the > +`dataunit_len` Probably typo caused eventually wrong change in the doc. We need to add 1M as supported from xform conf in this sentence. > is not provided in the cipher xform, the OP length is limited to the a= bove > values and 1MB. >=20 > diff --git a/drivers/crypto/mlx5/mlx5_crypto.c > b/drivers/crypto/mlx5/mlx5_crypto.c > index f430d8cde0..c3a9d2d8f7 100644 > --- a/drivers/crypto/mlx5/mlx5_crypto.c > +++ b/drivers/crypto/mlx5/mlx5_crypto.c > @@ -59,7 +59,8 @@ const struct rte_cryptodev_capabilities > mlx5_crypto_caps[] =3D { > }, > .dataunit_set =3D >=20 > RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_512_BYTES | > - > RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_4096_BYTES, > + > RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_4096_BYTES | > + > RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_1_MEGABYTES, > }, } > }, } > }, > @@ -221,6 +222,11 @@ mlx5_crypto_sym_session_configure(struct > rte_cryptodev *dev, >=20 > ((uint32_t)MLX5_BLOCK_SIZE_4096B << > MLX5_BLOCK_SIZE_OFFSET); > break; > + case 1048576: > + sess_private_data->bsp_res =3D rte_cpu_to_be_32 > + ((uint32_t)MLX5_BLOCK_SIZE_1MB > << > + MLX5_BLOCK_SIZE_OFFSET); > + break; > default: > DRV_LOG(ERR, "Cipher data unit length is not supported."); > return -ENOTSUP; > diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c > index 04a3bdace2..4d9f8861af 100644 > --- a/examples/l2fwd-crypto/main.c > +++ b/examples/l2fwd-crypto/main.c > @@ -2218,6 +2218,11 @@ check_capabilities(struct l2fwd_crypto_options > *options, uint8_t cdev_id) >=20 > RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_4096_BYTES)) > ret =3D -1; > break; > + case 1048576: > + if (!(cap->sym.cipher.dataunit_set & > + > RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_1_MEGABYTES)) > + ret =3D -1; > + break; > default: > ret =3D -1; > } > diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.= h index > 56e3868ada..59ea5a54df 100644 > --- a/lib/cryptodev/rte_cryptodev.h > +++ b/lib/cryptodev/rte_cryptodev.h > @@ -102,6 +102,7 @@ struct rte_crypto_param_range { > */ > #define RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_512_BYTES > RTE_BIT32(0) > #define RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_4096_BYTES > RTE_BIT32(1) > +#define RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_1_MEGABYTES > RTE_BIT32(2) >=20 > /** > * Symmetric Crypto Capability > -- > 2.17.1