diff mbox series

[mptcp-next,1/2] mptcp: use mptcp_win_from_space helper

Message ID fc78b2ba54c834d31eea7d099f9e5db9418d53e8.1715416511.git.tanggeliang@kylinos.cn (mailing list archive)
State Accepted, archived
Commit 1b4da355e261f2323e47b6b936a34a4165b45832
Delegated to: Matthieu Baerts
Headers show
Series convert helpers for win and space | expand

Checks

Context Check Description
matttbe/build success Build and static analysis OK
matttbe/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
matttbe/shellcheck success MPTCP selftests files have not been modified
matttbe/KVM_Validation__normal success Success! ✅
matttbe/KVM_Validation__debug success Success! ✅
matttbe/KVM_Validation__btf__only_bpftest_all_ success Success! ✅

Commit Message

Geliang Tang May 11, 2024, 8:37 a.m. UTC
From: Geliang Tang <tanggeliang@kylinos.cn>

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: Geliang Tang <tanggeliang@kylinos.cn>
---
 net/mptcp/protocol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 579031c60937..04dda32ccbef 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -2046,7 +2046,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