mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
mptcp: add receive queue awareness in tcp_rcv_space_adjust()
This is the MPTCP counter-part of commit ea33537d82 ("tcp: add receive
queue awareness in tcp_rcv_space_adjust()").
Prior to this commit:
ESTAB 33165568 0 192.168.255.2:5201 192.168.255.1:53380 \
skmem:(r33076416,rb33554432,t0,tb91136,f448,w0,o0,bl0,d0)
After:
ESTAB 3279168 0 192.168.255.2:5201 192.168.255.1]:53042 \
skmem:(r3190912,rb3719956,t0,tb91136,f1536,w0,o0,bl0,d0)
Same throughput.
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260407-net-next-mptcp-reduce-rbuf-v2-2-0d1d135bf6f6@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
d2000361e4
commit
7272d8131a
|
|
@ -2159,11 +2159,13 @@ static void mptcp_rcv_space_adjust(struct mptcp_sock *msk, int copied)
|
|||
if (rtt_us == U32_MAX || time < (rtt_us >> 3))
|
||||
return;
|
||||
|
||||
if (msk->rcvq_space.copied <= msk->rcvq_space.space)
|
||||
copied = msk->rcvq_space.copied;
|
||||
copied -= mptcp_inq_hint(sk);
|
||||
if (copied <= msk->rcvq_space.space)
|
||||
goto new_measure;
|
||||
|
||||
trace_mptcp_rcvbuf_grow(sk, time);
|
||||
if (mptcp_rcvbuf_grow(sk, msk->rcvq_space.copied)) {
|
||||
if (mptcp_rcvbuf_grow(sk, copied)) {
|
||||
/* Make subflows follow along. If we do not do this, we
|
||||
* get drops at subflow level if skbs can't be moved to
|
||||
* the mptcp rx queue fast enough (announced rcv_win can
|
||||
|
|
@ -2177,7 +2179,7 @@ static void mptcp_rcv_space_adjust(struct mptcp_sock *msk, int copied)
|
|||
slow = lock_sock_fast(ssk);
|
||||
/* subflows can be added before tcp_init_transfer() */
|
||||
if (tcp_sk(ssk)->rcvq_space.space)
|
||||
tcp_rcvbuf_grow(ssk, msk->rcvq_space.copied);
|
||||
tcp_rcvbuf_grow(ssk, copied);
|
||||
unlock_sock_fast(ssk, slow);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user