]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tcp: add recv_should_stop helper
authorGeliang Tang <tanggeliang@kylinos.cn>
Fri, 3 Apr 2026 11:29:29 +0000 (13:29 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 7 Apr 2026 02:14:27 +0000 (19:14 -0700)
commiteb477fdd68036a54a6678020d4e6ab177dea111c
treefb905b3dca9d273301f3af2eff05ac53b28faf92
parent7fb2f5f964998819dcc8f5d38dcd8999a568c3ef
tcp: add recv_should_stop helper

Factor out a new helper tcp_recv_should_stop() from tcp_recvmsg_locked()
and tcp_splice_read() to check whether to stop receiving. And use this
helper in mptcp_recvmsg() and mptcp_splice_read() to reduce redundant code.

Suggested-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Mat Martineau <martineau@kernel.org>
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/20260403-net-next-mptcp-msg_eor-misc-v1-3-b0b33bea3fed@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/tcp.h
net/ipv4/tcp.c
net/mptcp/protocol.c