On Fri, Dec 03, 2010 at 01:12:57PM +0100, Claudio Jeker wrote: > Window size scaling is disabled when an application is issuing a > setsockopt() changing SO_SNDBUF or SO_RCVBUF.
tcp_update_sndspace() still rounds up to tp->t_maxseg even if SO_SNDBUF has been set. I was always wondering why the code in tcp_update_sndspace() is different from tcp_update_rcvspace(). tcp_update_sndspace() ... /* round to MSS boundary */ nmax = roundup(nmax, tp->t_maxseg); if (nmax != so->so_snd.sb_hiwat) sbreserve(&so->so_snd, nmax); } tcp_update_rcvspace() ... if (nmax == so->so_rcv.sb_hiwat) return; /* round to MSS boundary */ nmax = roundup(nmax, tp->t_maxseg); sbreserve(&so->so_rcv, nmax); } bluhm