| To: | Stephen Hemminger <shemminger@xxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] fix tcp_default_win_scale. |
| From: | John Heffner <jheffner@xxxxxxx> |
| Date: | Wed, 7 Jul 2004 15:47:30 -0400 (EDT) |
| Cc: | "David S. Miller" <davem@xxxxxxxxxx>, bert hubert <ahu@xxxxxxx>, Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxxxxx>, <netdev@xxxxxxxxxxx>, <alessandro.suardi@xxxxxxxxxx>, <phyprabab@xxxxxxxxx>, <netdev@xxxxxxxxxxx>, <linux-net@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx> |
| In-reply-to: | <20040706114741.1bf98bbe@dell_ss3.pdx.osdl.net> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
On Tue, 6 Jul 2004, Stephen Hemminger wrote:
> +/* Default window scaling based on the size of the maximum window */
> +static inline __u8 tcp_default_win_scale(void)
> +{
> + int b = ffs(sysctl_tcp_rmem[2]);
> + return (b < 17) ? 0 : b-16;
> +}
I would actually change this to be:
static inline __u8 tcp_select_win_scale(void)
{
int b = ffs(tcp_win_from_space(max(sysctl_tcp_rmem[2],
sysctl_rmem_max)));
b = (b < 17) ? 0 : b-16;
return max(b, 14);
}
Then you can also get rid of all the window scale calculation code in
tcp_select_initial_window().
-John
|
| Previous by Date: | Re: [PATCH] fix tcp_default_win_scale., Jamie Lokier |
|---|---|
| Next by Date: | Re: [PATCH] fix tcp_default_win_scale., bert hubert |
| Previous by Thread: | Re: [PATCH] fix tcp_default_win_scale., Redeeman |
| Next by Thread: | Re: analysis of TCP window size issues still around - several reports / SACK involved?, David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |