From: David Wei <[email protected]>
To: Kees Bakker <[email protected]>,
[email protected], [email protected]
Cc: Jens Axboe <[email protected]>,
Pavel Begunkov <[email protected]>,
Jakub Kicinski <[email protected]>, Paolo Abeni <[email protected]>,
"David S. Miller" <[email protected]>,
Eric Dumazet <[email protected]>,
Jesper Dangaard Brouer <[email protected]>,
David Ahern <[email protected]>,
Mina Almasry <[email protected]>,
Stanislav Fomichev <[email protected]>,
Joe Damato <[email protected]>,
Pedro Tammela <[email protected]>,
lizetao <[email protected]>
Subject: Re: [PATCH v14 07/11] io_uring/zcrx: set pp memory provider for an rx queue
Date: Tue, 18 Feb 2025 14:06:50 -0800 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 2025-02-18 11:40, Kees Bakker wrote:
> Op 15-02-2025 om 01:09 schreef David Wei:
>> Set the page pool memory provider for the rx queue configured for zero
>> copy to io_uring. Then the rx queue is reset using
>> netdev_rx_queue_restart() and netdev core + page pool will take care of
>> filling the rx queue from the io_uring zero copy memory provider.
>>
>> For now, there is only one ifq so its destruction happens implicitly
>> during io_uring cleanup.
>>
>> Reviewed-by: Jens Axboe <[email protected]>
>> Signed-off-by: David Wei <[email protected]>
>> ---
>> io_uring/zcrx.c | 49 +++++++++++++++++++++++++++++++++++++++++--------
>> 1 file changed, 41 insertions(+), 8 deletions(-)
>>
>> diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
>> index 8833879d94ba..7d24fc98b306 100644
>> --- a/io_uring/zcrx.c
>> +++ b/io_uring/zcrx.c
>> [...]
>> @@ -444,6 +475,8 @@ void io_shutdown_zcrx_ifqs(struct io_ring_ctx *ctx)
>> if (ctx->ifq)
>> io_zcrx_scrub(ctx->ifq);
>> +
>> + io_close_queue(ctx->ifq);
> If ctx->ifq is NULL (which seems to be not unlikely given the if statement above)
> then you'll get a NULL pointer dereference in io_close_queue().
The only caller of io_shutdown_zcrx_ifqs() is io_ring_exit_work() which
checks for ctx->ifq first. That does mean the ctx->ifq check is
redundant in this function though.
>> }
>> static inline u32 io_zcrx_rqring_entries(struct io_zcrx_ifq *ifq)
>
next prev parent reply other threads:[~2025-02-18 22:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-15 0:09 [PATCH v14 00/11] io_uring zero copy rx David Wei
2025-02-15 0:09 ` [PATCH v14 01/11] io_uring/zcrx: add interface queue and refill queue David Wei
2025-02-15 0:09 ` [PATCH v14 02/11] io_uring/zcrx: add io_zcrx_area David Wei
2025-02-15 0:09 ` [PATCH v14 03/11] io_uring/zcrx: grab a net device David Wei
2025-02-15 0:09 ` [PATCH v14 04/11] io_uring/zcrx: implement zerocopy receive pp memory provider David Wei
2025-02-15 0:09 ` [PATCH v14 05/11] io_uring/zcrx: dma-map area for the device David Wei
2025-02-15 0:09 ` [PATCH v14 06/11] io_uring/zcrx: add io_recvzc request David Wei
2025-02-15 0:09 ` [PATCH v14 07/11] io_uring/zcrx: set pp memory provider for an rx queue David Wei
2025-02-18 19:40 ` Kees Bakker
2025-02-18 22:06 ` David Wei [this message]
2025-02-19 9:54 ` Pavel Begunkov
2025-02-15 0:09 ` [PATCH v14 08/11] io_uring/zcrx: throttle receive requests David Wei
2025-02-15 0:09 ` [PATCH v14 09/11] io_uring/zcrx: add copy fallback David Wei
2025-02-15 0:09 ` [PATCH v14 10/11] net: add documentation for io_uring zcrx David Wei
2025-02-15 0:09 ` [PATCH v14 11/11] io_uring/zcrx: add selftest David Wei
2025-02-15 18:08 ` [PATCH v14 00/11] io_uring zero copy rx Jakub Kicinski
2025-02-17 12:46 ` Jens Axboe
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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