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 5A41842A4E; Wed, 3 May 2023 13:51:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59FCE42D31; Wed, 3 May 2023 13:50:51 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2075.outbound.protection.outlook.com [40.107.223.75]) by mails.dpdk.org (Postfix) with ESMTP id 9112041144 for ; Wed, 3 May 2023 13:50:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FzPDD+LS0IjgPyHQzeAizgC4mlii5Van/EPmXtqHj+ePO+M+w2P36gtsKSC38KI1j6cBOoXOJXoUlB1fq7ImP57JA3/ORxroueLqg385/t+ZDmbGlBchFYFI6gv80A5fu6rJFmNriVz+ABE7+DEjJI6mtkSq2PlQwjz1MCyL3lVFC9/n0We0TD/CLjqJq3CleAU/jRDsNfdo9LRjC7A/vewMLa9MMYBOAO3vD8/STMWCCLunS2oRggwCFZmQ6ryqvJLrQUZ9zRzc4ZfwlnZ3UCX+h1/d81RuWs2JYqvfaqe4oLlLNwVrQ9DEbZ0myisXx2BbOgE33i7pxYYEHMbgWg== 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=a7Sa09+BAOeVTlVd/fpbA/NpidOpVzB591CuFNrEE5c=; b=lLxVC3Kk4jQWbERQFigong28IfldKGQ4Pj74EWMvh2p+9RKx7hhFNS8/4ge6ia7vAk/CK0pcKfrV9VVc5uLTWcgDANzkk9YmGCOHQCNWzSr6hjTaQ12niRxPD2PKPgCtALZPrbPF2H0uLJQ8u76M1LS9ztqamvszVlHt/KLMofDo56Il25QFsrj9X92VNogOWdQoWcqAV+O/9rwbUpQcVFwPMwwzr/qd5y69nyWHD/6nF9FHHDEJcjtU/2v0dItNlmgNNy3PMmfghzXUkMKqvxEeUsD9yBx+A/0ioImmptRXJ/GJkhK5jIqD9CGI6UdkREpucnIoTYFPU0A3vvUKXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=a7Sa09+BAOeVTlVd/fpbA/NpidOpVzB591CuFNrEE5c=; b=VVHqf8VNtqaf3Nm8qay8/BVT0AHKKwG2lIuhg1xRwsSdRC5dk4PeJ0cFKJwfT1vt0Nu6c/6nluBfFPRbcM6ToBNgeqw/z3spNbexziT87aYqZ0QxCfLFFIxyv0UPkjk2g+8BBfjUGTge8eLAPIUJ1QYMMaTVtHVPwC95KTkupOl1M3dTrGGoOvuTUfPh//Aj9wzfPmLev6WTpF1O/xwSzWmdCEwR0mPgmxo5R0wsy7u1cI8/13G/RX51nDj1UGrfKgyw8Muf1wQcWWQPTsJUO4jpFoNd+OF5m8VWhFgGjtieXMKppbeUbkr51NatrTxMqS8AEsdwHksbsDLqWiWkWQ== Received: from BN9PR03CA0397.namprd03.prod.outlook.com (2603:10b6:408:111::12) by IA1PR12MB9031.namprd12.prod.outlook.com (2603:10b6:208:3f9::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.22; Wed, 3 May 2023 11:50:47 +0000 Received: from BN8NAM11FT046.eop-nam11.prod.protection.outlook.com (2603:10b6:408:111:cafe::1c) by BN9PR03CA0397.outlook.office365.com (2603:10b6:408:111::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.20 via Frontend Transport; Wed, 3 May 2023 11:50:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN8NAM11FT046.mail.protection.outlook.com (10.13.177.127) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.22 via Frontend Transport; Wed, 3 May 2023 11:50:46 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Wed, 3 May 2023 04:50:31 -0700 Received: from nvidia.com (10.126.231.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Wed, 3 May 2023 04:50:28 -0700 From: Tal Shnaiderman To: CC: , , , , , Subject: [PATCH 3/3] net/mlx5: support enhanced multi-packet write on Windows Date: Wed, 3 May 2023 14:49:21 +0300 Message-ID: <20230503114921.4588-4-talshn@nvidia.com> X-Mailer: git-send-email 2.16.1.windows.4 In-Reply-To: <20230503114921.4588-1-talshn@nvidia.com> References: <20230503114921.4588-1-talshn@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT046:EE_|IA1PR12MB9031:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b537645-7821-4c2f-6d1c-08db4bcca242 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: pXisjM7R5ynhthSJGcgQbrJtyEE/93hmDCcvxYMASImrOv0vrlYyTVBMiv/auKGO3CyziJFuVXgb9rS4ExZWu6BXPVpNZ+bMY/CZGW09+/Ejizla+F5N8AMbzdKb8FNvTV810AVvka5Rts/3CX3y17OlX4qs0pDVFZ9W2JlsdHfHoVldLiwrIZCIqlg9OHV9UFby062vbGWW9Z1YCuFuqDsYIl+nIBRZprg2g8q/OFNWUXyDZtjNro+PMEqQCl4339CwbC0dEgsqZgfhYNxSBPQe8GR2w2fR98452ENvKbgcZt6uKPzlaJEBZ95twk95jgy4hprDuFTz4Xhu50vO0LN2kpEgtfliIHnuqHQdUpkrLM2qa7CYWPdzSf+CL0UVIXRAVaRFXvwAArjo6GoUVSp+OYpLAw2fRzpMjSFbSJ5Tr0aCUJG7Un7Q3PMWyuX6Xy/Vo03AAZcqKIUVKXpGOMrFhNPsR6qsdg8l8jB3ZEyOkKBm4mhFF8vY6NruY8aFgaDQTG3FHtw93JZ2kN4xPJ+4/Ys6dnqf24kjmUke+nQC7Pi4AETZBuZyUrPj+9nGKQAdtecEzC34EpZEVfE23TVsiUsFdAbeQV6cQ5ucUIKtUNaPveiuD1swyO2lUSnJPahWeELqkjlGIkuCg4xeqBSiVvci0fgS5yiH+5tIXgvC7h/bgwgnEyjwSofeEKzWqrKpSsAtJCCxRYlVEh60oQ== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(136003)(376002)(346002)(396003)(39860400002)(451199021)(40470700004)(36840700001)(46966006)(5660300002)(107886003)(36756003)(82740400003)(6666004)(478600001)(41300700001)(40480700001)(55016003)(7636003)(356005)(316002)(40460700003)(70586007)(70206006)(8936002)(8676002)(4326008)(6916009)(82310400005)(7696005)(16526019)(6286002)(186003)(336012)(426003)(2616005)(86362001)(36860700001)(54906003)(26005)(1076003)(47076005)(83380400001)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2023 11:50:46.8856 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1b537645-7821-4c2f-6d1c-08db4bcca242 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT046.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB9031 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 Add support for enhanced multi-packet write on Windows. Enhanced multi-packet write allows the Tx burst function to pack up multiple packets in a single descriptor session to save PCI bandwidth and improve performance. The feature can be controlled by the txq_mpw_en PMD argument: txq_mpw_en=1 - PMD will first attempt to use "enhanced multi packet write" if the feature is not supported by the HW the legacy "multi packet write" will be used. if both are unsupported the multi packet write feature is disabled. txq_mpw_en=0 - multi packet write is disabled. txq_mpw_en unset(default) - enhanced multi packet write will be activated if supported. if unsupported the multi packet write feature is disabled. Signed-off-by: Tal Shnaiderman --- doc/guides/rel_notes/release_23_07.rst | 33 ++++----------------------------- drivers/common/mlx5/mlx5_devx_cmds.c | 6 ++++++ drivers/common/mlx5/mlx5_devx_cmds.h | 2 ++ drivers/net/mlx5/windows/mlx5_os.c | 8 +++++++- 4 files changed, 19 insertions(+), 30 deletions(-) diff --git a/doc/guides/rel_notes/release_23_07.rst b/doc/guides/rel_notes/release_23_07.rst index a9b1293689..d74551414d 100644 --- a/doc/guides/rel_notes/release_23_07.rst +++ b/doc/guides/rel_notes/release_23_07.rst @@ -24,36 +24,11 @@ DPDK Release 23.07 New Features ------------ -.. This section should contain new features added in this release. - Sample format: +* **Updated NVIDIA mlx5 driver.** - * **Add a title in the past tense with a full stop.** - - Add a short 1-2 sentence description in the past tense. - The description should be enough to allow someone scanning - the release notes to understand the new feature. - - If the feature adds a lot of sub-features you can use a bullet list - like this: - - * Added feature foo to do something. - * Enhanced feature bar to do something else. - - Refer to the previous release notes for examples. - - Suggested order in release notes items: - * Core libs (EAL, mempool, ring, mbuf, buses) - * Device abstraction libs and PMDs (ordered alphabetically by vendor name) - - ethdev (lib, PMDs) - - cryptodev (lib, PMDs) - - eventdev (lib, PMDs) - - etc - * Other libs - * Apps, Examples, Tools (if significant) - - This section is a comment. Do not overwrite or remove it. - Also, make sure to start the actual text at the margin. - ======================================================= + * Added support for multi-packet RQ on Windows. + * Added support for CQE compression on Windows. + * Added support for enhanced multi-packet write on Windows. Removed Items diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index a31e4995f5..b2abc742cf 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -1298,6 +1298,12 @@ mlx5_devx_cmd_query_hca_attr(void *ctx, attr->rss_ind_tbl_cap = MLX5_GET (per_protocol_networking_offload_caps, hcattr, rss_ind_tbl_cap); + attr->multi_pkt_send_wqe = MLX5_GET + (per_protocol_networking_offload_caps, + hcattr, multi_pkt_send_wqe); + attr->enhanced_multi_pkt_send_wqe = MLX5_GET + (per_protocol_networking_offload_caps, + hcattr, enhanced_multi_pkt_send_wqe); /* Query HCA attribute for ROCE. */ if (attr->roce) { hcattr = mlx5_devx_get_hca_cap(ctx, in, out, &rc, diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h index edcd867c4e..c8427d2dbb 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.h +++ b/drivers/common/mlx5/mlx5_devx_cmds.h @@ -285,6 +285,8 @@ struct mlx5_hca_attr { uint32_t striding_rq:1; uint32_t ext_stride_num_range:1; uint32_t cqe_compression_128:1; + uint32_t multi_pkt_send_wqe:1; + uint32_t enhanced_multi_pkt_send_wqe:1; uint32_t set_reg_c:8; uint32_t nic_flow_table:1; uint32_t modify_outer_ip_ecn:1; diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c index 6527269663..b731bdff06 100644 --- a/drivers/net/mlx5/windows/mlx5_os.c +++ b/drivers/net/mlx5/windows/mlx5_os.c @@ -173,7 +173,6 @@ mlx5_os_capabilities_prepare(struct mlx5_dev_ctx_shared *sh) sh->dev_cap.max_qp = 1 << hca_attr->log_max_qp; sh->dev_cap.max_qp_wr = 1 << hca_attr->log_max_qp_sz; sh->dev_cap.dv_flow_en = 1; - sh->dev_cap.mps = MLX5_MPW_DISABLED; DRV_LOG(DEBUG, "MPW isn't supported."); DRV_LOG(DEBUG, "MPLS over GRE/UDP tunnel offloading is no supported."); sh->dev_cap.hw_csum = hca_attr->csum_cap; @@ -224,6 +223,13 @@ mlx5_os_capabilities_prepare(struct mlx5_dev_ctx_shared *sh) DRV_LOG(DEBUG, "Maximum Rx indirection table size is %u", sh->dev_cap.ind_table_max_size); } + if (hca_attr->enhanced_multi_pkt_send_wqe) + sh->dev_cap.mps = MLX5_MPW_ENHANCED; + else if (hca_attr->multi_pkt_send_wqe && + sh->dev_cap.mps != MLX5_ARG_UNSET) + sh->dev_cap.mps = MLX5_MPW; + else + sh->dev_cap.mps = MLX5_MPW_DISABLED; sh->dev_cap.swp = mlx5_get_supported_sw_parsing_offloads(hca_attr); sh->dev_cap.tunnel_en = mlx5_get_supported_tunneling_offloads(hca_attr); if (sh->dev_cap.tunnel_en) { -- 2.16.1.windows.4