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 BA43BA0C54; Fri, 3 Sep 2021 16:22:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47D5041140; Fri, 3 Sep 2021 16:22:22 +0200 (CEST) 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 B59CB410E0 for ; Fri, 3 Sep 2021 16:22:18 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q+2EeQjVlmL0DZ1lJ+ctv0BuqxbTHuUJXYLVUz52XodXfMRO8OQH+3DE9LDC/0fAJh8rk4Kg1Vpc6QO+BM6z0K3b8atHH5qYcMx+ljXdlTUZEm878bOPItPHCugLXN45Hka3TtATL4NpcmitvO9S8/i4hisGv+3u9XDyTb6rjdGy4QA8RNCQfD/hGaz1egS18kt0gEpgGZ+HaJc+T8LNcBkBBAZ9PAoRtf/MVdayROi/rD4d8J/xDGBdhVvw9RluinHT5KmqF0Bk14oarvRGechjCI6d2QHqRimvtglEJpbXpjIU6sy0GrYtvX6yzzj8KuXa8i3eLw1WFkQn6GxTiQ== 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; bh=I8x04j1U9Dn00C37R7fAiRao0eC3gsurk5X0c5fJP8I=; b=fFJ+8NgRdOeSHs5okdk3/cZR/SvB+8HQaF8A/Mxai1zxwphanDUkOal1so3jx46S5ZL2WLFr6HwpDT7ahCG2uIybCFHf7jMNTMVrz7vaI/wY4952yF5upjIsLw1YpqQkRKpMnzqL+LfPa5zDU3mkTX7VtFvKM/qe4GJkqqk7IYd8wrYZ74rRbz+1xbDbzhcZ6NpJA1znEcVs+t8wz8jGbFbH16G1SlLCOMr9SmlPInoeZ1oH9taabr3uf/fS8YCI7gNj/XnR224DF09UWi8SnbT6+cgFZ7ILDySHXnd1qYLwdf2+YEeKC1GeZ4unKmslBl50WNbYU03uBGz114CKqg== 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=I8x04j1U9Dn00C37R7fAiRao0eC3gsurk5X0c5fJP8I=; b=fRjwaLl4XTzgHKcT6BvTidD13JwKAI8cd38t6A6fp1AuwADagsiqL/fS9Pf+JVaMk2Xfkel7N93Qwjsqlk3cHq9Y1Cf66GejWYmC7ymiWqQnAGzOxZkWdcdvn/KRxR3i5x5uporskEp3CZlvtirP2ve3AF89vWbls10EZjq++kVMQoCmoJpsU4cMdPa+hvtlA3YPSmTvjarSg3UCB1VjbiI2fCI5YtlbQYN99YVJcuYDx0NyLgW+i8PUqJJFb4j+YVvJYROcK0moduJL5q4xN9wqGbS92jBI58KaJWtaUxHVYuMG6bGlZBuk6b4mKsGX2edn5o1wHWidzzK4HTU9dw== Received: from DM3PR12CA0101.namprd12.prod.outlook.com (2603:10b6:0:55::21) by BN6PR12MB1188.namprd12.prod.outlook.com (2603:10b6:404:19::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.22; Fri, 3 Sep 2021 14:22:17 +0000 Received: from DM6NAM11FT054.eop-nam11.prod.protection.outlook.com (2603:10b6:0:55:cafe::61) by DM3PR12CA0101.outlook.office365.com (2603:10b6:0:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.17 via Frontend Transport; Fri, 3 Sep 2021 14:22:17 +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 DM6NAM11FT054.mail.protection.outlook.com (10.13.173.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4478.19 via Frontend Transport; Fri, 3 Sep 2021 14:22:17 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 3 Sep 2021 14:22:15 +0000 From: Raja Zidane To: Date: Fri, 3 Sep 2021 14:21:55 +0000 Message-ID: <20210903142157.25617-4-rzidane@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210903142157.25617-1-rzidane@nvidia.com> References: <20210903142157.25617-1-rzidane@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ad688778-65a1-45ce-6a74-08d96ee63ba4 X-MS-TrafficTypeDiagnostic: BN6PR12MB1188: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:792; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AMn8b1Gzn0B5L4py3j5SRDDWGeNo3wb1+2AjS31uTbxAjCYdMBjYgrG6zMIMY6ekm+tYdKLqFQTUhOF79UYsZthu+FZnFJs5dnfSAP0tEGBJaX7iJovZ6uRL6AlNBKuD2XT5Bm3NkeLAA+cvMOE9SFeW15ybzfMAuv4rzz31C9Wrf2aFq3cCcigKqxgzWICILlW5yHROikOinWFiPeuWR8UhSaJLdn+n53J8lAnf5YTgfqbscyV9w4XJbPG7vIR0qxIJPKrBgwEDyMT1Na9vAE1iiccE/kdGrQpDZf+rLIAUnRO0J7gq90Wk5vVLC61w2W7c0aWl20AkqOgnHDoS/jbDEtPhl1sCAwyBiqd34jcDUmRgG835C6Agd5iR11twzx6DK4sZMM+mIdF4jMQJnn84ApgX1TMPjZhPQ+bAbiby3hl9Yk9UPEk/Yc1Urs13XUA9sdiFegKkUu4p9jveJoCwT/9nCP2ntjA465UDs3autd1n3IP7Ghvd7srX3uVt1VKp9zUqrF8zGdvpLEWVzWOlmVU92PCMYXdi8aUwZ6Cfbs4ZmN8KmIDgSG84mcsBaPCo4P0bGwtCZB7o6DqBXpkqRRovZ4wmpEnvNC960DPYMMEcisdvScKpsotGB/njqmt004DxhiadQSFP7rVONPB5nvLnI2PinpOALiAr42Z8WL64aqiG0FmVaNtwcOMDe8ZQvgx6cvBVELJ7gcHNrw== 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)(376002)(136003)(346002)(39860400002)(396003)(46966006)(36840700001)(356005)(6916009)(186003)(336012)(36756003)(82740400003)(2616005)(7696005)(426003)(6666004)(70206006)(8676002)(6286002)(70586007)(7636003)(55016002)(83380400001)(16526019)(5660300002)(316002)(86362001)(2906002)(47076005)(478600001)(82310400003)(8936002)(26005)(1076003)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2021 14:22:17.0630 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ad688778-65a1-45ce-6a74-08d96ee63ba4 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: DM6NAM11FT054.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1188 Subject: [dpdk-dev] [PATCH 3/5] common/mlx5: add MMO configuration for the DevX QP 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" A new configuration MMO was added to QP Context. If set, MMO WQEs are supported on this QP. For DMA MMO, supported only when dma_mmo_qp==1. For REGEXP MMO, supported only when regexp_mmo_qp==1. For COMPRESS MMO, supported only when compress_mmo_qp==1. For DECOMPRESS MMO, supported only when decompress_mmo_qp==1. Add support to DevX interface to set MMO bit. Signed-off-by: Raja Zidane Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_devx_cmds.c | 5 +++++ drivers/common/mlx5/mlx5_devx_cmds.h | 1 + drivers/common/mlx5/mlx5_prm.h | 27 ++++++++++++++++++++++++++- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index fbc2123883..4678288207 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -2028,6 +2028,11 @@ mlx5_devx_cmd_create_qp(void *ctx, MLX5_SET(qpc, qpc, ts_format, attr->ts_format); MLX5_SET(qpc, qpc, user_index, attr->user_index); if (attr->uar_index) { + if(attr->mmo) { + void *qpc_ext_and_pas_list = MLX5_ADDR_OF(create_qp_in, in, qpc_extension_and_pas_list); + void* qpc_ext = MLX5_ADDR_OF(qpc_extension_and_pas_list, qpc_ext_and_pas_list, qpc_data_extension); + MLX5_SET(qpc_extension, qpc_ext, mmo, 1); + } MLX5_SET(qpc, qpc, pm_state, MLX5_QP_PM_MIGRATED); MLX5_SET(qpc, qpc, uar_page, attr->uar_index); if (attr->log_page_size > MLX5_ADAPTER_PAGE_SHIFT) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h index b21df0fd9b..e149f8b4f5 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.h +++ b/drivers/common/mlx5/mlx5_devx_cmds.h @@ -403,6 +403,7 @@ struct mlx5_devx_qp_attr { uint32_t wq_umem_id; uint64_t wq_umem_offset; uint32_t user_index:24; + uint32_t mmo:1; }; struct mlx5_devx_virtio_q_couners_attr { diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h index 070c538c8c..4130b618c5 100644 --- a/drivers/common/mlx5/mlx5_prm.h +++ b/drivers/common/mlx5/mlx5_prm.h @@ -3243,6 +3243,28 @@ struct mlx5_ifc_create_qp_out_bits { u8 reserved_at_60[0x20]; }; +struct mlx5_ifc_qpc_extension_bits { + u8 reserved_at_0[0x2]; + u8 mmo[0x1]; + u8 reserved_at_3[0x5fd]; +}; + +#ifdef PEDANTIC +#pragma GCC diagnostic ignored "-Wpedantic" +#endif +struct mlx5_ifc_qpc_pas_list_bits { + u8 pas[0][0x40]; +}; + +#ifdef PEDANTIC +#pragma GCC diagnostic ignored "-Wpedantic" +#endif +struct mlx5_ifc_qpc_extension_and_pas_list_bits { + struct mlx5_ifc_qpc_extension_bits qpc_data_extension; + u8 pas[0][0x40]; +}; + + #ifdef PEDANTIC #pragma GCC diagnostic ignored "-Wpedantic" #endif @@ -3260,7 +3282,10 @@ struct mlx5_ifc_create_qp_in_bits { u8 wq_umem_id[0x20]; u8 wq_umem_valid[0x1]; u8 reserved_at_861[0x1f]; - u8 pas[0][0x40]; + union { + struct mlx5_ifc_qpc_pas_list_bits qpc_pas_list; + struct mlx5_ifc_qpc_extension_and_pas_list_bits qpc_extension_and_pas_list; + }; }; #ifdef PEDANTIC #pragma GCC diagnostic error "-Wpedantic" -- 2.17.1