Date: Thu, 7 Mar 2002 20:32:25 +0100 From: "Simon 'corecode' Schubert" <corecode@corecode.ath.cx> To: Terry Lambert <tlambert2@mindspring.com> Cc: freebsd-hackers@FreeBSD.ORG Subject: Optimisation errors (Was: Swapping performance) Message-ID: <20020307203225.54d79d1d.corecode@corecode.ath.cx> In-Reply-To: <3C87B632.43156193@mindspring.com> References: <20020307090707.GC26621@elvis.mu.org> <Pine.BSF.4.21.0203070359110.41354-100000@InterJet.elischer.org> <20020307142759.0d95d467.mitko@rila.bg> <20020307080906.367be8df.gclarkii@vsservices.com> <20020307164724.D377@straylight.oblivion.bg> <20020307153615.GB1942@student.uu.se> <20020307164500.5dd21d16.corecode@corecode.ath.cx> <3C87B632.43156193@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--=.RKEMOP_lw+EYp7 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 07 Mar 2002 10:49:22 -0800 Terry Lambert <tlambert2@mindspring.com> wrote: > Simon 'corecode' Schubert wrote: > > to everybody who doesn't believe that: it really generates bad code. > > i've been having severe problems with my tcp and udp stack lately (on a > > i586/mmx machine). guess what, -O2 resulted in code which >>sometimes<< > > generated bad tcp and/or udp checksums (depending on ip). i didn't > > investigate any further, but believe me: not being able to access some > > dns servers is a pain in the ass. > > Are you using NAT? yep. > The libalias incremental checksum calculation is incorrect; > it assumes that a two's complement network order underflow > will result in the same value as a one's complement host > order underflow. This results in off-by-one errors. so is this an optimisation issue or not? when compiling with -O it works again. furthermore i don't know if my bind uses the internal address or the external one for queries. > This is actually a *different* problem than the RFC 1624 > correction of RFC 1141 (also an off-by-one error). > > Have you used a recent version of ethereal? It's an incredible > bugger to get installed correctly for 4.5 or above, since you > have to come from packages (the dependencies for the ports are > incorrect), but it will tell you the correct checksum vs. the > one that it got. > > There's also printing it out in tcp_input when you get a bad > checksum. If you see a lot of "0xfffe", then you'll know it's > an off-by-one error. yah, got lots of them, seen in tcpdump -vvvxXlei gif0 ;] > If the problem is only on ACK packets... I can tell you that > the tcp_respond() code path is not really throughly exercised. tho i've seen these problems recently on UDP DNS lookups, too. then i switched back to -O cheerz corecode -- /"\ http://corecode.ath.cx/ \ / \ ASCII Ribbon Campaign / \ Against HTML Mail and News --=.RKEMOP_lw+EYp7 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) iD8DBQE8h8BMr5S+dk6z85oRAi7RAJ4qod0k5H4LDGuPaFp5keJ9mLmH6wCfcp5X v20R+i1Gb1Ujbcx+dWuns1U= =HVVj -----END PGP SIGNATURE----- --=.RKEMOP_lw+EYp7-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020307203225.54d79d1d.corecode>