From owner-freebsd-current@FreeBSD.ORG Thu May 25 16:22:59 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 73A7416A619 for ; Thu, 25 May 2006 16:22:59 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4EEA143D7F for ; Thu, 25 May 2006 16:21:12 +0000 (GMT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.13.6/8.13.6) with ESMTP id k4PGKVEk017526 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 25 May 2006 12:20:31 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id k4PGKHJR056008; Thu, 25 May 2006 12:20:17 -0400 (EDT) (envelope-from gallatin) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17525.55617.272397.806798@grasshopper.cs.duke.edu> Date: Thu, 25 May 2006 12:20:17 -0400 (EDT) To: Peter Jeremy In-Reply-To: <20060525115447.GB724@turion.vk2pj.dyndns.org> References: <20060524180802.GA59176@central.0xfce3.net> <200605250517.12054.max@love2party.net> <20060525104000.GA4962@central.0xfce3.net> <20060525115447.GB724@turion.vk2pj.dyndns.org> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Cc: Gordon Bergling , freebsd-current@freebsd.org, Max Laier 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 16:23:05 -0000 Peter Jeremy writes: > 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. The benchmark quoted in the original post is interesting in that it is the best example of where improving the checksumming code would help, yet we really should not be checksumming packets sent across lo0 anyway. If we're going to do anything, I'd prefer to see us skip the checksum on everything sent across lo0 and stick with the slower, yet known to work, existing checksum code for slow interfaces. Drew