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 81D4242CFF; Tue, 20 Jun 2023 03:24:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C0DD642BD9; Tue, 20 Jun 2023 03:24:12 +0200 (CEST) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2060.outbound.protection.outlook.com [40.107.212.60]) by mails.dpdk.org (Postfix) with ESMTP id 914634113F for ; Tue, 20 Jun 2023 03:24:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LISHI8Kta9hZqcNDhJdSZp4jCyxiVyDr8NLsJlXb6H3kum9xMJ1AlDcwjMxV7nac2UWjOzLszP1c2cQ1HuG1WUAALRELsGUS9c7EmITCKz+ABkoUVzKgvOBag0fHD4kAjlXwBNYJMfV+zTfXnbJhwDudSqCW/XPB7w00NrB+V9v1jqE0C2K3FbECmujrtCSiZf+VMRHQQI061DeltZba3c66VXTtuKYcyBhZYD86KCl6nE32Q4FmXO9jN2LM6m+M3YzuBsu93PvsdoFgN7+TvNmk3oQ/7V7NnOMgLw7MjqzkxZ5TOIIdLLPvxcOyzbvk5jVzJxpLkhT4porPjiQCJA== 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=qrhr6JbVmVgkOPC42Lratv+TLSusXswEJEXXIrH/Tlc=; b=gaJpFVrMz3pKiFgcV5Sxv25IAAto00bRxXg3eLyEt6nWYuSpu8IyWcRGqMsF/68mBuRAPeou6G86xU29ObNlj6zPXynCLeZcVaRPnqsszmRJwNYxITKnVPlt1tEefpYWNtrps4e7VbImIsvB3qXCcNtv3GQiULI6GH18Vz3T0hvtZsSOojADhpTxV/KpN0UpyrWqK+x3w8H4uRgd1QOKB18qeVjIgAXX2bLmBgnpeTmsJylVHNvFh7trrpb/NBKN+5DoUk3TahUsFEVGEE1VcejJ1E95bHVMHdMqYQ/XelzXdcZy2kNChs/5caEvejJpShCs76Ppy8kxTjgO2qs4cg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=qrhr6JbVmVgkOPC42Lratv+TLSusXswEJEXXIrH/Tlc=; b=CpKvt5RW+pnIwS0eRCz9lDr35fAU184b1ZjlwmNE1j8r3GrY49/SQzXLseawBiPx8/KuylE8QF1R3zsbdjVklnuyiQ86E5OLVm+kS0F46AXR6wxhj74wJSyrGNnA9MITXcSZu+3PRucl4MYBX26lsCZV8qGtGCjy67TPTE95C2liEVOW3rV8R/ULLyNZUViyJDZgvEci+Cm3peWw7HvB81sZfsAHSbpioW2s5L3MAw8FNUZ9XL9217MUE7YzfPFQfpa/kTZJXPcQ//OXsov+3otCsj20x1P4rXYhlpoz68n9u7OJP4wxZtn938asNbQh1bSKeUuuKbKHfQvHFcM2yg== Received: from CY8PR12CA0040.namprd12.prod.outlook.com (2603:10b6:930:49::7) by CY5PR12MB6300.namprd12.prod.outlook.com (2603:10b6:930:f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.37; Tue, 20 Jun 2023 01:24:09 +0000 Received: from CY4PEPF0000E9CE.namprd03.prod.outlook.com (2603:10b6:930:49:cafe::b9) by CY8PR12CA0040.outlook.office365.com (2603:10b6:930:49::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.37 via Frontend Transport; Tue, 20 Jun 2023 01:24:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000E9CE.mail.protection.outlook.com (10.167.241.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.20 via Frontend Transport; Tue, 20 Jun 2023 01:24:09 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 19 Jun 2023 18:24:02 -0700 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 19 Jun 2023 18:23:59 -0700 From: Suanming Mou To: Matan Azrad , Viacheslav Ovsiienko , Ori Kam CC: , , Subject: [PATCH v3 1/9] common/mlx5: export memory region lookup by address Date: Tue, 20 Jun 2023 04:23:14 +0300 Message-ID: <20230620012322.788099-2-suanmingm@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230620012322.788099-1-suanmingm@nvidia.com> References: <20230418092325.2578712-1-suanmingm@nvidia.com> <20230620012322.788099-1-suanmingm@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9CE:EE_|CY5PR12MB6300:EE_ X-MS-Office365-Filtering-Correlation-Id: 65c770fe-0abb-44b2-9015-08db712d0c08 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XSNR8GPmWReXTLX3gM4ktqo81FjZCuuTs2cHGmBGZf3IIafq4nHzqByJ/LQ1t+8bovb9lSGNjsY7kXe1yoEDV6CkMUIr3XGOGk+8V50WlcIT8qPbhZcUUr5isc/io0aELREa2Igxzr2THpUJ19hMSTNYA+ye5d3DrYzC3h6SYX+LsuxrVz1tUCdg+0g6DIeFK6mv5a9c97Pkue/JbN6vlR9TAxmOhPY/m45QcBFBTLsBZJJI4sArD4tJ7ZDPhP09dSrzptBZ5XOScq9vvm0+QWfPkd1uEJn1S9GSqtjC7ZZRH8Ja1tMKzmY2kqNNwqsrqyRnTpI2HhrTcIsunLWL9Ls6UkvzjxpDIjiFngNinQH3kgM56CmIWg2S38xrg+7hS6+y97E1RALOuuI2htz9IlheWpzT6IFsD3wjmHj4ytVtnzyOwj3nevaPEzjjxZJg+LnR6qY8npYL1nyYTFAwmSwxTRnMSVYoXR8/rHPP0fMgVKV814mCpzryaARp7LxmL/a+VVCHBFXvHQGuiSZ0VnuD2HRYmRu7juMUM4z9hvAIUaLnWmP0W4BOcCdQY2xvokgrV0zdkm7pnbNbSTD7KQK3Tt5rk3Kn7dczJynoe9UeRN2eSGQ6YZJf5a3h9xtP/YgYoIpCH+8XLllYUdls3ly9bHTUTui8JivPy2J6JKY8s4lbF5M9EA956USrb/RewLuz1GQqvbG0Pj+4dXFkZ5jfDNCVUAnEM1GdC4UI1UJzJO7aIIs9VCpi2k1nISiZ X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(136003)(346002)(376002)(39860400002)(396003)(451199021)(36840700001)(40470700004)(46966006)(356005)(336012)(426003)(2616005)(86362001)(7636003)(83380400001)(47076005)(36860700001)(2906002)(5660300002)(82740400003)(4326008)(40460700003)(54906003)(110136005)(82310400005)(70586007)(186003)(16526019)(8676002)(70206006)(8936002)(6286002)(6636002)(478600001)(36756003)(41300700001)(40480700001)(55016003)(1076003)(26005)(7696005)(6666004)(316002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 01:24:09.1318 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 65c770fe-0abb-44b2-9015-08db712d0c08 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9CE.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6300 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 In case user provides the address without mempool. Export the function to lookup the address without mempool is required. Signed-off-by: Suanming Mou --- drivers/common/mlx5/mlx5_common_mr.c | 2 +- drivers/common/mlx5/mlx5_common_mr.h | 4 ++++ drivers/common/mlx5/version.map | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/common/mlx5/mlx5_common_mr.c b/drivers/common/mlx5/mlx5_common_mr.c index 7b14b0c7bf..40ff9153bd 100644 --- a/drivers/common/mlx5/mlx5_common_mr.c +++ b/drivers/common/mlx5/mlx5_common_mr.c @@ -1059,7 +1059,7 @@ mr_lookup_caches(struct mlx5_mr_ctrl *mr_ctrl, * @return * Searched LKey on success, UINT32_MAX on no match. */ -static uint32_t +uint32_t mlx5_mr_addr2mr_bh(struct mlx5_mr_ctrl *mr_ctrl, uintptr_t addr) { uint32_t lkey; diff --git a/drivers/common/mlx5/mlx5_common_mr.h b/drivers/common/mlx5/mlx5_common_mr.h index 12def1585f..66623868a2 100644 --- a/drivers/common/mlx5/mlx5_common_mr.h +++ b/drivers/common/mlx5/mlx5_common_mr.h @@ -240,6 +240,10 @@ mlx5_mr_create(struct mlx5_common_device *cdev, struct mlx5_mr_share_cache *share_cache, struct mr_cache_entry *entry, uintptr_t addr); +__rte_internal +uint32_t +mlx5_mr_addr2mr_bh(struct mlx5_mr_ctrl *mr_ctrl, uintptr_t addr); + /* mlx5_common_verbs.c */ __rte_internal diff --git a/drivers/common/mlx5/version.map b/drivers/common/mlx5/version.map index e05e1aa8c5..f860b069de 100644 --- a/drivers/common/mlx5/version.map +++ b/drivers/common/mlx5/version.map @@ -122,6 +122,7 @@ INTERNAL { mlx5_mr_ctrl_init; mlx5_mr_flush_local_cache; mlx5_mr_mb2mr_bh; + mlx5_mr_addr2mr_bh; mlx5_nl_allmulti; # WINDOWS_NO_EXPORT mlx5_nl_ifindex; # WINDOWS_NO_EXPORT -- 2.25.1