From: Dylan Yudaken <[email protected]>
To: <[email protected]>
Cc: <[email protected]>, <[email protected]>,
Dylan Yudaken <[email protected]>
Subject: [PATCH liburing 1/2] Revert "test/buf-ring: ensure cqe isn't used uninitialized"
Date: Wed, 15 Jun 2022 00:40:24 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
This reverts commit d6f9e02f9c6a777010824341f14c994b11dfc8b1.
"io_uring: add buffer selection support to IORING_OP_NOP" has been
reverted from 5.19, which this relies on
Signed-off-by: Dylan Yudaken <[email protected]>
---
test/buf-ring.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/test/buf-ring.c b/test/buf-ring.c
index af1cac8..2fcc360 100644
--- a/test/buf-ring.c
+++ b/test/buf-ring.c
@@ -234,19 +234,22 @@ static int test_one_nop(int bgid, struct io_uring *ring)
ret = -1;
goto out;
}
- ret = cqe->res;
- io_uring_cqe_seen(ring, cqe);
- if (ret == -ENOBUFS)
- return ret;
+ if (cqe->res == -ENOBUFS) {
+ ret = cqe->res;
+ goto out;
+ }
- if (ret != 0) {
+ if (cqe->res != 0) {
fprintf(stderr, "nop result %d\n", ret);
- return -1;
+ ret = -1;
+ goto out;
}
ret = cqe->flags >> 16;
+
out:
+ io_uring_cqe_seen(ring, cqe);
return ret;
}
--
2.30.2
next prev parent reply other threads:[~2022-06-15 7:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 7:40 [PATCH liburing 0/2] revert buf-ring test Dylan Yudaken
2022-06-15 7:40 ` Dylan Yudaken [this message]
2022-06-15 7:40 ` [PATCH liburing 2/2] Revert "buf-ring: add tests that cycle through the provided buffer ring" Dylan Yudaken
2022-06-15 11:16 ` [PATCH liburing 0/2] revert buf-ring test Dylan Yudaken
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] \
/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