@@ -115,6 +115,7 @@ static const struct verbs_context_ops mlx5_ctx_common_ops = {
.attach_mcast = mlx5_attach_mcast,
.detach_mcast = mlx5_detach_mcast,
+ .advise_mr = mlx5_advise_mr,
.alloc_dm = mlx5_alloc_dm,
.alloc_parent_domain = mlx5_alloc_parent_domain,
.alloc_td = mlx5_alloc_td,
@@ -904,7 +904,11 @@ int mlx5_read_counters(struct ibv_counters *counters,
uint64_t *counters_value,
uint32_t ncounters,
uint32_t flags);
-
+int mlx5_advise_mr(struct ibv_pd *pd,
+ enum ibv_advise_mr_advice advice,
+ uint32_t flags,
+ struct ibv_sge *sg_list,
+ uint32_t num_sges);
static inline void *mlx5_find_uidx(struct mlx5_context *ctx, uint32_t uidx)
{
int tind = uidx >> MLX5_UIDX_TABLE_SHIFT;
@@ -493,6 +493,15 @@ free:
return 0;
}
+int mlx5_advise_mr(struct ibv_pd *pd,
+ enum ibv_advise_mr_advice advice,
+ uint32_t flags,
+ struct ibv_sge *sg_list,
+ uint32_t num_sge)
+{
+ return ibv_cmd_advise_mr(pd, advice, flags, sg_list, num_sge);
+}
+
struct ibv_mw *mlx5_alloc_mw(struct ibv_pd *pd, enum ibv_mw_type type)
{
struct ibv_mw *mw;