From: Breno Leitao <[email protected]>
To: [email protected], [email protected]
Cc: [email protected]
Subject: [PATCH 1/5] io_uring: uapi: Sync the {g,s}etsockopt fields
Date: Fri, 20 Oct 2023 06:39:13 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
Copy the UAPI fields necessary to support the new
SOCKET_URING_OP_GETSOCKOPT and SOCKET_URING_OP_SETSOCKOPT socket
commands.
Sync the necessary bits for io_uring_sqe struct from the kernel, and
also adds the SOCKET_URING_OP_GETSOCKOPT and SOCKET_URING_OP_SETSOCKOPT
to the enum that defines the commands.
Signed-off-by: Breno Leitao <[email protected]>
---
src/include/liburing/io_uring.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/include/liburing/io_uring.h b/src/include/liburing/io_uring.h
index 10a6ef0..a7a95a3 100644
--- a/src/include/liburing/io_uring.h
+++ b/src/include/liburing/io_uring.h
@@ -43,6 +43,10 @@ struct io_uring_sqe {
union {
__u64 addr; /* pointer to buffer or iovecs */
__u64 splice_off_in;
+ struct {
+ __u32 level;
+ __u32 optname;
+ };
};
__u32 len; /* buffer size or number of iovecs */
union {
@@ -79,6 +83,7 @@ struct io_uring_sqe {
union {
__s32 splice_fd_in;
__u32 file_index;
+ __u32 optlen;
struct {
__u16 addr_len;
__u16 __pad3[1];
@@ -89,6 +94,7 @@ struct io_uring_sqe {
__u64 addr3;
__u64 __pad2[1];
};
+ __u64 optval;
/*
* If the ring is initialized with IORING_SETUP_SQE128, then
* this field is used for 80 bytes of arbitrary command data
@@ -721,6 +727,8 @@ struct io_uring_recvmsg_out {
enum {
SOCKET_URING_OP_SIOCINQ = 0,
SOCKET_URING_OP_SIOCOUTQ,
+ SOCKET_URING_OP_GETSOCKOPT,
+ SOCKET_URING_OP_SETSOCKOPT,
};
#ifdef __cplusplus
--
2.34.1
next prev parent reply other threads:[~2023-10-20 13:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 13:39 [PATCH 0/5] liburing: Add {g,s}etsockopt command support Breno Leitao
2023-10-20 13:39 ` Breno Leitao [this message]
2023-10-20 13:39 ` [PATCH 2/5] liburing.h: Populate SQE for {s,g} etsockopt Breno Leitao
2023-10-20 13:39 ` [PATCH 3/5] tests/socket-getsetsock-cmd: New test for {g,s}etsockopt Breno Leitao
2023-10-20 13:39 ` [PATCH 4/5] man/io_uring_prep_cmd: Fix argument name Breno Leitao
2023-10-20 13:39 ` [PATCH 5/5] man/io_uring_prep_cmd: Add the new sockopt commands Breno Leitao
2023-10-20 15:06 ` [PATCH 0/5] liburing: Add {g,s}etsockopt command support 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 \
[email protected] \
[email protected] \
[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