summaryrefslogtreecommitdiff
path: root/io_uring/opdef.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2022-07-12 23:52:43 +0300
committerJens Axboe <axboe@kernel.dk>2022-07-25 03:41:07 +0300
commit06a5464be84e4ae48394d34441baf34bf9706827 (patch)
tree97726fb3e90715c2a4077834806f712a20826790 /io_uring/opdef.c
parentbc24d6bd32df0be19df3d30e74be4ba56493c0e2 (diff)
downloadlinux-06a5464be84e4ae48394d34441baf34bf9706827.tar.xz
io_uring: wire send zc request type
Add a new io_uring opcode IORING_OP_SENDZC. The main distinction from IORING_OP_SEND is that the user should specify a notification slot index in sqe::notification_idx and the buffers are safe to reuse only when the used notification is flushed and completes. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/a80387c6a68ce9cf99b3b6ef6f71068468761fb7.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/opdef.c')
-rw-r--r--io_uring/opdef.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/io_uring/opdef.c b/io_uring/opdef.c
index a7b84b43e6c2..7ab19bbf3126 100644
--- a/io_uring/opdef.c
+++ b/io_uring/opdef.c
@@ -470,6 +470,21 @@ const struct io_op_def io_op_defs[] = {
.issue = io_uring_cmd,
.prep_async = io_uring_cmd_prep_async,
},
+ [IORING_OP_SENDZC_NOTIF] = {
+ .name = "SENDZC_NOTIF",
+ .needs_file = 1,
+ .unbound_nonreg_file = 1,
+ .pollout = 1,
+ .audit_skip = 1,
+ .ioprio = 1,
+#if defined(CONFIG_NET)
+ .prep = io_sendzc_prep,
+ .issue = io_sendzc,
+#else
+ .prep = io_eopnotsupp_prep,
+#endif
+
+ },
};
const char *io_uring_get_opcode(u8 opcode)