All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] tcp: increase size at which tcp_bound_to_half_wnd bounds to > TCP_MSS_DEFAULT
@ 2016-06-28  4:33 Seymour, Shane M
  2016-06-28 11:58 ` Eric Dumazet
  0 siblings, 1 reply; 6+ messages in thread
From: Seymour, Shane M @ 2016-06-28  4:33 UTC (permalink / raw)
  To: netdev

In previous commit 01f83d69844d307be2aa6fea88b0e8fe5cbdb2f4
the following comments were added:

"When peer uses tiny windows, there is no use in packetizing to sub-MSS
pieces for the sake of SWS or making sure there are enough packets in
the pipe for fast recovery."

The test should be > TCP_MSS_DEFAULT not >= 512. This allows low end
devices that send an MSS of 536 (TCP_MSS_DEFAULT) to see better network
performance by sending it 536 bytes of data at a time instead of bounding
to half window size (268). Other network stacks work this way, e.g. HP-UX.

Signed-off-by: Shane Seymour <shane.seymour@hpe.com>
---
--- b/include/net/tcp.h	2016-06-23 20:59:14.521686048 -0500
+++ a/include/net/tcp.h	2016-06-15 17:19:21.964821477 -0500
@@ -589,7 +589,7 @@ static inline int tcp_bound_to_half_wnd(
 	 * On the other hand, for extremely large MSS devices, handling
 	 * smaller than MSS windows in this way does make sense.
 	 */
-	if (tp->max_window > TCP_MSS_DEFAULT)
+	if (tp->max_window >= 512)
 		cutoff = (tp->max_window >> 1);
 	else
 		cutoff = tp->max_window;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] tcp: increase size at which tcp_bound_to_half_wnd bounds to > TCP_MSS_DEFAULT
  2016-06-28  4:33 [PATCH net-next] tcp: increase size at which tcp_bound_to_half_wnd bounds to > TCP_MSS_DEFAULT Seymour, Shane M
@ 2016-06-28 11:58 ` Eric Dumazet
  2016-06-28 21:54   ` Seymour, Shane M
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2016-06-28 11:58 UTC (permalink / raw)
  To: Seymour, Shane M; +Cc: netdev

On Tue, 2016-06-28 at 04:33 +0000, Seymour, Shane M wrote:
> In previous commit 01f83d69844d307be2aa6fea88b0e8fe5cbdb2f4
> the following comments were added:
> 
> "When peer uses tiny windows, there is no use in packetizing to sub-MSS
> pieces for the sake of SWS or making sure there are enough packets in
> the pipe for fast recovery."
> 
> The test should be > TCP_MSS_DEFAULT not >= 512. This allows low end
> devices that send an MSS of 536 (TCP_MSS_DEFAULT) to see better network
> performance by sending it 536 bytes of data at a time instead of bounding
> to half window size (268). Other network stacks work this way, e.g. HP-UX.


Trying to cope with ridiculous windows these days is really a waste of
time, as we perform this check for all tcp sendmsg() calls :(

Anyway, your patch is reversed.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH net-next] tcp: increase size at which tcp_bound_to_half_wnd bounds to > TCP_MSS_DEFAULT
  2016-06-28 11:58 ` Eric Dumazet
@ 2016-06-28 21:54   ` Seymour, Shane M
  2016-06-28 22:35     ` Eric Dumazet
  2016-06-28 22:35     ` Neal Cardwell
  0 siblings, 2 replies; 6+ messages in thread
From: Seymour, Shane M @ 2016-06-28 21:54 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev

> From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
> Trying to cope with ridiculous windows these days is really a waste of
> time, as we perform this check for all tcp sendmsg() calls :(

I don't disagree with you but unfortunately there are still devices
out there like this and probably will be for a long time.

> Anyway, your patch is reversed.

I'm not sure what you mean by reversed, I didn't change the direction
of the test in the code just what it's being compared against and so
it's greater than not greater than or equal to.

Unless auto-correction changed reviewed to reversed?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] tcp: increase size at which tcp_bound_to_half_wnd bounds to > TCP_MSS_DEFAULT
  2016-06-28 21:54   ` Seymour, Shane M
@ 2016-06-28 22:35     ` Eric Dumazet
  2016-06-28 22:51       ` Seymour, Shane M
  2016-06-28 22:35     ` Neal Cardwell
  1 sibling, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2016-06-28 22:35 UTC (permalink / raw)
  To: Seymour, Shane M; +Cc: netdev

On Tue, 2016-06-28 at 21:54 +0000, Seymour, Shane M wrote:
> > From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
> > Trying to cope with ridiculous windows these days is really a waste of
> > time, as we perform this check for all tcp sendmsg() calls :(
> 
> I don't disagree with you but unfortunately there are still devices
> out there like this and probably will be for a long time.
> 
> > Anyway, your patch is reversed.
> 
> I'm not sure what you mean by reversed, I didn't change the direction
> of the test in the code just what it's being compared against and so
> it's greater than not greater than or equal to.
> 
> Unless auto-correction changed reviewed to reversed?

Your diff is reversed. You sent :

--- b/include/net/tcp.h 2016-06-23 20:59:14.521686048 -0500
+++ a/include/net/tcp.h 2016-06-15 17:19:21.964821477 -0500
@@ -589,7 +589,7 @@ static inline int tcp_bound_to_half_wnd(
         * On the other hand, for extremely large MSS devices, handling
         * smaller than MSS windows in this way does make sense.
         */
-       if (tp->max_window > TCP_MSS_DEFAULT)
+       if (tp->max_window >= 512)
                cutoff = (tp->max_window >> 1);
        else
                cutoff = tp->max_window;



You meant instead :

diff --git a/include/net/tcp.h b/include/net/tcp.h
index 0bcc70f4e1fb..8dafd2c31b1d 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -589,7 +589,7 @@ static inline int tcp_bound_to_half_wnd(struct tcp_sock *tp, int pktsize)
 	 * On the other hand, for extremely large MSS devices, handling
 	 * smaller than MSS windows in this way does make sense.
 	 */
-	if (tp->max_window >= 512)
+	if (tp->max_window > TCP_MSS_DEFAULT)
 		cutoff = (tp->max_window >> 1);
 	else
 		cutoff = tp->max_window;

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] tcp: increase size at which tcp_bound_to_half_wnd bounds to > TCP_MSS_DEFAULT
  2016-06-28 21:54   ` Seymour, Shane M
  2016-06-28 22:35     ` Eric Dumazet
@ 2016-06-28 22:35     ` Neal Cardwell
  1 sibling, 0 replies; 6+ messages in thread
From: Neal Cardwell @ 2016-06-28 22:35 UTC (permalink / raw)
  To: Seymour, Shane M; +Cc: Eric Dumazet, netdev

On Tue, Jun 28, 2016 at 5:54 PM, Seymour, Shane M <shane.seymour@hpe.com> wrote:
>> From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
...
>> Anyway, your patch is reversed.
>
> I'm not sure what you mean by reversed, I didn't change the direction
> of the test in the code just what it's being compared against and so
> it's greater than not greater than or equal to.

By reversed, I believe Eric means the following:

Your patch claims that the current line you want to replace says:

-       if (tp->max_window > TCP_MSS_DEFAULT)

And that you want to replace it with this line:

+       if (tp->max_window >= 512)

However, the currrent line is the latter:

   if (tp->max_window >= 512)

And presumably you want to replace it with the former.

It might be best to generate the patch with git.

neal

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH net-next] tcp: increase size at which tcp_bound_to_half_wnd bounds to > TCP_MSS_DEFAULT
  2016-06-28 22:35     ` Eric Dumazet
@ 2016-06-28 22:51       ` Seymour, Shane M
  0 siblings, 0 replies; 6+ messages in thread
From: Seymour, Shane M @ 2016-06-28 22:51 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev

> From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
> Your diff is reversed. 

Sorry my apologies, I'll send a V2. 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-06-28 22:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-28  4:33 [PATCH net-next] tcp: increase size at which tcp_bound_to_half_wnd bounds to > TCP_MSS_DEFAULT Seymour, Shane M
2016-06-28 11:58 ` Eric Dumazet
2016-06-28 21:54   ` Seymour, Shane M
2016-06-28 22:35     ` Eric Dumazet
2016-06-28 22:51       ` Seymour, Shane M
2016-06-28 22:35     ` Neal Cardwell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.