[PATCH v4 1/9] common/mlx5: export memory region lookup by address
Suanming Mou
suanmingm at nvidia.com
Tue Jun 20 16:11:07 CEST 2023
In case user provides the address without mempool. Export the
function to lookup the address without mempool is required.
Signed-off-by: Suanming Mou <suanmingm at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
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
More information about the dev
mailing list