tcp: add tcp_sock_set_maxseg
authorGeliang Tang <tanggeliang@kylinos.cn>
Fri, 18 Jul 2025 22:06:57 +0000 (00:06 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 22 Jul 2025 00:48:32 +0000 (17:48 -0700)
commit51a62199a8aaac0d1645b1dd8e670a6f35aead81
tree80483748234733211561e11dbf47e384c2b28dee
parentedd669057c56966b598a464d6e8c9fc0122a1b1c
tcp: add tcp_sock_set_maxseg

Add a helper tcp_sock_set_maxseg() to directly set the TCP_MAXSEG
sockopt from kernel space.

This new helper will be used in the following patch from MPTCP.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250719-net-next-mptcp-tcp_maxseg-v2-2-8c910fbc5307@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/tcp.h
net/ipv4/tcp.c