Skip to content

vsock: SO_INQ for stream sockets

David Carlier lkml netdev virtualization 3 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 2 repliesApplied 3/3
  2. v22 patches 4 repliesSuperseded
  3. v12 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- split the SOL_SOCKET refactor out of the SO_INQ patch (Stefano)
- rename vsock_custom_sockopt() to vsock_sol_socket_custom() (Stefano)
- parse the value in vsock_sol_socket_get_bool() after the per option checks, so SO_INQ on SOCK_SEQPACKET always fails with ENOPROTOOPT (Stefano)
- reflow the comment to 80 columns (Stefano)
- carry Reviewed-by and Acked-by on the test patch; Bobby's Acked-by on the v2 kernel patch is dropped since it was split and reworked
v2: https://lore.kernel.org/netdev/[email protected]/
v1: https://lore.kernel.org/netdev/[email protected]/

[1] https://lore.kernel.org/netdev/[email protected]/

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3vsock: move SOL_SOCKET options to vsock_sol_socket_setsockopt()net/vmw_vsock/af_vsock.c+65 -251 replyApplied
2/3vsock: support SO_INQ on stream socketsinclude/net/af_vsock.h net/vmw_vsock/af_vsock.c+33 -31 replyApplied
3/3vsock/test: cover SO_INQtools/testing/vsock/vsock_test.c+279 -00 repliesApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchStefano GarzarellaBobby Eshleman
1/3R-b
2/3R-b
3/3R-b A-b

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

Read the v3 thread

Cover letter [PATCH net-next v3 0/3] vsock: SO_INQ for stream sockets

This is the follow-up announced in the receive queue hint series [1]:
SO_INQ and SCM_INQ for AF_VSOCK stream sockets, as AF_UNIX has.

Patch 1 moves the SOL_SOCKET option handling to a helper without functional change, patch 2 adds SO_INQ and patch 3 covers it in vsock_test.

The value is the one SIOCINQ returns, so on Hyper-V it covers the current packet only. Accepted sockets inherit the flag from the listener, and the sockmap receive path does not report it.

Tested over loopback with vsock_test and vsock_uring_test.

v3:
- split the SOL_SOCKET refactor out of the SO_INQ patch (Stefano)
- rename vsock_custom_sockopt() to vsock_sol_socket_custom() (Stefano)
- parse the value in vsock_sol_socket_get_bool() after the per option checks, so SO_INQ on SOCK_SEQPACKET always fails with ENOPROTOOPT (Stefano)
- reflow the comment to 80 columns (Stefano)
- carry Reviewed-by and Acked-by on the test patch; Bobby's Acked-by on the v2 kernel patch is dropped since it was split and reworked
v2: https://lore.kernel.org/netdev/[email protected]/
v1: https://lore.kernel.org/netdev/[email protected]/

[1] https://lore.kernel.org/netdev/[email protected]/

David Carlier (3):
vsock: move SOL_SOCKET options to vsock_sol_socket_setsockopt()
vsock: support SO_INQ on stream sockets
vsock/test: cover SO_INQ

 include/net/af_vsock.h           |   1 +
 net/vmw_vsock/af_vsock.c         | 125 ++++++++++----
 tools/testing/vsock/vsock_test.c | 279 +++++++++++++++++++++++++++++++
 3 files changed, 377 insertions(+), 28 deletions(-)

base-commit: a4057f51efc2b74ddf46721e83f45e9efb13649d

Signature · 1 line
2.55.0