]> Gentwo Git Trees - linux/.git/commit
io_uring: Introduce getsockname io_uring cmd
authorGabriel Krisman Bertazi <krisman@suse.de>
Tue, 25 Nov 2025 21:18:01 +0000 (16:18 -0500)
committerJens Axboe <axboe@kernel.dk>
Wed, 26 Nov 2025 20:45:23 +0000 (13:45 -0700)
commit5d24321e4c159088604512d7a5c5cf634d23e01a
tree6f7998c9b8faf6c6b16d63c04547022eb7d9bf7e
parentd73c1677087391379441c0bb444c7fb4238fc6e7
io_uring: Introduce getsockname io_uring cmd

Introduce a socket-specific io_uring_cmd to support
getsockname/getpeername via io_uring.  I made this an io_uring_cmd
instead of a new operation to avoid polluting the command namespace with
what is exclusively a socket operation.  In addition, since we don't
need to conform to existing interfaces, this merges the
getsockname/getpeername in a single operation, since the implementation
is pretty much the same.

This has been frequently requested, for instance at [1] and more
recently in the project Discord channel. The main use-case is to support
fixed socket file descriptors.

[1] https://github.com/axboe/liburing/issues/1356

Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/uapi/linux/io_uring.h
io_uring/cmd_net.c