On Mon, Oct 26, 2020 at 03:23:13PM +0200, Leon Romanovsky wrote: > @@ -1483,10 +1540,14 @@ struct ib_mr *mlx5_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length, > */ > int update_xlt_flags = MLX5_IB_UPD_XLT_ENABLE; > > - err = mlx5_ib_update_xlt( > - mr, 0, > - ib_umem_num_dma_blocks(umem, 1UL << mr->page_shift), > - mr->page_shift, update_xlt_flags); > + if (is_odp_mr(mr)) > + err = mlx5_ib_update_xlt( > + mr, 0, > + ib_umem_num_dma_blocks(umem, > + 1UL << mr->page_shift), > + mr->page_shift, update_xlt_flags); > + else > + err = mlx5_ib_update_mr_pas(mr, update_xlt_flags); This rebase looks a bit weird, this whole block is !ODP already, so why is there an 'if is_odp_mr()' ? Should just be this: if (xlt_with_umr && !(access_flags & IB_ACCESS_ON_DEMAND)) { /* * If the MR was created with reg_create then it will be * configured properly but left disabled. It is safe to go ahead * and configure it again via UMR while enabling it. */ err = mlx5_ib_update_mr_pas(mr, MLX5_IB_UPD_XLT_ENABLE); if (err) { dereg_mr(dev, mr); return ERR_PTR(err); } } Jason