Date: Wed, 13 Dec 2000 07:58:28 +1100 From: Peter Jeremy <peter.jeremy@alcatel.com.au> To: Mark Powell <M.S.Powell@salford.ac.uk> Cc: freebsd-stable@FreeBSD.ORG Subject: Re: Different gcc optimisations cause IP packet CRC problems Message-ID: <20001213075828.U69646@gsmx07.alcatel.com.au> In-Reply-To: <Pine.BSF.4.21.0012111513500.36265-100000@plato.salford.ac.uk>; from M.S.Powell@salford.ac.uk on Mon, Dec 11, 2000 at 03:24:21PM %2B0000 References: <Pine.BSF.4.21.0012111513500.36265-100000@plato.salford.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2000-Dec-11 15:24:21 +0000, Mark Powell <M.S.Powell@salford.ac.uk> wrote: >-O2 -fomit-frame-pointer -mpentium -march=pentium -pipe > >Cause the kernel to produce TCP CRC errors when talking to certain IP >addresses. As various other people have noted, any optimisation above '-O' is not supported. (Also the checksum is a ones-complement sum, not a CRC). That said, if you can produce test-cases which demonstrate incorrect code generation, the gcc developers would love to hear from you. If you are interested in following this though, you could try compiling in_cksum.c, tcp_output.c and tcp_subr.c (all in /sys/netinet) to assembler (-S) with both sets of options and checking for functional differences in the code generated (-g would make this easier, but can affect the code, so the problem may not appear). >BTW Where in the source is the CRC generated? The are several versions of it. There is a general routine in_cksum() in /sys/netinet/in_cksum.c. There are also a number of special-case inlines in <machine/in_cksum.h> or /sys/i386/include/in_cksum.h. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001213075828.U69646>