Re: Take 2: new IP Checksum Code from DragonFlyBSD

From: Max Laier <max_at_love2party.net>
Date: Thu, 25 May 2006 05:17:04 +0200
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?

> I applied the patch to RELENG_6 and have done a simple netperf
> benchmark. The machine was a PIII 900.
>
> The ministat output:
> ---------------------------------------------------------------------------
>- x netperf-localhost-plain.txt
> + netperf-localhost-ncksum.txt
> +--------------------------------------------------------------------------
>+
>
> |      x     x     x      x        +             ++               +       
> | | xx    x     x  xx xxx    x  x x  x+x   *+x x +  +++   ++  +  + + +++++ 
> |  +|
> |
> |        |__________M_A____________|        |__________A___________|      
> |        | |
>
> +--------------------------------------------------------------------------
>+ N           Min           Max        Median           Avg        Stddev x 
> 22        707.31        730.41        717.37     718.53909     6.7389076 + 
> 22        725.57        746.46       736.535     736.51727     6.3001188
> Difference at 95.0% confidence
> 	17.9782 +/- 3.96904
> 	2.50205% +/- 0.552377%
> 	(Student's t, pooled s = 6.5232)
> ---------------------------------------------------------------------------
>-
>
> Any comments, correctures are very appreciated.
>
> best regards,
>
> 	Gordon

-- 
/"\  Best regards,                      | mlaier_at_freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier_at_EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News

Received on Thu May 25 2006 - 01:17:15 UTC

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