Linux io-uring development
 help / color / mirror / Atom feed
From: David Wei <dw@davidwei.uk>
To: Kees Bakker <kees@ijzerbout.nl>,
	io-uring@vger.kernel.org, netdev@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>,
	Pavel Begunkov <asml.silence@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	David Ahern <dsahern@kernel.org>,
	Mina Almasry <almasrymina@google.com>,
	Stanislav Fomichev <stfomichev@gmail.com>,
	Joe Damato <jdamato@fastly.com>,
	Pedro Tammela <pctammela@mojatatu.com>,
	lizetao <lizetao1@huawei.com>
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: <5eac0173-c75e-40b3-a1bd-7cedf86237df@davidwei.uk> (raw)
In-Reply-To: <cc1b81b3-f02c-46d0-b4be-34bba23d20c7@ijzerbout.nl>

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 <axboe@kernel.dk>
>> Signed-off-by: David Wei <dw@davidwei.uk>
>> ---
>>   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)
> 

  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 \
    --in-reply-to=5eac0173-c75e-40b3-a1bd-7cedf86237df@davidwei.uk \
    --to=dw@davidwei.uk \
    --cc=almasrymina@google.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=io-uring@vger.kernel.org \
    --cc=jdamato@fastly.com \
    --cc=kees@ijzerbout.nl \
    --cc=kuba@kernel.org \
    --cc=lizetao1@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pctammela@mojatatu.com \
    --cc=stfomichev@gmail.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