Commit 6529c26d authored by Geliang Tang's avatar Geliang Tang Committed by Gang Yan
Browse files

mptcp: use mptcp_win_from_space helper

mainline inclusion
from mainline-v6.11-rc1
commit 5f0d0649c83f72399c19b18591ea1413ca94c015
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I9VYQ9
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=5f0d0649c83f72399c19b18591ea1413ca94c015



--------------------------------

The MPTCP dedicated win_from_space helper mptcp_win_from_space() is defined
in protocol.h, use it in mptcp_rcv_space_adjust() instead of using the TCP
one. Here scaling_ratio is the same as msk->scaling_ratio.

Signed-off-by: default avatarGeliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: default avatarMat Martineau <martineau@kernel.org>
Signed-off-by: default avatarMatthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 60aaae04
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2061,7 +2061,7 @@ static void mptcp_rcv_space_adjust(struct mptcp_sock *msk, int copied)
		if (rcvbuf > sk->sk_rcvbuf) {
			u32 window_clamp;

			window_clamp = __tcp_win_from_space(scaling_ratio, rcvbuf);
			window_clamp = mptcp_win_from_space(sk, rcvbuf);
			WRITE_ONCE(sk->sk_rcvbuf, rcvbuf);

			/* Make subflows follow along.  If we do not do this, we