* [PATCH net] tcp: Do not underestimate rwnd_limited
@ 2018-12-05 22:24 Eric Dumazet
2018-12-05 22:28 ` Soheil Hassas Yeganeh
2018-12-06 0:33 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Eric Dumazet @ 2018-12-05 22:24 UTC (permalink / raw)
To: David S . Miller
Cc: netdev, Eric Dumazet, Neal Cardwell, Soheil Hassas Yeganeh,
Yuchung Cheng, Eric Dumazet
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] tcp: Do not underestimate rwnd_limited
2018-12-05 22:24 [PATCH net] tcp: Do not underestimate rwnd_limited Eric Dumazet
@ 2018-12-05 22:28 ` Soheil Hassas Yeganeh
2018-12-05 22:33 ` Yuchung Cheng
2018-12-06 0:33 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Soheil Hassas Yeganeh @ 2018-12-05 22:28 UTC (permalink / raw)
To: Eric Dumazet
Cc: David Miller, netdev, Neal Cardwell, Yuchung Cheng, Eric Dumazet
On Wed, Dec 5, 2018 at 5:24 PM Eric Dumazet <edumazet@google.com> 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 <soheil@google.com>
Excellent catch! Thank you for the fix, Eric!
> ---
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] tcp: Do not underestimate rwnd_limited
2018-12-05 22:28 ` Soheil Hassas Yeganeh
@ 2018-12-05 22:33 ` Yuchung Cheng
0 siblings, 0 replies; 4+ messages in thread
From: Yuchung Cheng @ 2018-12-05 22:33 UTC (permalink / raw)
To: Soheil Hassas Yeganeh
Cc: Eric Dumazet, David Miller, netdev, Neal Cardwell, Eric Dumazet
On Wed, Dec 5, 2018 at 2:28 PM Soheil Hassas Yeganeh <soheil@google.com> wrote:
>
> On Wed, Dec 5, 2018 at 5:24 PM Eric Dumazet <edumazet@google.com> 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 <soheil@google.com>
Reviewed-by: Yuchung Cheng <ycheng@google.com>
>
> Excellent catch! Thank you for the fix, Eric!
>
> > ---
> > 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
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] tcp: Do not underestimate rwnd_limited
2018-12-05 22:24 [PATCH net] tcp: Do not underestimate rwnd_limited Eric Dumazet
2018-12-05 22:28 ` Soheil Hassas Yeganeh
@ 2018-12-06 0:33 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2018-12-06 0:33 UTC (permalink / raw)
To: edumazet; +Cc: netdev, ncardwell, soheil, ycheng, eric.dumazet
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-12-06 0:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-05 22:24 [PATCH net] tcp: Do not underestimate rwnd_limited Eric Dumazet
2018-12-05 22:28 ` Soheil Hassas Yeganeh
2018-12-05 22:33 ` Yuchung Cheng
2018-12-06 0:33 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).