From owner-freebsd-current@FreeBSD.ORG Thu May 25 10:40:12 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA59716A420 for ; Thu, 25 May 2006 10:40:12 +0000 (UTC) (envelope-from gbergling@0xfce3.net) Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id B673543D48 for ; Thu, 25 May 2006 10:40:10 +0000 (GMT) (envelope-from gbergling@0xfce3.net) X-Envelope-From: gbergling@0xfce3.net Received: from central.0xfce3.net (dslb-088-072-036-181.pools.arcor-ip.net [88.72.36.181]) (authenticated bits=128) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id k4PAe3ZU012465 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 25 May 2006 12:40:04 +0200 Received: from central.0xfce3.net (localhost [127.0.0.1]) by central.0xfce3.net (8.13.6/8.13.4) with ESMTP id k4PAe3pc005105; Thu, 25 May 2006 12:40:03 +0200 (CEST) (envelope-from gbergling@0xfce3.net) Received: (from gordon@localhost) by central.0xfce3.net (8.13.6/8.13.4/Submit) id k4PAe0oc005101; Thu, 25 May 2006 12:40:00 +0200 (CEST) (envelope-from gbergling@0xfce3.net) X-Authentication-Warning: central.0xfce3.net: gordon set sender to gbergling@0xfce3.net using -f Date: Thu, 25 May 2006 12:40:00 +0200 From: Gordon Bergling To: Max Laier Message-ID: <20060525104000.GA4962@central.0xfce3.net> References: <20060524180802.GA59176@central.0xfce3.net> <200605250517.12054.max@love2party.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200605250517.12054.max@love2party.net> X-Url: X-Operating-System: FreeBSD 6.1-STABLE i386 X-Host-Uptime: 12:28PM up 1:19, 0 users, load averages: 0.08, 0.14, 0.15 User-Agent: Mutt/1.5.11 X-Spam-Score: * (1.189) AWL,BAYES_50,FORGED_RCVD_HELO X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Cc: freebsd-current@freebsd.org Subject: Re: Take 2: new IP Checksum Code from DragonFlyBSD X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2006 10:40:13 -0000 * Thus spake Max Laier (max@love2party.net): > On Wednesday 24 May 2006 20:08, Gordon Bergling wrote: > > a few month ago I ported DragonFlyBSD's IP checksum code to FreeBSD. > > My first try wasn't complete and I had forgotten it by the time. Now I > > hope I have addressed the former mistakes and it maybe included in the > > tree. ;) > > > > The patch can be found at > > http://generic.0xfce3.net/20060524-ipchecksum.patch > > > > This patch modifies the i386, amd64 and pc98 architectures. Matt Dillons > > new implementation is machine indepement, but there are some asm > > files/code with seems for me i386 centric. I don't know assembler, so I > > can't tell much about it. > > I'm a little scared about this. We have had several problems in the > checksumming code that were due to -O2 or -O0 that screwed up just a little > of the assembly and *boom* everything went downhill. I do appreciate you > stepping up porting something useful, but I'd be more comfortable if you > actually knew what you are doing. > > That said, can somebody with real assembly knowledge and maybe even for > sparc64 or the like step up and take a look at this? I think we should not > import something unless we fully understand it! > > I am confident that Matt knew what he was doing, but I am not sure that the > efforts on Dragonfly are compatible with !i386/amd64 ... FreeBSD, however > still cares about big endian architectures and others, don't we? Even if DragonFly implementation isn't compatible with archs ! i386 and derivates isn't it still an improvement on what we have now? My intention of porting it was the following comment in sys/i386/i386/in_cksum.c | * This routine is very heavily used in the network | * code and should be modified for each CPU to be as fast as | * possible. So having a better situated implementation is still an improved. The patch doesn't touch any arch !i386 and derivates, so I don't see any reason why it shouldn't be included. best regards, Gordon -- Gordon Bergling http://www.0xFCE3.net/ PGP Fingerprint: 7732 9BB1 5013 AE8B E42C 28E0 93B9 D32B C76F 02A0 RIPE-HDL: MDTP-RIPE "Minimal Electronic Music"