Skip to contentSkip to conversation

mptcp: prevent excessive coalescing on receive

PATCH New Matthieu Baerts (NGI0) 1 participant 1 message Feb 9, 2025

Subsystems (2)
lore
Share & tools
lore

Matthieu Baerts (NGI0)

author maintainer
#0 lore raw

PATCH 1/1 mptcp: prevent excessive coalescing on receive

From: Paolo Abeni <[email protected]>

commit 56b824eb49d6258aa0bad09a406ceac3f643cdae upstream.

Currently the skb size after coalescing is only limited by the skb layout (the skb must not carry frag_list). A single coalesced skb covering several MSS can potentially fill completely the receive buffer. In such a case, the snd win will zero until the receive buffer will be empty again, affecting tput badly.

Fixes 8268ed4c9d19 ("mptcp: introduce and use mptcp_try_coalesce()")
Cc [email protected] # please delay 2 weeks after 6.13-final release

---
Notes:
- We asked to delay the patch. There were no conflicts.

---
 net/mptcp/protocol.c | 1 +
 1 file changed, 1 insertion(+)
net/mptcp/protocol.c +1 -0
index fac774825aff..42b239d9b2b3 100644
@@ -136,6 +136,7 @@ static bool mptcp_try_coalesce(struct sock *sk, struct sk_buff *to,
 	int delta;
 
 	if (MPTCP_SKB_CB(from)->offset ||
+	    ((to->len + from->len) > (sk->sk_rcvbuf >> 3)) ||
 	    !skb_try_coalesce(to, from, &fragstolen, &delta))
 		return false;
 
Signature · 1 line
2.47.1