* [PATCH liburing] Do not always expect multishot recv to stop posting events
@ 2022-11-07 13:04 Dylan Yudaken
2022-11-07 20:18 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Dylan Yudaken @ 2022-11-07 13:04 UTC (permalink / raw)
To: Jens Axboe, Pavel Begunkov; +Cc: io-uring, kernel-team, Dylan Yudaken
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH liburing] Do not always expect multishot recv to stop posting events
2022-11-07 13:04 [PATCH liburing] Do not always expect multishot recv to stop posting events Dylan Yudaken
@ 2022-11-07 20:18 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2022-11-07 20:18 UTC (permalink / raw)
To: Dylan Yudaken, Pavel Begunkov; +Cc: io-uring, kernel-team
On Mon, 7 Nov 2022 05:04:04 -0800, Dylan Yudaken wrote:
> Later kernels can have a fix that does not stop multishot from posting
> events, and would just continue in overflow mode.
>
>
Applied, thanks!
[1/1] Do not always expect multishot recv to stop posting events
commit: 0d4fdb416718a70a4a90c5c4722b38cf44849195
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-07 20:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-07 13:04 [PATCH liburing] Do not always expect multishot recv to stop posting events Dylan Yudaken
2022-11-07 20:18 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox