From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 5/6] io_uring: simplify struct io_uring_sqe layout
Date: Thu, 24 Jun 2021 15:09:59 +0100 [thread overview]
Message-ID: <2e21ef7aed136293d654450bc3088973a8adc730.1624543113.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
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 <[email protected]>
---
include/uapi/linux/io_uring.h | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index c735fc22e459..10eb38d2864f 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -47,21 +47,17 @@ struct io_uring_sqe {
__u32 hardlink_flags;
};
__u64 user_data; /* data to be passed back at completion time */
+ /* pack this to avoid bogus arm OABI complaints */
union {
- struct {
- /* pack this to avoid bogus arm OABI complaints */
- union {
- /* index into fixed buffers, if used */
- __u16 buf_index;
- /* for grouped buffer selection */
- __u16 buf_group;
- } __attribute__((packed));
- /* personality to use, if used */
- __u16 personality;
- __s32 splice_fd_in;
- };
- __u64 __pad2[3];
- };
+ /* index into fixed buffers, if used */
+ __u16 buf_index;
+ /* for grouped buffer selection */
+ __u16 buf_group;
+ } __attribute__((packed));
+ /* personality to use, if used */
+ __u16 personality;
+ __s32 splice_fd_in;
+ __u64 __pad2[2];
};
enum {
--
2.32.0
next prev parent reply other threads:[~2021-06-24 14:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-24 14:09 [PATCH for-next 0/6] straightforward for-next cleanups Pavel Begunkov
2021-06-24 14:09 ` [PATCH 1/6] io_uring: don't change sqpoll creds if not needed Pavel Begunkov
2021-06-24 14:09 ` [PATCH 2/6] io_uring: refactor io_sq_thread() Pavel Begunkov
2021-06-24 14:09 ` [PATCH 3/6] io_uring: fix code style problems Pavel Begunkov
2021-06-24 14:09 ` [PATCH 4/6] io_uring: update sqe layout build checks Pavel Begunkov
2021-06-24 14:09 ` Pavel Begunkov [this message]
2021-06-24 14:10 ` [PATCH 6/6] io_uring: refactor io_openat2() Pavel Begunkov
2021-06-24 15:35 ` [PATCH for-next 0/6] straightforward for-next cleanups Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2e21ef7aed136293d654450bc3088973a8adc730.1624543113.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox