From: Gabriel Krisman Bertazi <krisman@suse.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Gabriel Krisman Bertazi <krisman@suse.de>,
netdev@vger.kernel.org, io-uring@vger.kernel.org,
Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Kuniyuki Iwashima <kuniyu@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Willem de Bruijn <willemb@google.com>,
Simon Horman <horms@kernel.org>
Subject: [PATCH v4 0/3] Introduce getsockname io_uring_cmd
Date: Tue, 25 Nov 2025 16:17:58 -0500 [thread overview]
Message-ID: <20251125211806.2673912-1-krisman@suse.de> (raw)
Since V3:
- Fix passing of 'peer' in io_uring side.
Since V2:
- Move sockaddr_storage to do_sockname
Since V1:
- minor style fixes
- Resend with (more) maintainers cc'ed
- rebased to axboe/for-next.
--
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/1241076672589991970/1429975797912830074
CC: netdev@vger.kernel.org
CC: io-uring@vger.kernel.org
CC: Jakub Kicinski <kuba@kernel.org>
CC: David S. Miller <davem@davemloft.net>
CC: Eric Dumazet <edumazet@google.com>
CC: Kuniyuki Iwashima <kuniyu@google.com>
CC: Paolo Abeni <pabeni@redhat.com>
CC: Willem de Bruijn <willemb@google.com>
CC: Simon Horman <horms@kernel.org>
Base: axboe/for-next
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 | 22 ++++++++++++
net/compat.c | 4 +--
net/socket.c | 67 +++++++++++------------------------
5 files changed, 49 insertions(+), 51 deletions(-)
--
2.51.0
next reply other threads:[~2025-11-25 21:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-25 21:17 Gabriel Krisman Bertazi [this message]
2025-11-25 21:17 ` [PATCH v4 1/3] socket: Unify getsockname and getpeername implementation Gabriel Krisman Bertazi
2025-11-25 21:18 ` [PATCH v4 2/3] socket: Split out a getsockname helper for io_uring Gabriel Krisman Bertazi
2025-11-26 0:24 ` Kuniyuki Iwashima
2025-11-25 21:18 ` [PATCH v4 3/3] io_uring: Introduce getsockname io_uring cmd Gabriel Krisman Bertazi
2025-11-26 16:51 ` Jens Axboe
2025-11-26 21:47 ` [PATCH v4 0/3] Introduce getsockname io_uring_cmd Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251125211806.2673912-1-krisman@suse.de \
--to=krisman@suse.de \
--cc=axboe@kernel.dk \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=io-uring@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox