Re: Take 2: new IP Checksum Code from DragonFlyBSD

From: Peter Jeremy <peterjeremy_at_optushome.com.au>
Date: Thu, 25 May 2006 21:54:48 +1000
On Thu, 2006-May-25 12:40:00 +0200, Gordon Bergling wrote:
>* Thus spake Max Laier (max_at_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
Received on Thu May 25 2006 - 09:55:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:56 UTC