> -----Original Message----- > From: Jason Gunthorpe <jgg@xxxxxxxxxx> > Sent: Monday, February 13, 2023 11:44 PM > To: Leon Romanovsky <leon@xxxxxxxxxx>; linux-rdma@xxxxxxxxxxxxxxx > Cc: Aharon Landau <aharonl@xxxxxxxxxx>; Leon Romanovsky > <leonro@xxxxxxxxxx>; Michael Guralnik <michaelgur@xxxxxxxxxx> > Subject: [PATCH] RDMA/mlx5: Use rdma_umem_for_each_dma_block() > > Replace an open coding of rdma_umem_for_each_dma_block() with the > proper function. > > Fixes: b3d47ebd4908 ("RDMA/mlx5: Use mlx5_umr_post_send_wait() to > update MR pas") > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx> > --- > drivers/infiniband/hw/mlx5/umr.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/infiniband/hw/mlx5/umr.c > b/drivers/infiniband/hw/mlx5/umr.c > index 029e9536ec28f2..55f4e048d94743 100644 > --- a/drivers/infiniband/hw/mlx5/umr.c > +++ b/drivers/infiniband/hw/mlx5/umr.c > @@ -636,9 +636,7 @@ int mlx5r_umr_update_mr_pas(struct mlx5_ib_mr > *mr, unsigned int flags) > mlx5r_umr_set_update_xlt_data_seg(&wqe.data_seg, &sg); > > cur_mtt = mtt; > - rdma_for_each_block(mr->umem->sgt_append.sgt.sgl, &biter, > - mr->umem->sgt_append.sgt.nents, > - BIT(mr->page_shift)) { > + rdma_umem_for_each_dma_block(mr->umem, &biter, BIT(mr- > >page_shift)) { > if (cur_mtt == (void *)mtt + sg.length) { > dma_sync_single_for_device(ddev, sg.addr, > sg.length, > DMA_TO_DEVICE); > Looks good! Reviewed-by: Devesh Sharma <devesh.s.sharma@xxxxxxxxxx> > base-commit: 627122280c878cf5d3cda2d2c5a0a8f6a7e35cb7 > -- > 2.39.1