From owner-freebsd-stable@FreeBSD.ORG Tue Feb 8 09:23:10 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62F9816A4CE for ; Tue, 8 Feb 2005 09:23:10 +0000 (GMT) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id 799F143D1D for ; Tue, 8 Feb 2005 09:23:09 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) j189Mhhr009428 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 8 Feb 2005 20:22:44 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])j189Mh7l059247; Tue, 8 Feb 2005 20:22:43 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost)j189MdMu059246; Tue, 8 Feb 2005 20:22:39 +1100 (EST) (envelope-from pjeremy) Date: Tue, 8 Feb 2005 20:22:38 +1100 From: Peter Jeremy To: Jon Noack Message-ID: <20050208092238.GC57256@cirb503493.alcatel.com.au> References: <42073FD8.5CCA7EC5@fadesa.es> <20050207102140.GA56842@xor.obsecurity.org> <42074353.9E3EECBE@fadesa.es> <4207C5C7.80707@alumni.rice.edu> <4207DEEA.E7278E38@fadesa.es> <4207F443.8020400@alumni.rice.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4207F443.8020400@alumni.rice.edu> User-Agent: Mutt/1.4.2i cc: freebsd-stable@freebsd.org Subject: Re: 50% of packets lost only on local interfaces X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Feb 2005 09:23:10 -0000 On Mon, 2005-Feb-07 17:05:39 -0600, Jon Noack wrote: >José M. Fandiño wrote: >>Jon Noack wrote: >>>>>> Finally, I found the culprit: >>>>>> >>>>>>CFLAGS="" \ 100% of the transmited traffic is received >>>>>>COPTFLAGS="" / >>>>>> >>>>>>CFLAGS= -pipe \ 50% of the transmited traffic is received >>>>>>COPTFLAGS= -pipe / It would be quite interesting to compare the actual commands that are generated: Capture the buildworld/kernel output and compare the same command in both cases. If the only difference is really just "-pipe", then we need to do some more investigating. >The explanation I've heard (I have no actual knowledge here, I'm just >good at repeating others) is that gcc doesn't compile any ASM with -O0 >(which is what you get with CFLAGS="-pipe"). This Breaks Things(tm): There used to be inconsistencies in the way gcc handle asm() statements so that it could be difficult to write asm() statement constraints that worked correctly with both -O0, -O1 and -O2 but it never ignored asm() statements. (I haven't looked since about 2.95 so I'm not sure if the 3.x series fixed this problem) >http://docs.freebsd.org/cgi/mid.cgi?20020623214947.J84322 The error message quoted in this article refers to the constraint problem above. The problem was not asm() was being ignored (or that incorrect code was generated) but that the compiler incorrectly reported errors (and failed to compile the code). (I recognize that function name - I spent weeks trying to come up with a constraint set that worked with both -O0 and -O1 and eventually gave up). Since you have managed to compile a kernel, I very much doubt you are running into the same problem. >kern/52764 is another example: >http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/52764 Again, this is a "fails to compile" report, not a "generates incorrect code" report. The code in question was written on the assumption that the compiler would do dead code removal and "gcc -O0" doesn't. >More generically it makes sense that gcc treat code differently with -O0 >than with -O. By definition, it has to - otherwise the generated code would be the same. -- Peter Jeremy