| From: |
| Gabriel Krisman Bertazi <krisman-AT-suse.de> |
| To: |
| Jens Axboe <axboe-AT-kernel.dk> |
| Subject: |
| [PATCH 0/3] Introduce getsockname io_uring_cmd |
| Date: |
| Fri, 24 Oct 2025 11:48:57 -0400 |
| Message-ID: |
| <20251024154901.797262-1-krisman@suse.de> |
| Cc: |
| Gabriel Krisman Bertazi <krisman-AT-suse.de>, netdev-AT-vger.kernel.org, io-uring-AT-vger.kernel.org, Jakub Kicinski <kuba-AT-kernel.org>, "David S . Miller" <davem-AT-davemloft.net>, Eric Dumazet <edumazet-AT-google.com> |
| Archive-link: |
| Article |
This feature has been requested a few times in the liburing repository
and Discord channels, such as in [1,2]. If anything, it also helps
solve a long standing issue in the bind-listen test that results in
occasional test failures.
The patchset is divided in three parts: Patch 1 merges the getpeername
and getsockname implementation in the network layer, making further
patches easier; Patch 2 splits out a helper used by io_uring, like done
for other network commands; Finally, patch 3 plumbs the new command in
io_uring.
The syscall path was tested by booting a Linux distro, which does all
sorts of getsockname/getpeername syscalls. The io_uring side was tested
with a couple of new liburing subtests available at:
https://github.com/krisman/liburing.git -b socket
Based on top of Jens' for-next.
[1] https://github.com/axboe/liburing/issues/1356
[2] https://discord.com/channels/1241076672589991966/12410766...
---
Gabriel Krisman Bertazi (3):
socket: Unify getsockname and getpeername implementation
socket: Split out a getsockname helper for io_uring
io_uring: Introduce getsockname io_uring cmd
include/linux/socket.h | 6 +--
include/uapi/linux/io_uring.h | 1 +
io_uring/cmd_net.c | 24 ++++++++++++
net/compat.c | 4 +-
net/socket.c | 69 +++++++++++------------------------
5 files changed, 52 insertions(+), 52 deletions(-)
--
2.51.0