From owner-freebsd-hackers Mon Apr 22 09:26:38 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id JAA15492 for hackers-outgoing; Mon, 22 Apr 1996 09:26:38 -0700 (PDT) Received: from doorstep.unety.net (root@usi-00-10.Naperville.unety.net [204.70.107.30]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id JAA15479 for ; Mon, 22 Apr 1996 09:26:34 -0700 (PDT) Received: from webster.unety.net (webster.unety.net [206.31.202.8]) by doorstep.unety.net (8.6.9/8.6.9) with SMTP id LAA12431; Mon, 22 Apr 1996 11:19:58 -0500 Received: by webster.unety.net with Microsoft Mail id <01BB303E.14D91FE0@webster.unety.net>; Mon, 22 Apr 1996 11:23:07 -0500 Message-ID: <01BB303E.14D91FE0@webster.unety.net> From: Jim Fleming To: Darren Reed , "'Luigi Rizzo'" Cc: "hackers@FreeBSD.ORG" Subject: RE: one less checksum ? (fwd) Date: Mon, 22 Apr 1996 11:23:06 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Sunday, April 21, 1996 5:26 PM, Luigi Rizzo[SMTP:luigi@labinfo.iet.unipi.it] wrote: @> Is there any reason why the result of in_cksum() is stored in ip_sum in @> ipintr() ? @> @> A small gain can be observed if this is not done, for forwarded packets, @> by altering the checksum in ip_output() if IP_FORWARDING is set rather @> than recalculating the entire header checksum. Is this worthwhile ? @ @TCP/IP Illustrated vol.1 suggests something similar, so I'd say it is @worthwhile. Garret Wollman should be looking after this code right in @these days. @ @But I don't understand how you relate your code (which looks correct) @with the above comment. It looks like your code is computing the @checksum in the same place, just with a more efficient algorithm. @ @The same code fragments suggest some more optimizations when @if_forwarding is enabled, e.g. don't convert header fields (ip_len and @ip_off) for back and forth from network format. @ @ Luigi @ @ You will note that in IPv8.... ...that Checksums are not used in the IP header....this speeds things up a bit...if we can migrate Options out of the header, then we can really streamline this low level processing and at the same time create 2,047 new 32 bit address spaces. If you are using a closed system, you might try experimenting with the IPv8 format and using the "8 bit" in the version field to signify that the checksum processing has been disabled. The changes to the Free BSD code can be done in a few minutes. In this experimental scheme, your servers that feel like skipping the checksums can set the high bit to a 1 and when packets are received this bit can be reset to a 0 and checksum processing can be skipped. It would be interesting to see some large FTP benchmarks on local networks, with and without checksums enabled.... -- Jim Fleming UNETY Systems, Inc. Naperville, IL 60563 e-mail: JimFleming@unety.net