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 D4196A0C47; Tue, 5 Oct 2021 14:28:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CC77413A8; Tue, 5 Oct 2021 14:28:11 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam08on2062.outbound.protection.outlook.com [40.107.101.62]) by mails.dpdk.org (Postfix) with ESMTP id 453434137D for ; Tue, 5 Oct 2021 14:28:09 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cmtyKTBc0Gobmp5zh79LtyVoNzl69QiPBIZW0yAXW1DHXG9IChPDb1eaZWtAhZ1OR3Dcjk+kDH6T1jtcYVnPhCHrrcB9Eut5yWQqc6FZFPsVTfKUAtawfXFJ39y8pN23NHvV9OOKy0u0D7HsZlNqz1wutzFlOaI7VuuMoEWHj/i7Q5YrREr9rKrs1gsr37EEAaqbsYrPEDYiODWS5iO4qmjKfSJn4iSn+/tIBRL44c68VsvsQP6k+DPyEtx1g5LYecviDQlz3ZuMVwDJsj7CqKbMPybUPwxQ24KxmY9krsY5OgwjxAJy7ZSlVqPxP8stmMpI1KL5KI8LXuKD9ULqPA== 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=MMMg1CkI0qg/4MAQcpsNawjn09EqBXQUOD/7/ufuI1E=; b=VfLmFKBAJ9J8P6FPtJrfVhss0J5pivxL0BFsXIggjEzQeMeN4G6fPp2BMktrkAoP//XsdZxAV4XxyJ6a5O9YtRNyGBOUYTUqu5yklrz9jegBUj0c2EMirot9AVh0oqvc+6XEW9vsk0FE0CzYOfK2l8N2rZIs7qLkn8yD2HUV85MfoC4skOmLpWOkdiy8ps5hBeAXNgL0cnn5PgTlSBW5sOicqtbKtdoJ0ATs2uqZ9R/Gdv5tTPOBD9eCkCtQzeD3W61eFPFLPvzxw4qypWd1cVlGnngsXD0o05uDgLMDH/2k7aZh6RwvAvdpDVuWjmOGd4F9Msj5Cnk5tL+pe6SBoA== 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=O0f1dpDyQoLGQVDSMtIC9QymQzpK9TL9ehBxEqKnBfu6HzLYJO/vUMUiH7qHT8h2IqU7OqdWGkpiiq58wmIe3VnVgWczu2r6Mqh9fhtfR3Yf+U1j9qWMGL/Jp4bKvkdJNNZ3D3byO6gKDlAnEdNQ0+ybtRQhf1AyFQmOFsG9QHGuhaR4CCsPImcD+zyXQE14tdGV1SKzSM5qTpOAHZ8BRPV+PIBLqwidoUEnbkfjRrsVlyNZPo/PW4toDTseMzmvEOmnCUZchVyz7uEP6WfWeAc5axghQlBaywTRc/VMxshc/ARz/pRhPKa12VPMsbShgnPA9nPI4dBjPv1WMeJzjw== Received: from DM5PR13CA0033.namprd13.prod.outlook.com (2603:10b6:3:7b::19) by BY5PR12MB4274.namprd12.prod.outlook.com (2603:10b6:a03:206::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15; Tue, 5 Oct 2021 12:28:07 +0000 Received: from DM6NAM11FT027.eop-nam11.prod.protection.outlook.com (2603:10b6:3:7b:cafe::b5) by DM5PR13CA0033.outlook.office365.com (2603:10b6:3:7b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.9 via Frontend Transport; Tue, 5 Oct 2021 12:28:07 +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:04 +0000 From: Raja Zidane To: Date: Tue, 5 Oct 2021 12:27:31 +0000 Message-ID: <20211005122733.12444-4-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: 04712319-f8dd-4cc4-0c46-08d987fb95dd X-MS-TrafficTypeDiagnostic: BY5PR12MB4274: 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: M6fxPk5RaMDiD45xj0RJ2Q1EPQM5QE47qmMXTdJGn+ZZ8Ny4FWuZkP9yJdqxtU7oxe8EnyZEBxfNk0hlp9jN3c50F44qIAbVpkRBqNu1j5P5VgT+lRwT9/A9cCYD5/3P6y3TowACCzzeFKDrl4WAPP2E6nlUF/HA9Rl0Kf6rQMa4jvSwz52zszgej+915+KiEGQcrEI9ZxB1riqMVfERBwc9RYXw29O1Lt2428zwLK4iY/Wlihq1hlBlfiSdW+zAtBQ52D/WF9NcpNol+Nk105ROdU2+UOJgGOpSmkL3JHZb0X06m66JDSRyoqst6C9kBmGyy7Yen191/eRHQtVoTzVTXmLKV9OxpR3HDXjE6jIC4hiic2V641/r9EOGScJiFbw49G3+qO+601/BnYbKtjF7PkMs3NIEqZewuXjKpxcrPhEDDsHUa4btjHtmqCu0ZjGd9UCTR0h+StyLNYRIjPa7ggEEAxicBLZitE7lN362Dqs4m7B9lv+CYpc4eNJAzH6Kju0HRCs7XrMWUnqQMpSCLofJkNos9g0Kj7J9Watg8/kPJ9tzZSv9wly9RUM4RCG8iWxCQW6fQgaIVlaRyUUI84RpiTGbK4mU67aRt/TaUQ5A5Mm1Zl4oV6fHkFIgSn+n9/5ZfLGvhWGIivf3INHA9brCbSrUxW+vhxUfZREfzzsJlu3FUH2L8GaOnL+0TPZu7GCZRQ+QcZ0AsdnDTQ== 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)(70206006)(83380400001)(316002)(356005)(426003)(6286002)(8676002)(6666004)(8936002)(7696005)(2906002)(36860700001)(336012)(7636003)(5660300002)(26005)(86362001)(70586007)(16526019)(55016002)(47076005)(1076003)(6916009)(82310400003)(36756003)(186003)(2616005)(508600001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2021 12:28:06.9280 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 04712319-f8dd-4cc4-0c46-08d987fb95dd 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: BY5PR12MB4274 Subject: [dpdk-dev] [PATCH V6 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 | 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