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 9864BA0C41; Sun, 12 Sep 2021 18:37:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 65D9C410FC; Sun, 12 Sep 2021 18:37:23 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2057.outbound.protection.outlook.com [40.107.93.57]) by mails.dpdk.org (Postfix) with ESMTP id 1A2AF410E7 for ; Sun, 12 Sep 2021 18:37:20 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DNlQtmSdF/9erINq4K6Jw7tA13FjByywzx+ZpMcKMS9wynitU7X8thvUVJnM39oi5Ugn/T7TuWGCktTIQBcKjM+vJDYa3Eb3ZRbP29teQ16w/8KD6FVqgiAPX69TffMH+0yPLwyzNjlNkrMwkthx/8Q7XVbbP8vZVWiMIZ3xwR5sCBLqvEE6lCAwyNKvoY1birE+tmCt3CoXegYJA7ab2MXHVcr4IJ3uRZi8mxmJomkssl9EyU7+waKOpU0UWBCXpA91U8bo+shCRGrdn0sEhtJobBwP6oTU/S9BkJdxwf2teeIf7A6pkZyI2WVuhtl45mnbhnyCeQiJoTkGK4SCgA== 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=CoBShE6MfnE++nj/WboEj6YgR7eA+4yfSbxOxcnaqns=; b=dnJcGZZcu82VOlMvJ1/Jpb5MKDr8fuST91F57gfL7z1DBkI+0bM/TXDvISmK8HfWovzTh+Tj+8gRs8fptE8WFttBnHT+AIaRCU3uxeJBSCWBHogyxweveBTSeGBtwCqyBmv6hWV71GE9HPTfO7sNE0Us0S/O954HjGJFWhrdbMLLc95bhzD4mp9mtL2VbFby3QSDm/uofHJTWaw5oWHQZbZGOQ1MzNLK2eSrcltwvXMowVkxFFR9i26iqwzJNC8z3r/m2QKc3euU6xrfOzH6HyVGI/C+khn4BvOI82rptbmwz6Nb3gVqMZWT8humYMAit4cSlmxvR/N5bMYavfqLyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.35) 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=CoBShE6MfnE++nj/WboEj6YgR7eA+4yfSbxOxcnaqns=; b=AUzHSabSwKJBQ4Tm+eI84Xh1nZK+Z9Vcqn8SkZXxJdHQdG5TqJNmkutx6l56yI04C61EvqnfWYBflkIh2uBB0+kcBucRTPtUZxW/gIiwqDa4ydMEqVUeHbZ118ICle/8nUIPuYlQLK8eCvTX76uUbF+A469QwtPUbv+mlJ0LHvIvQ7/UgR6965iq/Ye4WvO/kiBhUi7CpZHJ2kTmmMQFWw7fltUGzemj53hFy5Yc46ImphsgTwYrkwLtVw0NIL/P1GSqYPSMCMAAUqLupMLak91ORz5sU0BJN874vTXlGZQiFlPYhkPKa5pxNRG6BrYgLaU//8IoDYaft4UpqQApCA== Received: from MW4PR03CA0285.namprd03.prod.outlook.com (2603:10b6:303:b5::20) by DM6PR12MB2892.namprd12.prod.outlook.com (2603:10b6:5:182::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.22; Sun, 12 Sep 2021 16:37:18 +0000 Received: from CO1NAM11FT066.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b5:cafe::ec) by MW4PR03CA0285.outlook.office365.com (2603:10b6:303:b5::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.15 via Frontend Transport; Sun, 12 Sep 2021 16:37:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.35) 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.35 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.35; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.35) by CO1NAM11FT066.mail.protection.outlook.com (10.13.175.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4500.14 via Frontend Transport; Sun, 12 Sep 2021 16:37:17 +0000 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sun, 12 Sep 2021 16:37:17 +0000 Received: from nvidia.com (172.20.187.6) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sun, 12 Sep 2021 16:37:16 +0000 From: Raja Zidane To: Date: Sun, 12 Sep 2021 16:36:50 +0000 Message-ID: <20210912163652.24983-4-rzidane@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210912163652.24983-1-rzidane@nvidia.com> References: <20210903142157.25617-2-rzidane@nvidia.com> <20210912163652.24983-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 DRHQMAIL107.nvidia.com (10.27.9.16) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e0438f22-ef08-4b50-5d65-08d9760b95c3 X-MS-TrafficTypeDiagnostic: DM6PR12MB2892: 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: khqMAorvjrvrGXRnSYBjtlqBs1RCJOh39MhlVrcsAasRTbJKGAqd6rB2Z5syGBC2Vw2AWZYYGM3WonWt1utVd111a2pJFtjgENNG5G9Eqnr6wgPltkdOo3bkl9FMaeS9OSfHRzCqp6WxAxKZ59rL6azOJN5fRcixH9lJlCGdbkmSFvsOfk0aURhaRVSx2XAYGjMYCWX3la6cs9d/6gxuWcOBt9GCzdQv8rKBK7PS2sHgovxXWY3gv+cCaMu7ofg8GzK8RE8gS5zVirYF/yMqI1XL6XEcJxjId8NoaR3v94rdUpAT2+ePXTvW2wNujLgZc3A/ShzvU/8peaWlHRfzKFKy+xts8Mn1phE3JaKriOTNedFC9/rAhoulEDJbQkAw5u8zz1KlmMRRgf8FfgymlPQIQgkVTyPEQayxMNd56yNfXLLEBtGNUlZurXA7Ze8z4r6kIqE57HoZQHV2lKp2N+HDwm4Tw3mtkQ7NhIXU/9bxghRlW2+GgO+BoHE/HTlMfxSL6cDDqujgL+19+T1hBoYCtlVXJT9LjagNWKCQVtFzC1n7K+BkiuVfqbDlsGI2SikCAWMJVUmQp+14y6jtlm4/omHgNRUQFktu6A5buqpF6x/kaB3Um5p4z/hqTDqb1fIJSeVXRAE7a9RSf2NqVmTEz5Wime4Ljb6lwsKKZMbpdmjPNCj4kQ6MK75hfsFLL1I6JBy9gic/Y6YgU3MLiA== X-Forefront-Antispam-Report: CIP:216.228.112.35; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid02.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(356005)(7636003)(186003)(6916009)(2906002)(55016002)(1076003)(8936002)(36860700001)(426003)(8676002)(36906005)(316002)(83380400001)(86362001)(2616005)(26005)(7696005)(6666004)(36756003)(70586007)(16526019)(70206006)(6286002)(47076005)(508600001)(82310400003)(5660300002)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2021 16:37:17.7842 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e0438f22-ef08-4b50-5d65-08d9760b95c3 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.35]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT066.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2892 Subject: [dpdk-dev] [PATCH V2 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 070c538c8c..cb28adb80a 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