From owner-freebsd-stable@FreeBSD.ORG Tue May 12 22:11:58 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFA841065672; Tue, 12 May 2009 22:11:58 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7108B8FC17; Tue, 12 May 2009 22:11:58 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id A46C95C024; Wed, 13 May 2009 06:11:57 +0800 (CST) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 60C4755D1670; Wed, 13 May 2009 06:11:57 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id wqP3GzI3vmeA; Wed, 13 May 2009 06:10:54 +0800 (CST) Received: from charlie.delphij.net (adsl-76-237-33-62.dsl.pltn13.sbcglobal.net [76.237.33.62]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 7AF2F55D166D; Wed, 13 May 2009 06:10:42 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=buRV31pvxTt4K7Qbqja1vVmELSVD2EOKOomJyD7ipDYzNGtowmcHPDmkAhEeHe5HJ 18Dk1z45/eh1AgMcLp5tg== Message-ID: <4A09F3D0.1050308@delphij.net> Date: Tue, 12 May 2009 15:10:24 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.21 (X11/20090408) MIME-Version: 1.0 To: David Samms References: <4A09DEF1.2010202@delphij.net> <4A09EA95.7050800@nw-ds.com> In-Reply-To: <4A09EA95.7050800@nw-ds.com> X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "re@FreeBSD.org" , freebsd-stable@freebsd.org, yongari@FreeBSD.org Subject: Re: TCP differences in 7.2 vs 7.1 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2009 22:11:59 -0000 -----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 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 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-----