TCP differences in 7.2 vs 7.1
Xin LI
delphij at delphij.net
Tue May 12 22:11:59 UTC 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi, David,
David Samms wrote:
> Xin LI wrote:
>> Hi David,
>>
>> David Samms wrote:
>>> After upgrading to 7.2 (amd64) some customers complained of very poor
>>> bandwidth. Upon investigation all the effected customers were ATT DSL
>>> clients located all over the USA, not in a single city, nor were other
>>> ISPs effected. The server is a Supermicro with dual (quad core)
>>> processors with a single Intel fxp network card on a 100mbit connection.
>>
>> Could you please try if this would help:
>>
>> sysctl net.inet.tcp.tso=0
>>
>> Cheers,
>> - --
>> Xin LI <delphij at delphij.net> http://www.delphij.net/
>> FreeBSD - The Power to Serve!
>
> Xin LI,
>
> Thank you for your help.
>
> Setting sysctl net.inet.tcp.tso=0 resolved the issue completely. What
> does sysctl net.inet.tcp.tso=0 do? Where can I read more about the
> option? I captured tcpdumps of a single file transfer to 7.1, 7.2 and
> 7.2 with sysctl net.inet.tcp.tso=0, but they are to large to attach to
> this list. Let me know if you are interested in viewing the dump files.
>
> Thanks again for your assistance!
Thanks for the offer but I think this is a known problem so perhaps the
dump files are no longer necessary. The problem was caused by the
reciever side (usually PPPoE clients, e.g. DSL users) which proposes a
smaller MSS than the interface MTU, the previous implementation sets the
packet length to interface MTU instead of the negotiated one, which
would cause problem.
Setting net.inet.tcp.tso=0 would turn off TCP Segment Offloading
completely. The previous release of FreeBSD does not include this feature.
I think yongari@ has committed a fix as revision 191867 (RELENG_7) and
190982 (HEAD):
Index: if_fxp.c
===================================================================
- --- if_fxp.c (revision 190981)
+++ if_fxp.c (revision 190982)
@@ -1485,7 +1485,8 @@
* checksum in the first frame driver should compute it.
*/
ip->ip_sum = 0;
- - ip->ip_len = htons(ifp->if_mtu);
+ ip->ip_len = htons(m->m_pkthdr.tso_segsz + (ip->ip_hl << 2) +
+ (tcp->th_off << 2));
tcp->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr,
htons(IPPROTO_TCP + (tcp->th_off << 2) +
m->m_pkthdr.tso_segsz));
To re@:
Perhaps we should issue an errata for this, at least document it in
errata (I can do this)?
Cheers,
- --
Xin LI <delphij at delphij.net> http://www.delphij.net/
FreeBSD - The Power to Serve!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (FreeBSD)
iEYEARECAAYFAkoJ89AACgkQi+vbBBjt66B85ACeNJjEuVXitnceaC6GRG+9zWtB
OaUAoLqikyZXMEngwkLEtHboaDiQp8QI
=mcFR
-----END PGP SIGNATURE-----
More information about the freebsd-stable
mailing list