aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rdmavt
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2021-08-30 09:49:59 -0300
committerJason Gunthorpe <jgg@nvidia.com>2021-08-30 09:49:59 -0300
commit6a217437f9f5482a3f6f2dc5fcd27cf0f62409ac (patch)
treec82270181daeb43eb9984b586784b70f13ef1df4 /drivers/infiniband/sw/rdmavt
parentRDMA/mlx5: Relax DCS QP creation checks (diff)
parentRDMA: Use the sg_table directly and remove the opencoded version from umem (diff)
downloadlinux-dev-6a217437f9f5482a3f6f2dc5fcd27cf0f62409ac.tar.xz
linux-dev-6a217437f9f5482a3f6f2dc5fcd27cf0f62409ac.zip
Merge branch 'sg_nents' into rdma.git for-next
From Maor Gottlieb ==================== Fix the use of nents and orig_nents in the sg table append helpers. The nents should be used by the DMA layer to store the number of DMA mapped sges, the orig_nents is the number of CPU sges. Since the sg append logic doesn't always create a SGL with exactly orig_nents entries store a total_nents as well to allow the table to be properly free'd and reorganize the freeing logic to share across all the use cases. ==================== Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> * 'sg_nents': RDMA: Use the sg_table directly and remove the opencoded version from umem lib/scatterlist: Fix wrong update of orig_nents lib/scatterlist: Provide a dedicated function to support table append
Diffstat (limited to 'drivers/infiniband/sw/rdmavt')
-rw-r--r--drivers/infiniband/sw/rdmavt/mr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rdmavt/mr.c b/drivers/infiniband/sw/rdmavt/mr.c
index 03d072290cdf..8a1f2e285180 100644
--- a/drivers/infiniband/sw/rdmavt/mr.c
+++ b/drivers/infiniband/sw/rdmavt/mr.c
@@ -368,7 +368,7 @@ struct ib_mr *rvt_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
mr->mr.page_shift = PAGE_SHIFT;
m = 0;
n = 0;
- for_each_sg_page (umem->sg_head.sgl, &sg_iter, umem->nmap, 0) {
+ for_each_sgtable_page (&umem->sgt_append.sgt, &sg_iter, 0) {
void *vaddr;
vaddr = page_address(sg_page_iter_page(&sg_iter));