1
From: Paolo Abeni <pabeni@redhat.com>
1
From: Paolo Abeni <pabeni@redhat.com>
2
2
3
commit 56b824eb49d6258aa0bad09a406ceac3f643cdae upstream.
3
commit 56b824eb49d6258aa0bad09a406ceac3f643cdae upstream.
4
4
5
Currently the skb size after coalescing is only limited by the skb
5
Currently the skb size after coalescing is only limited by the skb
6
layout (the skb must not carry frag_list). A single coalesced skb
6
layout (the skb must not carry frag_list). A single coalesced skb
7
covering several MSS can potentially fill completely the receive
7
covering several MSS can potentially fill completely the receive
8
buffer. In such a case, the snd win will zero until the receive buffer
8
buffer. In such a case, the snd win will zero until the receive buffer
9
will be empty again, affecting tput badly.
9
will be empty again, affecting tput badly.
10
10
11
Fixes: 8268ed4c9d19 ("mptcp: introduce and use mptcp_try_coalesce()")
11
Fixes: 8268ed4c9d19 ("mptcp: introduce and use mptcp_try_coalesce()")
12
Cc: stable@vger.kernel.org # please delay 2 weeks after 6.13-final release
12
Cc: stable@vger.kernel.org # please delay 2 weeks after 6.13-final release
13
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
13
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
14
Reviewed-by: Mat Martineau <martineau@kernel.org>
14
Reviewed-by: Mat Martineau <martineau@kernel.org>
15
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
15
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
16
Link: https://patch.msgid.link/20241230-net-mptcp-rbuf-fixes-v1-3-8608af434ceb@kernel.org
16
Link: https://patch.msgid.link/20241230-net-mptcp-rbuf-fixes-v1-3-8608af434ceb@kernel.org
17
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
17
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
18
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
18
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
19
---
19
---
20
Notes:
20
Notes:
21
- We asked to delay the patch. There were no conflicts.
21
- We asked to delay the patch. There were no conflicts.
22
---
22
---
23
net/mptcp/protocol.c | 1 +
23
net/mptcp/protocol.c | 1 +
24
1 file changed, 1 insertion(+)
24
1 file changed, 1 insertion(+)
25
25
26
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
26
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
27
index XXXXXXX..XXXXXXX 100644
27
index XXXXXXX..XXXXXXX 100644
28
--- a/net/mptcp/protocol.c
28
--- a/net/mptcp/protocol.c
29
+++ b/net/mptcp/protocol.c
29
+++ b/net/mptcp/protocol.c
30
@@ -XXX,XX +XXX,XX @@ static bool mptcp_try_coalesce(struct sock *sk, struct sk_buff *to,
30
@@ -XXX,XX +XXX,XX @@ static bool mptcp_try_coalesce(struct sock *sk, struct sk_buff *to,
31
    int delta;
31
    int delta;
32
32
33
    if (MPTCP_SKB_CB(from)->offset ||
33
    if (MPTCP_SKB_CB(from)->offset ||
34
+     ((to->len + from->len) > (sk->sk_rcvbuf >> 3)) ||
34
+     ((to->len + from->len) > (sk->sk_rcvbuf >> 3)) ||
35
     !skb_try_coalesce(to, from, &fragstolen, &delta))
35
     !skb_try_coalesce(to, from, &fragstolen, &delta))
36
        return false;
36
        return false;
37
37
38
--
38
--
39
2.47.1
39
2.47.1
diff view generated by jsdifflib