Skip to contentSkip to conversation

cqe skip tests

PATCH Applied Pavel Begunkov 2 participants 4 messages Nov 24, 2021 io_uring

lore
Share & tools
lore
#0 lore raw

v2 cover cqe skip tests

add tests for IOSQE_CQE_SKIP_SUCCESS

v2: rebase
update io_uring.h
use IORING_FEAT_CQE_SKIP for compat checks

Pavel Begunkov (2):
io_uring.h: update to reflect cqe-skip feature
tests: add tests for IOSQE_CQE_SKIP_SUCCESS

 .gitignore                      |   1 +
 src/include/liburing/io_uring.h |   4 +
 test/Makefile                   |   1 +
 test/skip-cqe.c                 | 338 ++++++++++++++++++++++++++++++++
 4 files changed, 344 insertions(+)
 create mode 100644 test/skip-cqe.c
Signature · 1 line
2.34.0
#1 lore raw

PATCH v2 1/2 io_uring.h: update to reflect cqe-skip feature

Add IOSQE_CQE_SKIP_SUCCESS and friends

---
 src/include/liburing/io_uring.h | 4 ++++
 1 file changed, 4 insertions(+)
src/include/liburing/io_uring.h +4 -0
index 61683bd..a7d193d 100644
@@ -74,6 +74,7 @@ enum {
 	IOSQE_IO_HARDLINK_BIT,
 	IOSQE_ASYNC_BIT,
 	IOSQE_BUFFER_SELECT_BIT,
+	IOSQE_CQE_SKIP_SUCCESS_BIT,
 };
 
 /*
@@ -91,6 +92,8 @@ enum {
 #define IOSQE_ASYNC		(1U << IOSQE_ASYNC_BIT)
 /* select buffer from sqe->buf_group */
 #define IOSQE_BUFFER_SELECT	(1U << IOSQE_BUFFER_SELECT_BIT)
+/* don't post CQE if request succeeded */
+#define IOSQE_CQE_SKIP_SUCCESS	(1U << IOSQE_CQE_SKIP_SUCCESS_BIT)
 
 /*
  * io_uring_setup() flags
@@ -293,6 +296,7 @@ struct io_uring_params {
 #define IORING_FEAT_EXT_ARG		(1U << 8)
 #define IORING_FEAT_NATIVE_WORKERS	(1U << 9)
 #define IORING_FEAT_RSRC_TAGS		(1U << 10)
+#define IORING_FEAT_CQE_SKIP		(1U << 11)
 
 /*
  * io_uring_register(2) opcodes and arguments
Signature · 1 line
2.34.0
#2 lore raw

PATCH v2 2/2 tests: add tests for IOSQE_CQE_SKIP_SUCCESS

In reply to Pavel Begunkov
---
 .gitignore      |   1 +
 test/Makefile   |   1 +
 test/skip-cqe.c | 338 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 340 insertions(+)
 create mode 100644 test/skip-cqe.c
.gitignore +1 -0
index fb3a859..cb08ca0 100644
@@ -131,6 +131,7 @@
 /test/testfile
 /test/submit-link-fail
 /test/exec-target
+/test/skip-cqe
 /test/*.dmesg
 /test/output/
 
test/Makefile +1 -0
index d6e7227..c09078a 100644
@@ -147,6 +147,7 @@ test_srcs := \
 	timeout-overflow.c \
 	unlink.c \
 	wakeup-hang.c \
+	skip-cqe.c \
 	# EOL
 
 
test/skip-cqe.c new file +338 -0

338 lines not on this page · raw message

Signature · 1 line
2.34.0
maintainer Applied
#3 lore raw
In reply to Pavel Begunkov
Quoted 11 lines · Pavel Begunkov

add tests for IOSQE_CQE_SKIP_SUCCESS

v2: rebase
update io_uring.h
use IORING_FEAT_CQE_SKIP for compat checks

Pavel Begunkov (2):
io_uring.h: update to reflect cqe-skip feature
tests: add tests for IOSQE_CQE_SKIP_SUCCESS

[...]

Applied, thanks!

[1/2] io_uring.h: update to reflect cqe-skip feature

      commit: 2b0b33a7fd274e56d923d8dd027679feb1fd7eeb
[2/2] tests: add tests for IOSQE_CQE_SKIP_SUCCESS
      commit: 78f733007fd0ed50ec12421805716922541d8d47

Best regards,

Signature · 1 line
Jens Axboe