Skip to content

Introduce getsockname io_uring_cmd

Gabriel Krisman Bertazi io-uring netdev 5 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 3 repliesApplied
  2. v33 patches 2 repliesSuperseded
  3. v2 posting 2/23 patches 3 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 1/23 patches0 repliesSuperseded
v13 patches6 repliesSuperseded

Changes in v4 from the cover letter

- Fix passing of 'peer' in io_uring side.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/3socket: Unify getsockname and getpeername implementationinclude/linux/socket.h net/compat.c net/socket.c+16 -470 replies
2/3socket: Split out a getsockname helper for io_uringinclude/linux/socket.h net/socket.c+22 -161 reply
3/3io_uring: Introduce getsockname io_uring cmdinclude/uapi/linux/io_uring.h io_uring/cmd_net.c+23 -01 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchKuniyuki Iwashima
1/3R-b
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/3] Introduce getsockname io_uring_cmd

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: [email protected]
CC: [email protected]
CC: Jakub Kicinski <[email protected]>
CC: David S. Miller <[email protected]>
CC: Eric Dumazet <[email protected]>
CC: Kuniyuki Iwashima <[email protected]>
CC: Paolo Abeni <[email protected]>
CC: Willem de Bruijn <[email protected]>
CC: Simon Horman <[email protected]>
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(-)
Signature · 1 line
2.51.0