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 - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html