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 6CDF742D09; Tue, 20 Jun 2023 16:11:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E6EA642D38; Tue, 20 Jun 2023 16:11:54 +0200 (CEST) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2081.outbound.protection.outlook.com [40.107.100.81]) by mails.dpdk.org (Postfix) with ESMTP id 39D1B42D37 for ; Tue, 20 Jun 2023 16:11:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GC4qFTBtHxQ5mb3AECijVL6qkL7eEBietmVOh3abBw4LIEiiWPo1FadhO/inV8Kfy17qX+YUZ/lShjuk0SfPFmP0kCAeLDEDfaXSNazu2PMSZTVKu81kQSsSU53rlBsUwieKdBTM0dj6hqvQpmv2F96pVPPPlyNZ1G3/weiMuX5McBvzocLQ+aXH7n9MgKG7nYyj+ac9cXm+14Nk1Yu+eqO35AjvZMueOG86ZuqzIFNPyRN03eeqoXKYx+yMbLBXWsHnDXTqS300xoijtIgbCzTfZ6N2/CKA4YIe3JnftNJjAOxJHN7XUiYUeJsNrWJxPZ5VQYjJoXfAm0f9+eouLg== 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=H2OE96H0gES5Dbe64e/BNma/DP9ZQU8Sd2j8g7Begk4=; b=Y4WKGbHSBpQ3MeaqS0B6XM7MNk2KNm2kwFMFext7ldUa9a4o/4D0UMSW9aWOu6aH/MFTaVgo33T4imaY9ppSPDrOxQ206K+XVUfJTlYzawPgKRb+S4VmrPP7l1a0Nz8F1YHoUwWMO8XB2JP/EpnTaNX0fdnnULFez/QrnMDllpokwRqKLOhV0VndWkel8+hXS5Mbt9pfR2f739hTgt0w7olBXIz4AqFaFfR/uhen3bRpi1+MOvqcpD8sJZOWZsCEFFAtYUpDOSjvFjg+IlsK0s1aXe8hlm47W6Knwc9MI0BUyx5tbPQNwPYvnWRCm8Z75+WmDaU+shLXjPlrBX4EXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=marvell.com 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=H2OE96H0gES5Dbe64e/BNma/DP9ZQU8Sd2j8g7Begk4=; b=pSW4dM+dHx+Rkb1ONPoyoJdUNn8ndr/Qu6hihcvEnG5rB1Dpy3Lu2MNJXjqFUTMpRon52jqR8aKhy8w4QaAWp3yLfi+QI97Ll+48Y9s/G2UDRUW7OqcgjldsfGxKo+qKXQQZ4G31GqWnsSzUMcdRXdf4VKxkJpKQ9dSncSlHhGQNNuy8tSBKFED1j38YKeFztaBUA7MHRwf/Yv5JWGytJTf3+p6sSwJ2ZjRk8MVDeFzYaMQtC6BPA06tDzyPQ3RGvDG4xptvPOC70wihR5D+vkn1CPKCawryrCeefhxE2henIDOphyGULtAQiF/EydXFuU2X9kbOUCKTXU2/2CfOIA== Received: from BYAPR04CA0008.namprd04.prod.outlook.com (2603:10b6:a03:40::21) by DS0PR12MB8563.namprd12.prod.outlook.com (2603:10b6:8:165::7) 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 14:11:51 +0000 Received: from DM6NAM11FT032.eop-nam11.prod.protection.outlook.com (2603:10b6:a03:40:cafe::32) by BYAPR04CA0008.outlook.office365.com (2603:10b6:a03:40::21) 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 14:11:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DM6NAM11FT032.mail.protection.outlook.com (10.13.173.93) 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 14:11:50 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Tue, 20 Jun 2023 07:11:34 -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; Tue, 20 Jun 2023 07:11:31 -0700 From: Suanming Mou To: , Matan Azrad , Viacheslav Ovsiienko , Ori Kam CC: , Subject: [PATCH v4 1/9] common/mlx5: export memory region lookup by address Date: Tue, 20 Jun 2023 17:11:07 +0300 Message-ID: <20230620141115.841226-2-suanmingm@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230620141115.841226-1-suanmingm@nvidia.com> References: <20230418092325.2578712-1-suanmingm@nvidia.com> <20230620141115.841226-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: DM6NAM11FT032:EE_|DS0PR12MB8563:EE_ X-MS-Office365-Filtering-Correlation-Id: 4ffb6a36-21e6-43f7-e885-08db71984b07 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XQQSzHahrQqWI8LpqqyRSyFP+gFYlSewOxa1Oj1T+sr27LIn4zAJN9H94eHS+JR9hT34aTZaKvE0NXSCFZ7l7ZLaHF1tXhozuF/6Z0PUFK+uRTYEDapTG5uJjHfj8mjp80NbyC63SUbyGZ1Qh/fD+9U0iMDGhzSy3Fpo2y2wUhNIBWNc1Eugt8xCqeHs5Y5p7RW+ZlWyEeCTgUO3KdTNHJoaBikR3+hrJ7+hL/dD9Kz3OrVq5S5zg1N21kKpIyxRTYeKATxz0xvknx1n74w7t8iO/L/I68wwXBjUgJfO99ClnIp4Pc8b+K9VJIwyneljbbnAA/AYMcAjowaAhnutmsspGnn7xAOQV3v6IFY8bMrBIk3pLj/AFjPDI61cdVtilFTyPVImCcoNVIUSIhUnqcZin5WHbpQuOPve9Xxmjg09Y9zW8sbtmnt9lM/o5EE1McHDv+FU72vFSQ99HmZVBhu9UFOPrOYKBef3F1FMRF3a77n+QKrrrrA8JPP59EqDRTtED9Z4uu/U3Fyskix+IeE+IpXJJ/ruHXg1Tjm9ZKwztSXr+jqGMNTh3971CL+R4dedL8q87AmVyhg8AqPnK2tlAB30ty3A52APpXk3j5QfX8tf6v6dFarenzNzMGBveLBYfnTtnDkkaZeyvq0LbsjAhmMxXVuSRItcAYwMFbLmOh1w2AVubw4frLGsTU/M85gHghcgyCRlf9thH+F3V99Ow3EPTu5sF/k+SgVC14jIlmXpzggaPeGxyromsgOq X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(396003)(346002)(376002)(136003)(451199021)(46966006)(40470700004)(36840700001)(83380400001)(47076005)(7696005)(54906003)(6666004)(110136005)(316002)(8676002)(8936002)(2616005)(36756003)(86362001)(26005)(1076003)(4326008)(6286002)(6636002)(16526019)(186003)(426003)(336012)(41300700001)(5660300002)(82310400005)(70586007)(70206006)(356005)(40460700003)(82740400003)(7636003)(55016003)(40480700001)(36860700001)(478600001)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 14:11:50.9428 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4ffb6a36-21e6-43f7-e885-08db71984b07 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT032.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8563 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 Acked-by: Matan Azrad --- 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