Skip to content

net: Convert AF_NETLINK and AF_VSOCK to getsockopt_iter API

Breno Leitao linux-kselftest lkml netdev virtualization 1 version Applied

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

Get series with b4
b4 am [email protected] change-id 20260501-getsock_one-a62758a9ba25

Versions newest first

  1. v1 Latest3 patches 6 repliesApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3netlink: convert to getsockopt_iternet/netlink/af_netlink.c+11 -101 replyApplied
2/3vsock: convert to getsockopt_iternet/vmw_vsock/af_vsock.c+7 -93 repliesApplied
3/3net: selftests: add getsockopt_iter regression teststools/testing/selftests/net/Makefile tools/testing/selftests/net/getsockopt_iter.c+214 -02 repliesApplied

Reviews trailers per patch

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

PatchBobby EshlemanStanislav Fomichev
1/3A-b
2/3R-b A-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 v1 thread

Cover letter [PATCH net-next 0/3] net: Convert AF_NETLINK and AF_VSOCK to getsockopt_iter API

Continue the work to convert protocols to the new getsockopt_iter API.

Convert AF_NETLINK and AF_VSOCK getsockopt implementations to the new sockopt_t/getsockopt_iter API, and add kselftests that verify the size and errno semantics are preserved across the conversion.

I chose these two socket families because they are probably one of the most used protocols,, ensuring that any potential bugs will be discovered and reported quickly.

The selftest was added as suggested by Stanislav Fomichev in [1].

---
Breno Leitao (3):
netlink: convert to getsockopt_iter
vsock: convert to getsockopt_iter
net: selftests: add getsockopt_iter regression tests

 net/netlink/af_netlink.c                      |  21 +--
 net/vmw_vsock/af_vsock.c                      |  16 +-
 tools/testing/selftests/net/Makefile          |   1 +
 tools/testing/selftests/net/getsockopt_iter.c | 213 ++++++++++++++++++++++++++
 4 files changed, 232 insertions(+), 19 deletions(-)

---
base-commit: edf4bee4215a173c0534d1851d7523d827149f9e
change-id: 20260501-getsock_one-a62758a9ba25
prerequisite-change-id: 20260501-getsock_iter_first-87f6a74c24e0:v1

Best regards,

Signature · 1 line
Breno Leitao <[email protected]>