From: Pavel Begunkov <asml.silence@gmail.com>
To: io-uring@vger.kernel.org
Cc: asml.silence@gmail.com, axboe@kernel.dk
Subject: [PATCH liburing 1/1] examples/zcrx: fix just allocated sock struct checks
Date: Sun, 12 Apr 2026 15:17:14 +0100 [thread overview]
Message-ID: <b689b7956262aa53d37c0608c80a007dfa4cd06e.1776002658.git.asml.silence@gmail.com> (raw)
The line in process_accept() checking sockfd is a leftover from times
there was just one static socket. Now it's allocated, and we shouldn't
be checking an uninitialised value, which fails the benchmark from time
to time.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
examples/zcrx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/examples/zcrx.c b/examples/zcrx.c
index 4b9f078e..b55b07ce 100644
--- a/examples/zcrx.c
+++ b/examples/zcrx.c
@@ -356,8 +356,6 @@ static void process_accept(struct io_uring *ring, struct io_uring_cqe *cqe)
conn = aligned_alloc(64, sizeof(*conn));
if (!conn)
t_error(1, 0, "can't allocate conn structure");
- if (conn->sockfd)
- t_error(1, 0, "Unexpected second connection");
memset(conn, 0, sizeof(*conn));
conn->sockfd = cqe->res;
--
2.53.0
next reply other threads:[~2026-04-12 14:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-12 14:17 Pavel Begunkov [this message]
2026-04-15 20:13 ` [PATCH liburing 1/1] examples/zcrx: fix just allocated sock struct checks 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=b689b7956262aa53d37c0608c80a007dfa4cd06e.1776002658.git.asml.silence@gmail.com \
--to=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--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