Skip to content

tcp: convert the SOL_TCP getsockopt path to sockopt_t

Breno Leitao bpf linux-kselftest lkml netdev 1 version In review

Get series with b4
b4 am [email protected] change-id 20261109-getsockopt_phase7-9f14457eba34

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3net/tcp-ao: convert the getsockopt helpers to sockopt_tinclude/net/tcp_ao.h net/ipv4/tcp.c net/ipv4/tcp_ao.c+76 -422 replies
2/3tcp: convert do_tcp_getsockopt() to sockopt_tinclude/net/tcp.h net/core/filter.c net/ipv4/tcp.c+76 -951 reply
3/3selftests: net: getsockopt_iter: cover tcptools/testing/selftests/net/getsockopt_iter.c+245 -01 reply

Reviews trailers per patch

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

PatchStanislav Fomichev
1/3
2/3A-b
3/3A-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] tcp: convert the SOL_TCP getsockopt path to sockopt_t

This series continues the migration to sockopt_t, as described in [1]. do_ip_getsockopt() and do_ipv6_getsockopt() moved to sockopt_t in [2]; this does the same for do_tcp_getsockopt(), which still takes a sockptr_t pair.

Once this lands, the MPTCP and SCTP getsockopt paths come next. MPTCP builds on this series: with do_tcp_getsockopt() on sockopt_t, mptcp_getsockopt_first_sf_only() can pass its own sockopt_t to it on the first subflow, instead of calling tcp_getsockopt() with the user pointers.

Patch 1 converts the TCP-AO getters.
Patch 2 converts do_tcp_getsockopt() itself. tcp_getsockopt() keeps its __user prototype and builds the sockopt_t once the level is SOL_TCP, as ip_getsockopt() does.
Patch 3 adds a tcp fixture to the getsockopt_iter selftest.

---
Breno Leitao (3):
net/tcp-ao: convert the getsockopt helpers to sockopt_t
tcp: convert do_tcp_getsockopt() to sockopt_t
selftests: net: getsockopt_iter: cover tcp

 include/net/tcp.h                             |   3 +-
 include/net/tcp_ao.h                          |  13 +-
 net/core/filter.c                             |  30 +++-
 net/ipv4/tcp.c                                | 116 ++++++------
 net/ipv4/tcp_ao.c                             |  77 ++++----
 tools/testing/selftests/net/getsockopt_iter.c | 245 ++++++++++++++++++++++++++
 6 files changed, 372 insertions(+), 112 deletions(-)

---
base-commit: c88fd6989aea9237a60a4859139a265bfb7ddc0b
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git main
change-id: 20261109-getsockopt_phase7-9f14457eba34

Best regards,

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