Subject: Re: Skipping TCP / UDP / IP checksums on loopback traffic
To: Jason Thorpe <>
From: Jonathan Stone <>
List: tech-net
Date: 10/25/2004 09:26:08
In message <>,
Jason Thorpe writes:

>There's no need to compute or check checksums for traffic over the 
>loopback interface.  The following patch makes it optional, and 
>defaults to "off".  Linux also skips checksums in this case, which 
>results in poor results for NetBSD compared to Linux in some 


Please let's not do this. I was present at a couple of dicssusions,
circa 1994/1995, between Linus Torvalds and varis people who had been
asking for better Internet checksum performance.  The Linux kernel
feature (not summing over loopback) got it *completely* wrong: the
requestors wanted better real-case numbers, not better benchmarking.

My take is, the benchmarks you allude to are deficient benchmarks.
The answer to *that* is better benchmarks (e.g., netperf, or lmbench's
network benchmark run over a point-to-point link between two hosts).

There were once benchmarks that measaured "syscall" overhead by
calling getpid() repeatedly. So certain OS vendors reworked their
userspace getpid(), to cache process-id in userspace and clear it on
(library) fork().  Eliding checksums on loopback, on the grounds that
``Linux does it'', strikes me as no different.

And (in case its not obvious): yes, I *do* have some interest in
network-throughput benchmarks over local-loopback. Personally, I'm
much less interested in those benchmarks if they elide checksumming.