io_uring/trace: support completion tracing of mixed 32b CQEs
authorJens Axboe <axboe@kernel.dk>
Thu, 7 Aug 2025 20:13:36 +0000 (14:13 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 8 Aug 2025 15:24:49 +0000 (09:24 -0600)
Check for IORING_CQE_F_32 as well, not just if the ring was setup with
IORING_SETUP_CQE32 to only support big CQEs.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/trace/events/io_uring.h

index 6a970625a3ea46df89fc28a369b7d1908a2f532d..45d15460b495324cbb1dbbae512ce2c4cf867df7 100644 (file)
@@ -340,8 +340,8 @@ TP_PROTO(struct io_ring_ctx *ctx, void *req, struct io_uring_cqe *cqe),
                __entry->user_data      = cqe->user_data;
                __entry->res            = cqe->res;
                __entry->cflags         = cqe->flags;
-               __entry->extra1         = ctx->flags & IORING_SETUP_CQE32 ? cqe->big_cqe[0] : 0;
-               __entry->extra2         = ctx->flags & IORING_SETUP_CQE32 ? cqe->big_cqe[1] : 0;
+               __entry->extra1         = ctx->flags & IORING_SETUP_CQE32 || cqe->flags & IORING_CQE_F_32 ? cqe->big_cqe[0] : 0;
+               __entry->extra2         = ctx->flags & IORING_SETUP_CQE32 || cqe->flags & IORING_CQE_F_32 ? cqe->big_cqe[1] : 0;
        ),
 
        TP_printk("ring %p, req %p, user_data 0x%llx, result %d, cflags 0x%x "