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 9CB3DA0C41; Thu, 30 Sep 2021 07:45:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 297CE4111B; Thu, 30 Sep 2021 07:45:06 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2066.outbound.protection.outlook.com [40.107.244.66]) by mails.dpdk.org (Postfix) with ESMTP id AB1F3410FA for ; Thu, 30 Sep 2021 07:45:00 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HobcyZ/Wu7842nAvn2nofcvToIOLBAy0hXUdodgWB12VzYo9xq86cumAZdd8gLkXTYv/57cWBd/4Tq55kulKxJN88xbjG92A6AFO4rEBDOfW7G/6ErtdUsS+dj8ku+m2eHwnLNkaifwrvz70Z94JKb7SmTDo9fJO8FQ+HjfoeO9z4ZJCK3oCsZQJK2dJ1YWtLpUjSIK0bMlGVxaSl1sTemvgtsomNqWAMsu4Ky9CQ+yU+fq+hP4i0TEY+NLOc3UhVqNUWX2TH6ar/OlCmaJAXB1BAX5SUU1ONMrDK2yZ/4NoRsPaOEszKiEoPBvffFY1zGHwusaYtni0gixiVz08Xw== 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=MMMg1CkI0qg/4MAQcpsNawjn09EqBXQUOD/7/ufuI1E=; b=HV6Ejj1CPD27UUITU7QRdXpUSvGaMn5IQlTG/BZc4/2Bn1jbLI70SkXUjax4ds3TNlzmdGoUJPKT1EhdlICScPfJ5UmBlok4uViK8xMaZCTV1fniW8e5TpsQpwUnSVQW7sKX5wfslEsKTQ0ovyR1wce/u9uAkq4DllIvlAFJjG+TOogReGjTLd6suRuZJX5upKbGSOp0KdwQmOba2uy+NiJtuGBCXzgiHqPp5nwAIIB9qeXOP3Q/ce0lsD3CZf3geu91bHrwgQcSMPIuGwsOI4GQM/pkX+hcs3RzKrsHsw8Q2PPnU97gjkULmqJn5Wjcc738/dANW/5gEHrqe7gi5g== 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=MMMg1CkI0qg/4MAQcpsNawjn09EqBXQUOD/7/ufuI1E=; b=TceWSOOyfPrMkKIMmJA6guVmABsmb9jxppMHv5+Z6m4ofkLmfZTEAc/h7DDTKPZ027yGDA4AAxhVg18V7ukIblJzMM4yrbq8gSTaqLv2E25U97HVb5OwzfhAXT1/JK6PZnf5faIwuVNfRs3wsgZwsLEYfsselMRflFqdDwxNh2lMCIr1kODI4bnoElO1TG2mb5+nfVjqCJGsxwEw/kR5kONdujsvOETiTXTSkjRTpkpiTwZkU65H7hCw8l5JeCjmA1BIvitCCet0PooEGBmlEjZkoiLw2VX9LoBSFwrn9NePlUSXtiwxVTiYGNj7Aj7asmQIjD4K4oDGRhlrPCTmjw== Received: from CO2PR06CA0067.namprd06.prod.outlook.com (2603:10b6:104:3::25) by BL1PR12MB5175.namprd12.prod.outlook.com (2603:10b6:208:318::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Thu, 30 Sep 2021 05:44:59 +0000 Received: from CO1NAM11FT060.eop-nam11.prod.protection.outlook.com (2603:10b6:104:3:cafe::9b) by CO2PR06CA0067.outlook.office365.com (2603:10b6:104:3::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Thu, 30 Sep 2021 05:44:58 +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 CO1NAM11FT060.mail.protection.outlook.com (10.13.175.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4566.14 via Frontend Transport; Thu, 30 Sep 2021 05:44:58 +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; Thu, 30 Sep 2021 05:44:56 +0000 From: Raja Zidane To: Date: Thu, 30 Sep 2021 05:44:35 +0000 Message-ID: <20210930054438.5960-3-rzidane@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210930054438.5960-1-rzidane@nvidia.com> References: <20210928121650.40181-1-rzidane@nvidia.com> <20210930054438.5960-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: ccd34d64-d406-479b-6168-08d983d57059 X-MS-TrafficTypeDiagnostic: BL1PR12MB5175: 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: R9Tv8wLRmOIYd4yWjT92mgHNOjvj8JfoxYdTp3T7Mb1BN48SH+RS0uA2FsTaBFYkUS3D5qZjC+E5Ob0rycXkBr3t0+qtCp1dIox2g0REaE2IpMg6zfgEaqExRBM+GpMsJz8OaUYapWy7cHMsyyeDFV6w6OU6Uz9/xQjox52TiuNa9jpWGFWHKYmCVQItkNJT6OpNlE6NYW7EZRxAgdqam67PXZjzpl9NwJMdL27aZm4qwHBZM6P7t80InGWatCOBIgMe5Uz4dq/bV4csxfXHR3dymDWZJwMHDeNErDO7kkrrg3nsGEVjMq3H7L3G84d81STavKz0gq9BK+xauAkHffm347EPv3yJwDiPzF+5emqpoMFfwXlkzsV0MBZvsQRiLmEOK6w4q1PetqWNBCpd/MTZnCfpWvbt0b6QOzBy6FxNmuDZ4P3secR5rmNvQMX6Tr/0iljUwx31EGwHV+i+XI0vpq83/vw3bvgRzuHyTrLR3+zbbE4mM4TOy9F2xLFHEsYEmHEpYhqnaBMY8hE2m7BFU2aT28IlzvOiIDKG31521+EbTY3+qhy4aeQfH4ZyUHMnggfLZ54e8h+fKn7hH1rsHdA6j6U4ATG5RaJaeto84whzNFspjAj1R2SK9ehuQxt5GHV7OOcIu9wlVeVXabuPVzlwljBjgo5TKxaGp574RLLShvR2FFbfOanZX9cy//hDO/EPi2yVQ9a3qYkJuw== 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)(336012)(6666004)(426003)(7696005)(186003)(508600001)(55016002)(6286002)(70206006)(47076005)(26005)(316002)(16526019)(70586007)(36860700001)(5660300002)(86362001)(356005)(6916009)(36756003)(83380400001)(8936002)(7636003)(2616005)(8676002)(1076003)(82310400003)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2021 05:44:58.3415 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ccd34d64-d406-479b-6168-08d983d57059 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: CO1NAM11FT060.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5175 Subject: [dpdk-dev] [PATCH V5 2/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 | 7 +++++++ drivers/common/mlx5/mlx5_devx_cmds.h | 1 + drivers/common/mlx5/mlx5_prm.h | 28 +++++++++++++++++++++++++++- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index 00c78b1288..eefb869b7d 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -2032,6 +2032,13 @@ 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 ec5f871c61..54e62aa153 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,11 @@ 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