From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH liburing 3/4] tests/zc: fix udp testing
Date: Mon, 5 Sep 2022 15:21:05 +0100 [thread overview]
Message-ID: <f85ddc0dd0712ce17a5e7f73639c55d9c612cedf.1662387423.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
The tcp vs large_buf skip condition is not what we want and it skips udp
testing, fix it and also make sure we serialise cork requests with
IOSQE_IO_LINK as they might get executed OOO.
Signed-off-by: Pavel Begunkov <[email protected]>
---
test/send-zerocopy.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/send-zerocopy.c b/test/send-zerocopy.c
index f80a5cd..bfe4cf7 100644
--- a/test/send-zerocopy.c
+++ b/test/send-zerocopy.c
@@ -285,6 +285,8 @@ static int do_test_inet_send(struct io_uring *ring, int sock_client, int sock_se
}
if (force_async)
sqe->flags |= IOSQE_ASYNC;
+ if (cork && i != nr_reqs - 1)
+ sqe->flags |= IOSQE_IO_LINK;
}
sqe = io_uring_get_sqe(ring);
@@ -380,11 +382,9 @@ static int test_inet_send(struct io_uring *ring)
int buf_idx = aligned ? 0 : 1;
bool force_async = i & 128;
- if (!tcp || !large_buf)
- continue;
if (large_buf) {
buf_idx = 2;
- if (!aligned || !tcp || small_send)
+ if (!aligned || !tcp || small_send || cork)
continue;
}
if (!buffers_iov[buf_idx].iov_base)
--
2.37.2
next prev parent reply other threads:[~2022-09-05 14:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-05 14:21 [PATCH liburing 0/4] zc tests improvements Pavel Begunkov
2022-09-05 14:21 ` [PATCH liburing 1/4] tests/zc: move send size calc into do_test_inet_send Pavel Begunkov
2022-09-05 14:21 ` [PATCH liburing 2/4] tests/zc: use io_uring for rx Pavel Begunkov
2022-09-05 14:21 ` Pavel Begunkov [this message]
2022-09-05 14:21 ` [PATCH liburing 4/4] tests/zc: name buffer flavours Pavel Begunkov
2022-09-05 15:00 ` Dylan Yudaken
2022-09-05 15:17 ` Pavel Begunkov
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=f85ddc0dd0712ce17a5e7f73639c55d9c612cedf.1662387423.git.asml.silence@gmail.com \
[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