io_uring/cmd: Introduce SOCKET_URING_OP_SETSOCKOPT
authorBreno Leitao <leitao@debian.org>
Mon, 16 Oct 2023 13:47:48 +0000 (06:47 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 19 Oct 2023 22:42:03 +0000 (16:42 -0600)
commit4232c6e349f3a591fd0f432e6b858d32095adce6
treed4af616068a1fb5ad312b0240625e6b6dbfc4558
parenta5d2f99aff6b6f9cd6a1ab6907d8be8066114791
io_uring/cmd: Introduce SOCKET_URING_OP_SETSOCKOPT

Add initial support for SOCKET_URING_OP_SETSOCKOPT. This new command is
similar to setsockopt. This implementation leverages the function
do_sock_setsockopt(), which is shared with the setsockopt() system call
path.

Important to say that userspace needs to keep the pointer's memory alive
until the operation is completed. I.e, the memory could not be
deallocated before the CQE is returned to userspace.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
Link: https://lore.kernel.org/r/20231016134750.1381153-11-leitao@debian.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/uapi/linux/io_uring.h
io_uring/uring_cmd.c