On Fri, Feb 17, 2023 at 09:14:25AM +0800, Zhu Yanjun wrote: > From: Zhu Yanjun <yanjun.zhu@xxxxxxxxx> > > This is a followup to the EFA dmabuf[1]. Irdma driver currently does > not support on-demand-paging(ODP). So it uses habanalabs as the > dmabuf exporter, and irdma as the importer to allow for peer2peer > access through libibverbs. > > In this commit, the function ib_umem_dmabuf_get_pinned() is used. > This function is introduced in EFA dmabuf[1] which allows the driver > to get a dmabuf umem which is pinned and does not require move_notify > callback implementation. The returned umem is pinned and DMA mapped > like standard cpu umems, and is released through ib_umem_release(). > > [1]https://lore.kernel.org/lkml/20211007114018.GD2688930@xxxxxxxx/t/ > > Reviewed-by: Shiraz Saleem <shiraz.saleem@xxxxxxxxx> > Signed-off-by: Zhu Yanjun <yanjun.zhu@xxxxxxxxx> > --- > V3->V4: Remove inlen test > V2->V3: Remove unnecessary variable initialization; > Use error handler; > V1->V2: Thanks Shiraz Saleem, he gave me a lot of good suggestions. > This commit is based on the shared functions from refactored > irdma_reg_user_mr. > --- > drivers/infiniband/hw/irdma/verbs.c | 42 +++++++++++++++++++++++++++++ > 1 file changed, 42 insertions(+) Applied to for-next, thanks Jason