public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: io-uring@vger.kernel.org
Cc: asml.silence@gmail.com, David Wei <dw@davidwei.uk>
Subject: [PATCH liburing 1/2] examples/zcrx: fix final recvzc CQE handling
Date: Wed, 23 Apr 2025 12:58:37 +0100	[thread overview]
Message-ID: <678348ee0d2bff1aca3753d9f31a3affe135f0f4.1745409376.git.asml.silence@gmail.com> (raw)
In-Reply-To: <cover.1745409376.git.asml.silence@gmail.com>

The last CQE of a zcrx request, i.e. without IORING_CQE_F_MORE,
doesn't have a buffer attached, don't fall through to buffer handling.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 examples/zcrx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/zcrx.c b/examples/zcrx.c
index 40a4f0ad..3073c4c5 100644
--- a/examples/zcrx.c
+++ b/examples/zcrx.c
@@ -220,6 +220,7 @@ static void process_recvzc(struct io_uring __attribute__((unused)) *ring,
 			t_error(1, 0, "total receive size mismatch %lu / %lu",
 				received, cfg_size);
 		stop = true;
+		return;
 	}
 	if (cqe->res < 0)
 		t_error(1, 0, "recvzc(): %d", cqe->res);
-- 
2.48.1


  reply	other threads:[~2025-04-23 11:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23 11:58 [PATCH liburing 0/2] huge page support for the zcrx examples Pavel Begunkov
2025-04-23 11:58 ` Pavel Begunkov [this message]
2025-04-23 11:58 ` [PATCH liburing 2/2] examples/zcrx: add huge page backed areas Pavel Begunkov
2025-04-23 20:00 ` [PATCH liburing 0/2] huge page support for the zcrx examples 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=678348ee0d2bff1aca3753d9f31a3affe135f0f4.1745409376.git.asml.silence@gmail.com \
    --to=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