public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: io-uring@vger.kernel.org, David Wei <dw@davidwei.uk>
Cc: Pavel Begunkov <asml.silence@gmail.com>
Subject: Re: [PATCH v2] io_uring/zcrx: return early from io_zcrx_recv_skb if readlen is 0
Date: Tue, 01 Apr 2025 14:01:23 -0600	[thread overview]
Message-ID: <174353768310.1901497.13958732292797416142.b4-ty@kernel.dk> (raw)
In-Reply-To: <20250401195355.1613813-1-dw@davidwei.uk>


On Tue, 01 Apr 2025 12:53:55 -0700, David Wei wrote:
> When readlen is set for a recvzc request, tcp_read_sock() will call
> io_zcrx_recv_skb() one final time with len == desc->count == 0. This is
> caused by the !desc->count check happening too late. The offset + 1 !=
> skb->len happens earlier and causes the while loop to continue.
> 
> Fix this in io_zcrx_recv_skb() instead of tcp_read_sock(). Return early
> if len is 0 i.e. the read is done.
> 
> [...]

Applied, thanks!

[1/1] io_uring/zcrx: return early from io_zcrx_recv_skb if readlen is 0
      commit: fcfd94d6967a98e88b834c9fd81e73c5f04d83dc

Best regards,
-- 
Jens Axboe




      parent reply	other threads:[~2025-04-01 20:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01 19:53 [PATCH v2] io_uring/zcrx: return early from io_zcrx_recv_skb if readlen is 0 David Wei
2025-04-01 19:59 ` Jens Axboe
2025-04-01 20:01 ` Jens Axboe [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=174353768310.1901497.13958732292797416142.b4-ty@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asml.silence@gmail.com \
    --cc=dw@davidwei.uk \
    --cc=io-uring@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox