From: Dylan Yudaken <[email protected]>
To: Jens Axboe <[email protected]>, Pavel Begunkov <[email protected]>
Cc: <[email protected]>, <[email protected]>,
Dylan Yudaken <[email protected]>
Subject: [PATCH liburing] Do not always expect multishot recv to stop posting events
Date: Mon, 7 Nov 2022 05:04:04 -0800 [thread overview]
Message-ID: <[email protected]> (raw)
Later kernels can have a fix that does not stop multishot from posting
events, and would just continue in overflow mode.
Signed-off-by: Dylan Yudaken <[email protected]>
---
test/recv-multishot.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/test/recv-multishot.c b/test/recv-multishot.c
index 2cfe6898de4c..ed26a5f78759 100644
--- a/test/recv-multishot.c
+++ b/test/recv-multishot.c
@@ -264,11 +264,19 @@ static int test(struct args *args)
bool const is_last = i == recv_cqes - 1;
+ /*
+ * Older kernels could terminate multishot early due to overflow,
+ * but later ones will not. So discriminate based on the MORE flag.
+ */
+ bool const early_last = args->early_error == ERROR_EARLY_OVERFLOW &&
+ !args->wait_each &&
+ i == N_CQE_OVERFLOW &&
+ !(cqe->flags & IORING_CQE_F_MORE);
+
bool const should_be_last =
(cqe->res <= 0) ||
(args->stream && is_last) ||
- (args->early_error == ERROR_EARLY_OVERFLOW &&
- !args->wait_each && i == N_CQE_OVERFLOW);
+ early_last;
int *this_recv;
int orig_payload_size = cqe->res;
base-commit: 754bc068ec482c5338a07dd74b7d3892729bb847
--
2.30.2
next reply other threads:[~2022-11-07 13:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-07 13:04 Dylan Yudaken [this message]
2022-11-07 20:18 ` [PATCH liburing] Do not always expect multishot recv to stop posting events 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] \
/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