Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

io_uring: simplify struct io_uring_sqe layout

Flatten struct io_uring_sqe, the last union is exactly 64B, so move them
out of union { struct { ... }}, and decrease __pad2 size.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/2e21ef7aed136293d654450bc3088973a8adc730.1624543113.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Pavel Begunkov and committed by
Jens Axboe
9ba6a1c0 16340eab

+10 -14
+10 -14
include/uapi/linux/io_uring.h
··· 46 46 __u32 unlink_flags; 47 47 }; 48 48 __u64 user_data; /* data to be passed back at completion time */ 49 + /* pack this to avoid bogus arm OABI complaints */ 49 50 union { 50 - struct { 51 - /* pack this to avoid bogus arm OABI complaints */ 52 - union { 53 - /* index into fixed buffers, if used */ 54 - __u16 buf_index; 55 - /* for grouped buffer selection */ 56 - __u16 buf_group; 57 - } __attribute__((packed)); 58 - /* personality to use, if used */ 59 - __u16 personality; 60 - __s32 splice_fd_in; 61 - }; 62 - __u64 __pad2[3]; 63 - }; 51 + /* index into fixed buffers, if used */ 52 + __u16 buf_index; 53 + /* for grouped buffer selection */ 54 + __u16 buf_group; 55 + } __attribute__((packed)); 56 + /* personality to use, if used */ 57 + __u16 personality; 58 + __s32 splice_fd_in; 59 + __u64 __pad2[2]; 64 60 }; 65 61 66 62 enum {