mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-17 10:26:09 +00:00
mptcp: use mptcp_win_from_space helper
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> Reviewed-by: Mat Martineau <martineau@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
9b6a30febd
commit
5f0d0649c8
@ -2046,7 +2046,7 @@ static void mptcp_rcv_space_adjust(struct mptcp_sock *msk, int copied)
|
|||||||
if (rcvbuf > sk->sk_rcvbuf) {
|
if (rcvbuf > sk->sk_rcvbuf) {
|
||||||
u32 window_clamp;
|
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);
|
WRITE_ONCE(sk->sk_rcvbuf, rcvbuf);
|
||||||
|
|
||||||
/* Make subflows follow along. If we do not do this, we
|
/* Make subflows follow along. If we do not do this, we
|
||||||
|
Loading…
x
Reference in New Issue
Block a user