From owner-freebsd-current@FreeBSD.ORG Thu May 25 11:55:05 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 2FF3716A42A for ; Thu, 25 May 2006 11:55:05 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail27.syd.optusnet.com.au (mail27.syd.optusnet.com.au [211.29.133.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A55043D68 for ; Thu, 25 May 2006 11:54:59 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail27.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k4PBsnTP010256 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 25 May 2006 21:54:51 +1000 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.6/8.13.6) with ESMTP id k4PBsn8F001564; Thu, 25 May 2006 21:54:49 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.6/8.13.6/Submit) id k4PBsmC5001563; Thu, 25 May 2006 21:54:48 +1000 (EST) (envelope-from peter) Date: Thu, 25 May 2006 21:54:48 +1000 From: Peter Jeremy To: Gordon Bergling Message-ID: <20060525115447.GB724@turion.vk2pj.dyndns.org> References: <20060524180802.GA59176@central.0xfce3.net> <200605250517.12054.max@love2party.net> <20060525104000.GA4962@central.0xfce3.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060525104000.GA4962@central.0xfce3.net> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.11 Cc: Max Laier , 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 11:55:06 -0000 On Thu, 2006-May-25 12:40:00 +0200, Gordon Bergling wrote: >* Thus spake Max Laier (max@love2party.net): >> 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 > | * This routine is very heavily used in the network > | * code and should be modified for each CPU to be as fast as > | * possible. But _correct_ code is far more important. And I'm not sure that comment is still as relevant as it used to be - most (if not all) gigabit NICs have checksum offloading and processors are fast enough that generic checksum code should be "good enough" for most lesser purposes. >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. You stated that you don't understand the code. IP checksumming is a crucial part of the kernel so the Project needs to be very careful about making changes. As Max pointed out, there have been past situations where the checksum code revealed gcc optimiser bugs so any change has to be checked using a variety of compiler flags. The justification needs to be along the lines of "Matt's code is better than the existing code because it does ... instead of ... and this means it makes better use of ...". I respect Matt's technical skills so I am confident that this code works more efficiently in DFBSD but that doesn't mean that it's a drop-in replacement for the equivalent code in FreeBSD. -- Peter Jeremy