[PATCH net] tcp: Do not underestimate rwnd_limited

Subsystems: networking [general], networking [tcp], the rest

STALE2827d

4 messages, 4 authors, 2018-12-06 · open the first message on its own page

[PATCH net] tcp: Do not underestimate rwnd_limited

From: Eric Dumazet <edumazet@google.com>
Date: 2018-12-05 22:24:36

If available rwnd is too small, tcp_tso_should_defer()
can decide it is worth waiting before splitting a TSO packet.

This really means we are rwnd limited.

Fixes: 5615f88614a4 ("tcp: instrument how long TCP is limited by receive window")
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/ipv4/tcp_output.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 68b5326f73212ffe7111dd0f91e0a1246fb0ae25..3186902347584090256467d8679320666aa0257e 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2356,8 +2356,11 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
 		} else {
 			if (!push_one &&
 			    tcp_tso_should_defer(sk, skb, &is_cwnd_limited,
-						 max_segs))
+						 max_segs)) {
+				if (!is_cwnd_limited)
+					is_rwnd_limited = true;
 				break;
+			}
 		}
 
 		limit = mss_now;
-- 
2.20.0.rc2.403.gdbc3b29805-goog

Re: [PATCH net] tcp: Do not underestimate rwnd_limited

From: Soheil Hassas Yeganeh <hidden>
Date: 2018-12-05 22:28:45

On Wed, Dec 5, 2018 at 5:24 PM Eric Dumazet [off-list ref] wrote:
If available rwnd is too small, tcp_tso_should_defer()
can decide it is worth waiting before splitting a TSO packet.

This really means we are rwnd limited.

Fixes: 5615f88614a4 ("tcp: instrument how long TCP is limited by receive window")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <redacted>

Excellent catch! Thank you for the fix, Eric!
quoted hunk
---
 net/ipv4/tcp_output.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 68b5326f73212ffe7111dd0f91e0a1246fb0ae25..3186902347584090256467d8679320666aa0257e 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2356,8 +2356,11 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
                } else {
                        if (!push_one &&
                            tcp_tso_should_defer(sk, skb, &is_cwnd_limited,
-                                                max_segs))
+                                                max_segs)) {
+                               if (!is_cwnd_limited)
+                                       is_rwnd_limited = true;
                                break;
+                       }
                }

                limit = mss_now;
--
2.20.0.rc2.403.gdbc3b29805-goog

Re: [PATCH net] tcp: Do not underestimate rwnd_limited

From: Yuchung Cheng <hidden>
Date: 2018-12-05 22:34:00

On Wed, Dec 5, 2018 at 2:28 PM Soheil Hassas Yeganeh [off-list ref] wrote:
On Wed, Dec 5, 2018 at 5:24 PM Eric Dumazet [off-list ref] wrote:
quoted
If available rwnd is too small, tcp_tso_should_defer()
can decide it is worth waiting before splitting a TSO packet.

This really means we are rwnd limited.

Fixes: 5615f88614a4 ("tcp: instrument how long TCP is limited by receive window")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <redacted>
Reviewed-by: Yuchung Cheng <redacted>
Excellent catch! Thank you for the fix, Eric!
quoted
---
 net/ipv4/tcp_output.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 68b5326f73212ffe7111dd0f91e0a1246fb0ae25..3186902347584090256467d8679320666aa0257e 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2356,8 +2356,11 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
                } else {
                        if (!push_one &&
                            tcp_tso_should_defer(sk, skb, &is_cwnd_limited,
-                                                max_segs))
+                                                max_segs)) {
+                               if (!is_cwnd_limited)
+                                       is_rwnd_limited = true;
                                break;
+                       }
                }

                limit = mss_now;
--
2.20.0.rc2.403.gdbc3b29805-goog

Re: [PATCH net] tcp: Do not underestimate rwnd_limited

From: David Miller <davem@davemloft.net>
Date: 2018-12-06 00:33:08

From: Eric Dumazet <edumazet@google.com>
Date: Wed,  5 Dec 2018 14:24:31 -0800
If available rwnd is too small, tcp_tso_should_defer()
can decide it is worth waiting before splitting a TSO packet.

This really means we are rwnd limited.

Fixes: 5615f88614a4 ("tcp: instrument how long TCP is limited by receive window")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied and queued up for -stable, thanks Eric.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help