From patchwork Mon Oct 25 08:46:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tal Shnaiderman X-Patchwork-Id: 102756 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BB62CA0C45; Mon, 25 Oct 2021 10:47:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B1DEA41152; Mon, 25 Oct 2021 10:47:19 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam08on2080.outbound.protection.outlook.com [40.107.101.80]) by mails.dpdk.org (Postfix) with ESMTP id D6FD441148 for ; Mon, 25 Oct 2021 10:47:16 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QeXlYdfHR1+nLvDAnMtGZ6Z9rhEk7ZW2H47zRHbHJmInRJcvN+oR7WKwy5/QEYcL7nTlc3zITMyvCatk1g3tSaGHdBEeUx4lktUmYCgyTjt8pJXaJ1tNGuRdO0+AzjMg6zrBemi7Kgv7PazYyU57FU3KO2z9jA+r7QTXI8O/FcGQA+08YQiI6E+NxsRq76SW/vMUsEwoDx5xZCKzlfPRv2b/vV223d5RielEP8K6ysM12vL+EgxiYlwOjODLoBx359irtaDiZbeRW4EU+0Ax6/wXNSzepn88JAWShFl8c0T2hSY5LvFpUHzv/A0iK1UQb5eA8zv7mf4mJyOnsKFy+A== 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=8TAM5OnsXyU/0PbC8kDwwH4ajth04DdLJUGwk3xhOeU=; b=SiXvTdxaq28s+xaY1t+FE5Xewyb6lYxoTGkIk8y5eHnBa8qzLqZkEv1ef/O3d83HDc895KiDfvvDkkUt4V8fgm7PRmTZD/UThrKGoutBGbgG6mrdSd2fRpU4ffFh57CZd12h2TxD6/3d0i/1PHO+bmdM8T0Vr+NjJQBo7QIP8HlCmQ06zCuC2mYMfAdAWRMyXh7X8FfJqbhbxXPyEIb/Kgg3ZxVc4CMpaKjPTs/+D6mYekfRs1C1D2QXQDn7VAIynZ63IzEo32L8dbP2xtR9aqNMwCrndn0vmlz1u+IczVmrjjeDsQ5LJjENP9Fg8o7nmzqwac5ff10HXKQ5VUn9Qg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=marvell.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); 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=8TAM5OnsXyU/0PbC8kDwwH4ajth04DdLJUGwk3xhOeU=; b=OJDsFVb60MiwViCA4WNsFfhxKxkdWhO5AgrqS6PKyOBkE8imCm37oz4U3EtS5TFAjMTyTVE6rnRszcMIjUxitRaUuXAT2/hLOiIfR83p/wnDwMht4JT1b/8foGCzDPVbstLYRndjx5vkZNuxrTpT7sKsXpFGe5lgdm0jQ6t2v0rm9seMHQVmagbtJecvL3P2J+mu7cux5MophSrIzdmmO8YCBSmHjbnThuv57bdxDekEmjKZ7UCnc4fREEs2vPNQ4cFr3xN5jBH3DPaZENhrI4cfbxaq05XTB/HJ95LB9bgWAlOd4lt8GmlvQFtlvBQfiUHFtf4/z7u2JrOpbNNkkg== Received: from MW4PR03CA0285.namprd03.prod.outlook.com (2603:10b6:303:b5::20) by MW2PR12MB2457.namprd12.prod.outlook.com (2603:10b6:907:10::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.16; Mon, 25 Oct 2021 08:47:14 +0000 Received: from CO1NAM11FT032.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b5:cafe::94) by MW4PR03CA0285.outlook.office365.com (2603:10b6:303:b5::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.20 via Frontend Transport; Mon, 25 Oct 2021 08:47:14 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by CO1NAM11FT032.mail.protection.outlook.com (10.13.174.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4628.18 via Frontend Transport; Mon, 25 Oct 2021 08:47:13 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 25 Oct 2021 08:47:10 +0000 From: Tal Shnaiderman To: CC: , , , , , , , Date: Mon, 25 Oct 2021 11:46:17 +0300 Message-ID: <20211025084617.4952-6-talshn@nvidia.com> X-Mailer: git-send-email 2.16.1.windows.4 In-Reply-To: <20211025084617.4952-1-talshn@nvidia.com> References: <20211017094133.18988-2-talshn@nvidia.com> <20211025084617.4952-1-talshn@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 886429ea-3310-444d-bea1-08d997940a75 X-MS-TrafficTypeDiagnostic: MW2PR12MB2457: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr 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: NgdGn3tKcbobTWOvQhSduS6EMszkC85/NJoDbPo+afUUWZLAAIhmdCVZpONA1BOiulkWKkHOPTWVa75xEF7okOAmc1OgLBwLntLr2F8Vdb0jwfl/HhS0qNAqN/hOIOyCwihE9XN29iAFyikyQucyzbTiqSP+J8Jo+p4oynJNPs76ZWS4Nre+atg8JXrWE3KRbQWZK1WnsVftIvCgtIMQroXdoFPohBb3eAHahV+PO3vg0nNMDaWP61YD6KHfYK+TokoEc2PSU/CyIvmUw8aWFkHOlvhmvYWektt0eiGE6vIcGqQNyTM3P5h/sjkvSCqB+LqVWkyCoc50Mqs2vbXaqIa1Mv0pfZLRP9Ovt2N5Eza05YBOA1VCrR5nLEvGLOzCSFdFFuB9AD52z2GtiK4QEOwjqFN61gHzC3K8U1r8RfoWOzANIWR/DSTmmxv9TukL3mdZpqhMEF8ZRdL8xtIXeHvhfn7Jv//UDkVwlD52xF/77oARemaGy6mwCMioNwIuu7gPeO1Ne/3HWYeKa8RjZDRj4VG8LInul0e+q/nh01+bHwysCmiPWHkn+SF3XdkSi3hfydAEKfY4yOF/z2K6PIN/S3jjeCJXOdAhUpQ3cXH3X8Q8Zk2NJ0o3Q4W0nqPJoMwQttQqA7GNLHX3zjv5VmfiY5E3xZcZiEjiHZqjJysayQdRCvsrK7osC/guQ+w5o66OBoqGv8OnNcj1SMWsCw== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(5660300002)(8936002)(8676002)(47076005)(316002)(82310400003)(426003)(7636003)(36860700001)(336012)(2906002)(55016002)(6286002)(1076003)(16526019)(26005)(107886003)(4326008)(186003)(7696005)(70206006)(70586007)(6916009)(54906003)(83380400001)(508600001)(356005)(2616005)(86362001)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2021 08:47:13.4119 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 886429ea-3310-444d-bea1-08d997940a75 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT032.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB2457 Subject: [dpdk-dev] [PATCH v3 5/5] crypto/mlx5: support on Windows 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" Add support for mlx5 crypto pmd on Windows OS. Add changes to release note and pmd guide. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- doc/guides/cryptodevs/mlx5.rst | 15 ++++++++++++--- doc/guides/rel_notes/release_21_11.rst | 1 + drivers/common/mlx5/version.map | 2 +- drivers/common/mlx5/windows/mlx5_common_os.c | 2 +- drivers/crypto/mlx5/meson.build | 4 ++-- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/doc/guides/cryptodevs/mlx5.rst b/doc/guides/cryptodevs/mlx5.rst index 68bfdf3a83..7338c0c493 100644 --- a/doc/guides/cryptodevs/mlx5.rst +++ b/doc/guides/cryptodevs/mlx5.rst @@ -39,12 +39,12 @@ or to access the hardware components directly. There are different levels of objects and bypassing abilities. To get the best performances: -- Verbs is a complete high-level generic API. -- Direct Verbs is a device-specific API. +- Verbs is a complete high-level generic API (Linux only). +- Direct Verbs is a device-specific API (Linux only). - DevX allows to access firmware objects. Enabling ``librte_crypto_mlx5`` causes DPDK applications -to be linked against libibverbs. +to be linked against libibverbs on Linux OS. In order to move the device to crypto operational mode, credential and KEK (Key Encrypting Key) should be set as the first step. @@ -155,8 +155,17 @@ Limitations Prerequisites ------------- +Linux Prerequisites +~~~~~~~~~~~~~~~~~~~ + - Mellanox OFED version: **5.3** see :doc:`../../nics/mlx5` guide for more Mellanox OFED details. - Compilation can be done also with rdma-core v15+. see :doc:`../../nics/mlx5` guide for more rdma-core details. + +Windows Prerequisites +~~~~~~~~~~~~~~~~~~~~~ + +- Mellanox WINOF-2 version: **2.60** or higher. + see :doc:`../../nics/mlx5` guide for more Mellanox WINOF-2 details. diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst index 4fb2abf4ad..035a98d814 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -189,6 +189,7 @@ New Features * Added implicit mempool registration to avoid data path hiccups (opt-out). * Added NIC offloads for the PMD on Windows (TSO, VLAN strip, CRC keep). + * Added support for mlx5 crypto PMD on Windows operating system. * **Updated Solarflare network PMD.** diff --git a/drivers/common/mlx5/version.map b/drivers/common/mlx5/version.map index 0ea8325f9a..71cd7c625e 100644 --- a/drivers/common/mlx5/version.map +++ b/drivers/common/mlx5/version.map @@ -16,7 +16,7 @@ INTERNAL { mlx5_dev_mempool_unregister; mlx5_dev_mempool_subscribe; - mlx5_devx_alloc_uar; # WINDOWS_NO_EXPORT + mlx5_devx_alloc_uar; mlx5_devx_cmd_alloc_pd; mlx5_devx_cmd_create_conn_track_offload_obj; diff --git a/drivers/common/mlx5/windows/mlx5_common_os.c b/drivers/common/mlx5/windows/mlx5_common_os.c index 44e8ebec2b..ea478d7395 100644 --- a/drivers/common/mlx5/windows/mlx5_common_os.c +++ b/drivers/common/mlx5/windows/mlx5_common_os.c @@ -202,7 +202,7 @@ mlx5_os_open_device(struct mlx5_common_device *cdev, uint32_t classes) struct mlx5_context *mlx5_ctx = NULL; int n; - if (classes != MLX5_CLASS_ETH) { + if (classes != MLX5_CLASS_ETH && classes != MLX5_CLASS_CRYPTO) { DRV_LOG(ERR, "The chosen classes are not supported on Windows."); rte_errno = ENOTSUP; diff --git a/drivers/crypto/mlx5/meson.build b/drivers/crypto/mlx5/meson.build index 1d6e413dd5..9d9c9c00bc 100644 --- a/drivers/crypto/mlx5/meson.build +++ b/drivers/crypto/mlx5/meson.build @@ -1,9 +1,9 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2021 NVIDIA Corporation & Affiliates -if not is_linux +if not (is_linux or is_windows) build = false - reason = 'only supported on Linux' + reason = 'only supported on Linux and Windows' subdir_done() endif