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 48D35A050A; Tue, 12 Apr 2022 17:01:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E7E340DF6; Tue, 12 Apr 2022 17:01:20 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2085.outbound.protection.outlook.com [40.107.244.85]) by mails.dpdk.org (Postfix) with ESMTP id 571194014F for ; Tue, 12 Apr 2022 17:01:19 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dOepetkAQCLUF3Pv+EOd8QVNRujS1OvxKphVFaXZcrUQ3AZSjf9AguInb4NXJB1ZqHOy7kawErWv0e7ZiO09JJ6cTSPKGQyj7PLsBnXOUGjAWK17u8KMBkcamhAELS2HR+W0vwX4nbfFGQDW561onstnKjup9SlEJpiz3innd3RGfm+YhCtTL+KsxjFm3Prz7FBVaahmouNe+kJnTpjJIPWam7poGFxf9ZfSZnIm9ybBL4tmbugEwmjEH1LoDHlldWKJxllZZfH0Qn8Ncgi++NBdQQdZXUdML8dJGi3eTKGUSKy64tDKp9y7h+Xjco6Gg8YwgFLFhuXQATTySZGHFA== 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=Ua5inxSlgC9cKvEyT4gpWobrH10yqr/3mixXhDmKuYY=; b=Q3Pe/I5nDjzotDOLkIIRjJulmaETlVJe2Y83uNqFXmpExXfjBlWqzSVvCMj3VRIBD/xkVDQC4T0hKu/lZqOHzNRlkh6+4YtJKASjMzthcIGd/xK7Gfg13Ax/vkH5kRm6JNrIIqlkcbi1K1A/wa68dSP9jheLqtt59+Tw3xUdBrfiE0SFJljW6My5BYv/a1InnaBQy/PB8EqBJ6MPaP0Q+JyEOPmyOCE3wzP556tobd16xElSqzHVWKME19/pgnDbkkn5wc06UR6ctZUcO0ZwZ0sEUOlmDvSovm4wo2r3NQm+eknFK6Cz63Nfaaav3J3mclvRB25Xj6/eaUfotW7MKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=monjalon.net 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=Ua5inxSlgC9cKvEyT4gpWobrH10yqr/3mixXhDmKuYY=; b=I0pfmPrPUgXGTsIww1/V4QaNS+kp8Zep5hp62F5oQ92jK45bNrssMjMp0bs66KKnzFEjmMUXjO2kWS7SegOqjC0z2rVl0bCzJU3fYxW3D9a3AVGZKHiVE3xg8D7gtU9JehrBttw+YPB8CO0DEqJmsBpENhqjsl9zouPQAxrzp7C2b8hQ79VZG4RA7YC3zIT++C3CyBRuO+objCgDCjmG1YlgumsPOMcVTOLjwqffuNi/k/ODu3FmK8RsUMf0avixzv5Iclr07I8+jTmsd3Wfw5C1AMy3B1XbZqS5+yof0LuoiMxjJdq/yZZJ3ybS7kV0hqlSbmNBKQTuPTP06EJvDQ== Received: from BN6PR16CA0044.namprd16.prod.outlook.com (2603:10b6:405:14::30) by DM6PR12MB3145.namprd12.prod.outlook.com (2603:10b6:5:3a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.29; Tue, 12 Apr 2022 15:01:16 +0000 Received: from BN8NAM11FT019.eop-nam11.prod.protection.outlook.com (2603:10b6:405:14:cafe::d0) by BN6PR16CA0044.outlook.office365.com (2603:10b6:405:14::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.18 via Frontend Transport; Tue, 12 Apr 2022 15:01:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) 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 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.235) by BN8NAM11FT019.mail.protection.outlook.com (10.13.176.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5144.20 via Frontend Transport; Tue, 12 Apr 2022 15:01:16 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 12 Apr 2022 15:01:10 +0000 Received: from nvidia.com (10.126.230.35) 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.22; Tue, 12 Apr 2022 08:01:09 -0700 From: Tal Shnaiderman To: CC: , Subject: [RFC PATCH 2/3] net/mlx5: support CQE compression on Windows Date: Tue, 12 Apr 2022 17:59:59 +0300 Message-ID: <20220412150000.3412-3-talshn@nvidia.com> X-Mailer: git-send-email 2.16.1.windows.4 In-Reply-To: <20220412150000.3412-1-talshn@nvidia.com> References: <20220412150000.3412-1-talshn@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a1fdc671-a9d7-4a65-4977-08da1c954b52 X-MS-TrafficTypeDiagnostic: DM6PR12MB3145:EE_ X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr 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: DGVaD+WEs4u5Eq0E3Y4gfmQyYy4hMRSc/6c2c3l+nF+1b8QRw4bWmGXjvXVihTk6h4KVbB4lpp6vUsRriAQOolFopzN5XfjGeaYlXLjB6Z7lm80FSNTlymhaDCa0Zg20KGpfvZ2ZjQrdh4Gg0JAlj+TirvkO25Yya8Dvgt+WIp89LJsIhPhNqR45HgwsLJpx4KCXfLv4WJq5SeIz47WrgzckiMP1s2nS1E9VTjURdfrCy73gQc5L1bG/ZtpMLm8kebFgbySlh10A4fSCK/5haoIF5Mn7x1asUGRK26+opu4mX00f3goHDy7YLVRoZtONqsCGEn+RzjSM0uOdDVN6p952GGjx9PqafPYq4s3vU62uobuKGAGpoYQYAwro8h8sB1V8R7qdrJwJvWn8FmMCxCkcRUcp9iDLwa4jZhdDkC5YPUpX+GrMobrF3X/+tzM69BNJFERmTR+nrRnnfA6TiSRcuy3yQkrzPTr4T0/BYYp1XOMjwzVg6NFjERu3wIaxEg0hIS6QVTqYZCCQ0movDOME8W6cvLiwrym4lOhgrqy2+YL1wFxYCUFtLSPz/ZkjA6gwXFNrDsYvqGYwIBvGCYqgUgWt8FI5V3pJ/aMeHUZ+SqmCkB0fWVUF1dU9AHV5ZGEoFTHrKdAvZCB9hd9YjpUMUXy8sAvul4cPVeqG/RDb5EG6UGsppNVA/kcpuTldJn/XEadhAauP/DkoezqtzZg0PBp6SHjjb8HQTudCUhCZaxzJdvVpOc9AzpawMO5ptUwbnDC8xTmC1My5v3PepQ== X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(46966006)(36840700001)(40470700004)(86362001)(8936002)(55016003)(508600001)(356005)(5660300002)(4326008)(316002)(70586007)(54906003)(70206006)(8676002)(7696005)(336012)(36860700001)(426003)(47076005)(186003)(26005)(1076003)(107886003)(16526019)(40460700003)(82310400005)(6916009)(83380400001)(6666004)(81166007)(2616005)(6286002)(36756003)(2906002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2022 15:01:16.3860 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a1fdc671-a9d7-4a65-4977-08da1c954b52 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT019.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3145 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 CQE Compression reduces PCI overhead by coalescing and compressing multiple CQEs into a single merged CQE. Add supported for the CQE compression feature on Windows. feature is enabled by default unless not supported by the HW or if the rxq_cqe_comp_en PMD argument is explicitly disabled. Signed-off-by: Tal Shnaiderman --- drivers/common/mlx5/mlx5_devx_cmds.c | 2 ++ drivers/common/mlx5/mlx5_devx_cmds.h | 1 + drivers/net/mlx5/windows/mlx5_os.c | 8 ++++++++ 3 files changed, 11 insertions(+) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index 7900254287..a109341d02 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -956,6 +956,8 @@ mlx5_devx_cmd_query_hca_attr(void *ctx, attr->cqe_compression = MLX5_GET(cmd_hca_cap, hcattr, cqe_compression); attr->mini_cqe_resp_flow_tag = MLX5_GET(cmd_hca_cap, hcattr, mini_cqe_resp_flow_tag); + attr->cqe_compression_128 = MLX5_GET(cmd_hca_cap, hcattr, + cqe_compression_128); attr->mini_cqe_resp_l3_l4_tag = MLX5_GET(cmd_hca_cap, hcattr, mini_cqe_resp_l3_l4_tag); attr->umr_indirect_mkey_disabled = diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h index 2d813c0fdc..6413176f2e 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.h +++ b/drivers/common/mlx5/mlx5_devx_cmds.h @@ -258,6 +258,7 @@ struct mlx5_hca_attr { uint16_t max_wqe_sz_sq; uint32_t striding_rq:1; uint32_t ext_stride_num_range:1; + uint32_t cqe_compression_128:1; }; /* LAG Context. */ diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c index 02438ece56..232f22232b 100644 --- a/drivers/net/mlx5/windows/mlx5_os.c +++ b/drivers/net/mlx5/windows/mlx5_os.c @@ -237,6 +237,14 @@ mlx5_os_capabilities_prepare(struct mlx5_dev_ctx_shared *sh) } else { DRV_LOG(DEBUG, "Tunnel offloading is not supported."); } +#if (RTE_CACHE_LINE_SIZE == 128) + if (hca_attr->hca_attr.cqe_compression_128) + sh->dev_cap.cqe_comp = 1; + DRV_LOG(DEBUG, "Rx CQE 128B compression is %ssupported.", + sh->dev_cap.cqe_comp ? "" : "not "); +#else + sh->dev_cap.cqe_comp = 1; +#endif snprintf(sh->dev_cap.fw_ver, 64, "%x.%x.%04x", MLX5_GET(initial_seg, pv_iseg, fw_rev_major), MLX5_GET(initial_seg, pv_iseg, fw_rev_minor), -- 2.16.1.windows.4