From: Geliang Tang <tanggeliang@kylinos.cn>
This series introduces the msk_is_mptcp() helper function to check
whether a socket is an MPTCP parent socket (IPPROTO_MPTCP on SOCK_STREAM).
This helper is useful for adding MPTCP support in various subsystems,
such as MPTCP sockmap support [1] and landlock MPTCP access rights [2].
Naming rationale:
- Initially considered "sk_is_msk", but as Günther pointed out, "msk"
is already used as an abbreviation in net/mctp, which could cause
confusion
- "sk_is_mptcp()" is already taken and used to check whether a socket
is an MPTCP subflow (tcp_sk(sk)->is_mptcp)
- Following the convention of rsk_is_mptcp(), settled on msk_is_mptcp()
to clearly distinguish MPTCP parent socket checks from subflow checks
[1] mptcp: add sk_is_msk() helper and use it in sockmap
https://patchwork.kernel.org/project/mptcp/patch/29ec7b3fc7febc1c8946add34f859c8253d9714f.1789294365.git.tanggeliang@kylinos.cn/
[2] landlock: Add MPTCP bind and connect access rights
https://patchwork.kernel.org/project/mptcp/patch/20260830201650.67050-4-gnoack3000@gmail.com/
Geliang Tang (2):
mptcp: add msk_is_mptcp() helper
Squash to "bpf: Add mptcp_subflow bpf_iter"
include/net/mptcp.h | 12 ++++++++++++
net/mptcp/bpf.c | 9 +--------
2 files changed, 13 insertions(+), 8 deletions(-)
--
2.55.0