Subject: Re: setsockopt()

From: Rick Jones <[email-masked]>
Date: Mon, 07 Jul 2008 16:27:14 -0700

David Miller wrote:
> We need 2x, in order to have a full window during recovery.
> 
> There was a measurement bug found a few months ago when the
> google folks were probing in this area, which was fixed
> by John Heffner.  Most of which had to deal with TSO subtleties.
> 
> --------------------
> commit 246eb2af060fc32650f07203c02bdc0456ad76c7
> Author: John Heffner <[email-masked]>
> Date:   Tue Apr 29 03:13:52 2008 -0700
> 
>     tcp: Limit cwnd growth when deferring for GSO
>     
>     This fixes inappropriately large cwnd growth on sender-limited flows
>     when GSO is enabled, limiting cwnd growth to 64k.
>     
>     Signed-off-by: John Heffner <[email-masked]>
>     Signed-off-by: David S. Miller <[email-masked]>
> 
> commit ce447eb91409225f8a488f6b7b2a1bdf7b2d884f
> Author: John Heffner <[email-masked]>
> Date:   Tue Apr 29 03:13:02 2008 -0700
> 
>     tcp: Allow send-limited cwnd to grow up to max_burst when gso disabled
>     
>     This changes the logic in tcp_is_cwnd_limited() so that cwnd may grow
>     up to tcp_max_burst() even when sk_can_gso() is false, or when
>     sysctl_tcp_tso_win_divisor != 0.
>     
>     Signed-off-by: John Heffner <[email-masked]>
>     Signed-off-by: David S. Miller <[email-masked]>
> --------------------

I'll try my tests again with newer kernels since I'm not 100% certain I 
was trying with those commits in place.

> Setting TCP socket buffer via setsockopt() is always wrong.

Does that apply equally to SO_SNDBUF and SO_RCVBUF?

rick jones