1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2018 6WIND S.A.
3 * Copyright 2018 Mellanox Technologies, Ltd
6 #ifndef RTE_PMD_MLX5_MR_H_
7 #define RTE_PMD_MLX5_MR_H_
11 #include <sys/queue.h>
14 /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */
16 #pragma GCC diagnostic ignored "-Wpedantic"
18 #include <infiniband/verbs.h>
19 #include <infiniband/mlx5dv.h>
21 #pragma GCC diagnostic error "-Wpedantic"
24 #include <rte_ethdev.h>
25 #include <rte_rwlock.h>
26 #include <rte_bitmap.h>
27 #include <rte_memory.h>
29 #include <mlx5_common_mr.h>
31 /* First entry must be NULL for comparison. */
32 #define mlx5_mr_btree_len(bt) ((bt)->len - 1)
34 void mlx5_mr_mem_event_cb(enum rte_mem_event event_type, const void *addr,
35 size_t len, void *arg);
36 int mlx5_mr_update_mp(struct rte_eth_dev *dev, struct mlx5_mr_ctrl *mr_ctrl,
37 struct rte_mempool *mp);
39 #endif /* RTE_PMD_MLX5_MR_H_ */