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 391E0A0C47; Tue, 5 Oct 2021 14:28:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0D19741380; Tue, 5 Oct 2021 14:28:10 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2088.outbound.protection.outlook.com [40.107.237.88]) by mails.dpdk.org (Postfix) with ESMTP id 1ABEA41366 for ; Tue, 5 Oct 2021 14:28:08 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T/p8BONh6DvZ1kKJXwuQvsvPjUcOqCSmMDJ2dSCAaIteOX1u8JCWs36bsGngzsdgkNU+oYqp33Ak4HrmiiXzOBMP1rPdvsqzmr9+UaIy7DpPtQfLCJzfN3XjZOe4flZ7JTT3YBbtFsbnvYMhLR+qmFqWf2iMVsbNst0/EIwoKNGfbSR1S8yKr7xxsYNBJ+r31dcRadALleu6+r1Gidu0hW9NL6AiuNGFLFlvAI7AzcWjf664vubLVSRPCrpRoR+uICZwBjPxaHT3J61KgvlCu38JVIjGQ1/XME1CyTl8F4XR8a2iO667TLuCDYOvPeVYPh0pnSdiDASsqyTzFbr8/g== 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=az4dcQDxfF/2sJZK/g0n7nY+9/ROQkNXxpPVM/L0hJo=; b=EMEhT7pfE0y4kbniU8sWfaGavgfFWWfXqpBLIWRqRa7wH4pNWhOlIDe2V4/IZDyL4iR2t0oZ0Y5Fm4uTNh4Sv+5mW0ToaSpOoFhpSuDMoMof5coy4vqUbH4uGN20iD2Vw+3FfgZ0z2g+G4stgi7IO/zNszn03mEwhOZUbH7cYTw6BYcLoZ26JUGkobRFZHoR81fZQ98SsL+/CyDFT/ZziIe2evSAPHSzE8FRKoz7xGU7sz+UvjPobZat/U6YoJuLJ2Dxhn+eRLTjfJksGV1JxwoA5hLIsiR7wrMt2o1kd1Xod/WlgH7YIJGBI/xIy2U0e53L+mNEfDcSWCHnDKKE+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=none 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=az4dcQDxfF/2sJZK/g0n7nY+9/ROQkNXxpPVM/L0hJo=; b=Uk/2CpAmQtVjXZlygjj5SVAVA01BJHmzNt9bI0jq7g1xrrI6u3zPYEyloIzBvjjmAPumd0sdZPUZWqn5M+nZsXL3AwCnyN0LTPuWwqL5gdOrPYw0j1WuAiLWtBvON+4Iqg25xq0vWuAgonlIiVHlYI7Sd+6eM1+b6+ZkX1YzxmdYInbVghUfyCk3c+q/mO192nMkYiJNFTCGPbBbPv2EP7whjeVV2l2IprXh58iEDdUdaVzH/4+5D3JY8t4y9n0Cgwn3kn+xoa7HSA0Vn83rc+7Kp2haJD7X0B9I7cE0w8CfDUmgrTWiJgLpqEwmK/FQfQ2M7qS7NNhRkj82m6HDQQ== Received: from DM5PR13CA0048.namprd13.prod.outlook.com (2603:10b6:3:7b::34) by DM5PR1201MB0249.namprd12.prod.outlook.com (2603:10b6:4:57::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14; Tue, 5 Oct 2021 12:28:06 +0000 Received: from DM6NAM11FT027.eop-nam11.prod.protection.outlook.com (2603:10b6:3:7b:cafe::37) by DM5PR13CA0048.outlook.office365.com (2603:10b6:3:7b::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.8 via Frontend Transport; Tue, 5 Oct 2021 12:28:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; 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 DM6NAM11FT027.mail.protection.outlook.com (10.13.172.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4566.14 via Frontend Transport; Tue, 5 Oct 2021 12:28:06 +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; Tue, 5 Oct 2021 12:28:03 +0000 From: Raja Zidane To: Date: Tue, 5 Oct 2021 12:27:30 +0000 Message-ID: <20211005122733.12444-3-rzidane@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211005122733.12444-1-rzidane@nvidia.com> References: <20210930054438.5960-1-rzidane@nvidia.com> <20211005122733.12444-1-rzidane@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain 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: 6f983af7-71ce-4456-96af-08d987fb956a X-MS-TrafficTypeDiagnostic: DM5PR1201MB0249: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1186; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vMfwDmwkHglAQvZ8jvBOICg5IlghaX2LD2hE+uOYtS4GuB3a15lJYwMS46gOuurakI9XlKjDNnE6wsZG36CQkfmBrguLUdDh/H5QamXXrpPlNfJcIqciGzumtz4rezS6B3JythLDOAZQwXYZXx+LYArs5pHw9zRuzHMS4cmHR83SyPAR7JAPq1V16ArK5lLFbus2wXQdfz7nKDeJ9Noz+rhRALO+S3hlukNWBLe0yhSCRcYp2IAvtVl0Z1+RBnY5ivTFEB4WDWZSRy9J767yWcVBMNQdvVehQwqGi2oFsKDwBvjsf65QOL/c3u8Ue2C3UNF7gkGPfwX2gBu6pjLvNUFVi+iBxgMrWPndhh7BmhXMItE8r+1AnD4ahihwE7j2X41uDzQanv3tKLDHEJhlW0g+JV2WAXBpxIOvLonaWffi76XLEQW6PBUwMqOyGYhXewhlxr6lsyUGQE7ACOsTgtLbmRc6rPSlkSYfH6Akgx9pG7laHZuCUOjY9bKgBQ8eebZYL+4hi/TjQK8mY8ZoRpHO3PDtOPbj4uRW+NJYYK0aZISY3LSgNY4RiyyxBYWheDYErD89QX3k+65+3Fh/Cf1dwSqGprU+Q2o3e+UzZY8S3f7MKNgX6MCvEmopXmcoXqGMsQsaHpd5hkCgac3V6phABG7Q8haj5MK6I1XOO8O5lPBbtjDvsq8PMJatEq8vs88O1nEVou40/QNcz3f0Jg== 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)(36840700001)(46966006)(8936002)(2616005)(8676002)(83380400001)(36756003)(6666004)(82310400003)(6916009)(70586007)(47076005)(1076003)(86362001)(356005)(7636003)(5660300002)(426003)(70206006)(7696005)(55016002)(2906002)(36860700001)(508600001)(186003)(316002)(16526019)(26005)(336012)(6286002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2021 12:28:06.1669 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6f983af7-71ce-4456-96af-08d987fb956a 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: DM6NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0249 Subject: [dpdk-dev] [PATCH V6 2/5] common/mlx5: update new MMO HCA capabilities 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" New MMO HCA capabilities were added and others were renamed. Align hca capabilities with new prm. Add support in devx interface for changes in HCA capabilities. Signed-off-by: Raja Zidane Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_devx_cmds.c | 15 ++++++++++++--- drivers/common/mlx5/mlx5_devx_cmds.h | 11 ++++++++--- drivers/common/mlx5/mlx5_prm.h | 20 ++++++++++++++------ drivers/compress/mlx5/mlx5_compress.c | 4 ++-- 4 files changed, 36 insertions(+), 14 deletions(-) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index ac554cca05..00c78b1288 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -858,9 +858,18 @@ mlx5_devx_cmd_query_hca_attr(void *ctx, attr->log_max_srq_sz = MLX5_GET(cmd_hca_cap, hcattr, log_max_srq_sz); attr->reg_c_preserve = MLX5_GET(cmd_hca_cap, hcattr, reg_c_preserve); - attr->mmo_dma_en = MLX5_GET(cmd_hca_cap, hcattr, dma_mmo); - attr->mmo_compress_en = MLX5_GET(cmd_hca_cap, hcattr, compress); - attr->mmo_decompress_en = MLX5_GET(cmd_hca_cap, hcattr, decompress); + attr->mmo_regex_qp_en = MLX5_GET(cmd_hca_cap, hcattr, regexp_mmo_qp); + attr->mmo_regex_sq_en = MLX5_GET(cmd_hca_cap, hcattr, regexp_mmo_sq); + attr->mmo_dma_sq_en = MLX5_GET(cmd_hca_cap, hcattr, dma_mmo_sq); + attr->mmo_compress_sq_en = MLX5_GET(cmd_hca_cap, hcattr, + compress_mmo_sq); + attr->mmo_decompress_sq_en = MLX5_GET(cmd_hca_cap, hcattr, + decompress_mmo_sq); + attr->mmo_dma_qp_en = MLX5_GET(cmd_hca_cap, hcattr, dma_mmo_qp); + attr->mmo_compress_qp_en = MLX5_GET(cmd_hca_cap, hcattr, + compress_mmo_qp); + attr->mmo_decompress_qp_en = MLX5_GET(cmd_hca_cap, hcattr, + decompress_mmo_qp); attr->compress_min_block_size = MLX5_GET(cmd_hca_cap, hcattr, compress_min_block_size); attr->log_max_mmo_dma = MLX5_GET(cmd_hca_cap, hcattr, log_dma_mmo_size); diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h index c071629904..b21df0fd9b 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.h +++ b/drivers/common/mlx5/mlx5_devx_cmds.h @@ -173,9 +173,14 @@ struct mlx5_hca_attr { uint32_t log_max_srq; uint32_t log_max_srq_sz; uint32_t rss_ind_tbl_cap; - uint32_t mmo_dma_en:1; - uint32_t mmo_compress_en:1; - uint32_t mmo_decompress_en:1; + uint32_t mmo_dma_sq_en:1; + uint32_t mmo_compress_sq_en:1; + uint32_t mmo_decompress_sq_en:1; + uint32_t mmo_dma_qp_en:1; + uint32_t mmo_compress_qp_en:1; + uint32_t mmo_decompress_qp_en:1; + uint32_t mmo_regex_qp_en:1; + uint32_t mmo_regex_sq_en:1; uint32_t compress_min_block_size:4; uint32_t log_max_mmo_dma:5; uint32_t log_max_mmo_compress:5; diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h index d361bcf90e..ec5f871c61 100644 --- a/drivers/common/mlx5/mlx5_prm.h +++ b/drivers/common/mlx5/mlx5_prm.h @@ -1386,10 +1386,10 @@ struct mlx5_ifc_cmd_hca_cap_bits { u8 rtr2rts_qp_counters_set_id[0x1]; u8 rts2rts_udp_sport[0x1]; u8 rts2rts_lag_tx_port_affinity[0x1]; - u8 dma_mmo[0x1]; + u8 dma_mmo_sq[0x1]; u8 compress_min_block_size[0x4]; - u8 compress[0x1]; - u8 decompress[0x1]; + u8 compress_mmo_sq[0x1]; + u8 decompress_mmo_sq[0x1]; u8 log_max_ra_res_qp[0x6]; u8 end_pad[0x1]; u8 cc_query_allowed[0x1]; @@ -1519,7 +1519,9 @@ struct mlx5_ifc_cmd_hca_cap_bits { u8 num_lag_ports[0x4]; u8 reserved_at_280[0x10]; u8 max_wqe_sz_sq[0x10]; - u8 reserved_at_2a0[0x10]; + u8 reserved_at_2a0[0xc]; + u8 regexp_mmo_sq[0x1]; + u8 reserved_at_2b0[0x3]; u8 max_wqe_sz_rq[0x10]; u8 max_flow_counter_31_16[0x10]; u8 max_wqe_sz_sq_dc[0x10]; @@ -1632,7 +1634,12 @@ struct mlx5_ifc_cmd_hca_cap_bits { u8 num_vhca_ports[0x8]; u8 reserved_at_618[0x6]; u8 sw_owner_id[0x1]; - u8 reserved_at_61f[0x1e1]; + u8 reserved_at_61f[0x109]; + u8 dma_mmo_qp[0x1]; + u8 regexp_mmo_qp[0x1]; + u8 compress_mmo_qp[0x1]; + u8 decompress_mmo_qp[0x1]; + u8 reserved_at_624[0xd4]; }; struct mlx5_ifc_qos_cap_bits { @@ -3244,7 +3251,8 @@ struct mlx5_ifc_create_qp_in_bits { u8 uid[0x10]; u8 reserved_at_20[0x10]; u8 op_mod[0x10]; - u8 reserved_at_40[0x40]; + u8 qpc_ext[0x1]; + u8 reserved_at_41[0x3f]; u8 opt_param_mask[0x20]; u8 reserved_at_a0[0x20]; struct mlx5_ifc_qpc_bits qpc; diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c index c5e0a83a8c..1e03030510 100644 --- a/drivers/compress/mlx5/mlx5_compress.c +++ b/drivers/compress/mlx5/mlx5_compress.c @@ -813,8 +813,8 @@ mlx5_compress_dev_probe(struct rte_device *dev) return -rte_errno; } if (mlx5_devx_cmd_query_hca_attr(ctx, &att) != 0 || - att.mmo_compress_en == 0 || att.mmo_decompress_en == 0 || - att.mmo_dma_en == 0) { + att.mmo_compress_sq_en == 0 || att.mmo_decompress_sq_en == 0 || + att.mmo_dma_sq_en == 0) { DRV_LOG(ERR, "Not enough capabilities to support compress " "operations, maybe old FW/OFED version?"); claim_zero(mlx5_glue->close_device(ctx)); -- 2.17.1