[PATCH v2 2/2] io_uring: Add cqring_offset flags

Chris Packham Chris.Packham at alliedtelesis.co.nz
Tue Jun 16 22:14:17 UTC 2020


On 16/06/20 10:12 pm, Dmitry V. Levin wrote:
> On Mon, Jun 15, 2020 at 10:01:26PM +1200, Chris Packham wrote:
>> Add support for displaying the recently added flags member of struct
>> io_cqring_offsets.
>>
>> * configure.ac: detect io_cqring_offsets.flags
>> * io_uring.c: update to print io_cqring_offsets.flags
>> * tests/io_uring_setup.c: add test for same
>> * types/io_uring.h: update with definition from linux
>> * xlat/uring_cqring_flags.in: define IO_CQRING flags
> Unfortunately, this doesn't build with v5.7 headers:
> ../types/check-io_uring.c:21:1: error: static assertion failed: "struct io_cqring_offsets size mismatch, please update the decoder or fix the kernel"
>     21 | static_assert(sizeof(struct io_cqring_offsets) <= offsetof(struct_io_cqring_offsets, resv2),
>        | ^~~~~~~~~~~~~
>
> Apparently, types/gen.sh isn't friendly enough to field renames
> in uapi headers.
Hmm I thought I did test kernel headers before/after the change. 
sizeof(struct io_cqring_offsets) isn't actually changing so the assert 
should still be valid unless there's some odd padding/alignment thing 
going on with the change I made to to struct_io_cqring_offsets.


More information about the Strace-devel mailing list