From: Jason Gunthorpe <jgg@ziepe.ca>
To: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Cc: leon@kernel.org, Nick Child <nchild@cornelisnetworks.com>,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH for-next] RDMA/umem: Initialize iova for dmabuf umem
Date: Fri, 10 Apr 2026 18:46:43 -0300 [thread overview]
Message-ID: <20260410214643.GA3694781@ziepe.ca> (raw)
In-Reply-To: <177584750586.341184.13583748105422169656.stgit@awdrv-04.cornelisnetworks.com>
On Fri, Apr 10, 2026 at 02:58:25PM -0400, Dennis Dalessandro wrote:
> As of commit 4fbc3a52cd4d ("RDMA/core: Fix umem iterator when PAGE_SIZE is
> greater then HCA pgsz") rdma_umem_for_each_dma_block() iterates at most
> ib_umem_num_dma_blocks() times. ib_umem_num_dma_blocks() calculates the
> number of blocks by extending iova + length to page boundaries.
> Previously, a call to ib_umem_dmabuf_get_pinned_with_dma_device() followed
> by rdma_umem_for_each_dma_block() would leave iova uninitialized and
> iteration would only cover a subset of blocks if the memory did not
> begin on a boundary.
Well that's illegal. Drivers must always call ib_umem_find_best_pgsz()
which always sets iova properly. Fix the driver that isn't doing this
sequence right.
Jason
prev parent reply other threads:[~2026-04-10 21:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-10 18:58 [PATCH for-next] RDMA/umem: Initialize iova for dmabuf umem Dennis Dalessandro
2026-04-10 21:46 ` Jason Gunthorpe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260410214643.GA3694781@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=dennis.dalessandro@cornelisnetworks.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=nchild@cornelisnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox