summaryrefslogtreecommitdiffstats
path: root/io_uring/opdef.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2022-09-21 12:17:51 +0100
committerJens Axboe <axboe@kernel.dk>2022-09-21 13:15:02 -0600
commit516e82f0e043a1a0e8d00800ed0ffe2137cf0e7e (patch)
tree01851ad477ef7da2a50523bd38809de1790c39b3 /io_uring/opdef.c
parent6ae61b7aa2c758ce07347ebfa9c79b6f208098d5 (diff)
downloadlinux-stable-516e82f0e043a1a0e8d00800ed0ffe2137cf0e7e.tar.gz
linux-stable-516e82f0e043a1a0e8d00800ed0ffe2137cf0e7e.tar.bz2
linux-stable-516e82f0e043a1a0e8d00800ed0ffe2137cf0e7e.zip
io_uring/net: support non-zerocopy sendto
We have normal sends, but what is missing is sendto-like requests. Add sendto() capabilities to IORING_OP_SEND by passing in addr just as we do for IORING_OP_SEND_ZC. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/69fbd8b2cb830e57d1bf9ec351e9bf95c5b77e3f.1663668091.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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/io_uring/opdef.c b/io_uring/opdef.c
index 4fbefb7d70c7..849514abd046 100644
--- a/io_uring/opdef.c
+++ b/io_uring/opdef.c
@@ -316,11 +316,14 @@ const struct io_op_def io_op_defs[] = {
.pollout = 1,
.audit_skip = 1,
.ioprio = 1,
+ .manual_alloc = 1,
.name = "SEND",
#if defined(CONFIG_NET)
+ .async_size = sizeof(struct io_async_msghdr),
.prep = io_sendmsg_prep,
.issue = io_send,
.fail = io_sendrecv_fail,
+ .prep_async = io_send_prep_async,
#else
.prep = io_eopnotsupp_prep,
#endif
@@ -495,7 +498,7 @@ const struct io_op_def io_op_defs[] = {
.async_size = sizeof(struct io_async_msghdr),
.prep = io_sendzc_prep,
.issue = io_sendzc,
- .prep_async = io_sendzc_prep_async,
+ .prep_async = io_send_prep_async,
.cleanup = io_sendzc_cleanup,
.fail = io_send_zc_fail,
#else