-int mlx5_mr_update_mp(struct rte_eth_dev *dev, struct mlx5_mr_ctrl *mr_ctrl,
- struct rte_mempool *mp);
-void mlx5_mr_release(struct rte_eth_dev *dev);
-
-/* Debug purpose functions. */
-void mlx5_mr_btree_dump(struct mlx5_mr_btree *bt);
-void mlx5_mr_dump_dev(struct rte_eth_dev *dev);
-
-/**
- * Look up LKey from given lookup table by linear search. Firstly look up the
- * last-hit entry. If miss, the entire array is searched. If found, update the
- * last-hit index and return LKey.
- *
- * @param lkp_tbl
- * Pointer to lookup table.
- * @param[in,out] cached_idx
- * Pointer to last-hit index.
- * @param n
- * Size of lookup table.
- * @param addr
- * Search key.
- *
- * @return
- * Searched LKey on success, UINT32_MAX on no match.
- */
-static __rte_always_inline uint32_t
-mlx5_mr_lookup_cache(struct mlx5_mr_cache *lkp_tbl, uint16_t *cached_idx,
- uint16_t n, uintptr_t addr)
-{
- uint16_t idx;
-
- if (likely(addr >= lkp_tbl[*cached_idx].start &&
- addr < lkp_tbl[*cached_idx].end))
- return lkp_tbl[*cached_idx].lkey;
- for (idx = 0; idx < n && lkp_tbl[idx].start != 0; ++idx) {
- if (addr >= lkp_tbl[idx].start &&
- addr < lkp_tbl[idx].end) {
- /* Found. */
- *cached_idx = idx;
- return lkp_tbl[idx].lkey;
- }
- }
- return UINT32_MAX;
-}