From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, io-uring@vger.kernel.org
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH io_uring] io_uring/zcrx: don't sync for cpu dma-bufs
Date: Thu, 26 Nov 2026 13:31:32 +0000 [thread overview]
Message-ID: <e7655061-2b71-439d-a933-09fa54fa96c3@gmail.com> (raw)
In-Reply-To: <1a338198-527e-418c-9e0f-2b619ea84e71@kernel.dk>
On 11/4/26 16:14, Jens Axboe wrote:
> On 11/3/26 5:11 PM, Pavel Begunkov wrote:
>> dma-bufs follow different from normal memory rules, we don't need to
>> sync it for the user. If the user space wants to directly access it, it
>> should use proper primitives like DMA_BUF_IOCTL_SYNC.
>>
>> Fixes: a5c98e9424573 ("io_uring/zcrx: dmabuf backed zerocopy receive")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
>> ---
>> io_uring/zcrx.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
>> index 6d7abb1636e7..17e554bb774f 100644
>> --- a/io_uring/zcrx.c
>> +++ b/io_uring/zcrx.c
>> @@ -1425,6 +1425,8 @@ static int io_pp_zc_init(struct page_pool *pp)
>> if (pp->p.dma_dir != DMA_FROM_DEVICE)
>> return -EOPNOTSUPP;
>>
>> + if (!ifq->kern_readable)
>> + pp->dma_sync_for_cpu = false;
>
> Should this clear ->dma_sync as well for this? That'd bring it
> closer to what devmem does.
It can as well be that, but IIRC it needs some extra apart from
just setting the flag. I'll resend.
--
Pavel Begunkov
prev parent reply other threads:[~2026-11-26 13:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 0:11 [PATCH io_uring] io_uring/zcrx: don't sync for cpu dma-bufs Pavel Begunkov
2026-11-04 16:14 ` Jens Axboe
2026-11-26 13:31 ` Pavel Begunkov [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=e7655061-2b71-439d-a933-09fa54fa96c3@gmail.com \
--to=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.