summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Syromyatnikov <evgsyr@gmail.com>2021-09-20 04:13:36 +0200
committerEugene Syromyatnikov <evgsyr@gmail.com>2021-10-12 00:35:30 +0200
commit4298e4fdad32d7d94c7f0c559f9bc110296dc2f5 (patch)
treefff0849b30a162a4b1ab7246b47e2f7e14c88542
parent486cf863d6d5def6f25d30780f712fd4b8c79842 (diff)
downloadstrace-4298e4fdad32d7d94c7f0c559f9bc110296dc2f5.tar.gz
io_uring: print struct io_cqring_offsets.flags as integer and not flags
Since this is the offset of the cq_flags field in struct io_rings and not the flags themselves. * src/xlat/uring_cqring_flags.in: Remove. * src/io_uring.c: Remove "xlat/uring_cqring_flags.h" include. (print_io_cqring_offsets): Print flags using PRINT_FIELD_U. * tests/io_uring_setup.c: Remove "xlat/uring_cqring_flags.h"; update expected output. Fixes: v5.8~57 "io_uring: Add io_cqring_offset flags"
-rw-r--r--src/io_uring.c3
-rw-r--r--src/xlat/uring_cqring_flags.in2
-rw-r--r--tests/io_uring_setup.c10
3 files changed, 5 insertions, 10 deletions
diff --git a/src/io_uring.c b/src/io_uring.c
index e443af631..39f91d5f0 100644
--- a/src/io_uring.c
+++ b/src/io_uring.c
@@ -10,7 +10,6 @@
#include <linux/io_uring.h>
-#include "xlat/uring_cqring_flags.h"
#include "xlat/uring_enter_flags.h"
#include "xlat/uring_files_update_fds.h"
#include "xlat/uring_op_flags.h"
@@ -65,7 +64,7 @@ print_io_cqring_offsets(const struct io_cqring_offsets *const p)
tprint_struct_next();
PRINT_FIELD_U(*p, cqes);
tprint_struct_next();
- PRINT_FIELD_FLAGS(*p, flags, uring_cqring_flags, "IORING_CQ_???");
+ PRINT_FIELD_U(*p, flags);
if (p->resv1) {
tprint_struct_next();
PRINT_FIELD_X(*p, resv1);
diff --git a/src/xlat/uring_cqring_flags.in b/src/xlat/uring_cqring_flags.in
deleted file mode 100644
index cc68a66b3..000000000
--- a/src/xlat/uring_cqring_flags.in
+++ /dev/null
@@ -1,2 +0,0 @@
-#unconditional
-IORING_CQ_EVENTFD_DISABLED
diff --git a/tests/io_uring_setup.c b/tests/io_uring_setup.c
index 4a71a8fd7..d66f9cfc8 100644
--- a/tests/io_uring_setup.c
+++ b/tests/io_uring_setup.c
@@ -25,7 +25,6 @@
#include "xlat.h"
#include "xlat/uring_setup_features.h"
-#include "xlat/uring_cqring_flags.h"
static const char *errstr;
@@ -115,16 +114,15 @@ main(void)
params->sq_off.resv2);
printf("}, cq_off={head=%u, tail=%u, ring_mask=%u"
- ", ring_entries=%u, overflow=%u, cqes=%u, flags=",
+ ", ring_entries=%u, overflow=%u, cqes=%u"
+ ", flags=%u",
params->cq_off.head,
params->cq_off.tail,
params->cq_off.ring_mask,
params->cq_off.ring_entries,
params->cq_off.overflow,
- params->cq_off.cqes);
- printflags(uring_cqring_flags,
- params->cq_off.flags,
- "IORING_CQ_???");
+ params->cq_off.cqes,
+ params->cq_off.flags);
if (params->cq_off.resv1)
printf(", resv1=%#x", params->cq_off.resv1);
if (params->cq_off.resv2)