From owner-svn-src-all@FreeBSD.ORG Sun Mar 15 20:23:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A00DA106564A; Sun, 15 Mar 2009 20:23:08 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from kennaway-macbookpro.config (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A4BA38FC0A; Sun, 15 Mar 2009 20:23:07 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <49BD63AB.6090702@FreeBSD.org> Date: Sun, 15 Mar 2009 20:23:07 +0000 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Robert Watson References: <200903152017.n2FKHijd038587@svn.freebsd.org> In-Reply-To: <200903152017.n2FKHijd038587@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r189863 - in head: share/man/man4 sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Mar 2009 20:23:09 -0000 Robert Watson wrote: > Author: rwatson > Date: Sun Mar 15 20:17:44 2009 > New Revision: 189863 > URL: http://svn.freebsd.org/changeset/base/189863 > > Log: > Teach the loopback interface about checksum generation and validation > avoidance: > > - Enable setting the RXCSUM and TXCSUM flags for loopback interfaces; > set both by default. > - When RXCSUM is set, flag packets sent over the loopback interface as > having checked and valid IP, UDP, TCP checksums so that higher > protocol layers won't check them. > - Always clear CSUM_{IP,UDP_TCP} checksum required flags on transmit, > as they will have gotten there as a result of TXCSUM being set. > > This is done only for packets explicitly sent over the loopback, not > simulated loopback via if_simloop() due to !SIMPLEX interfaces, etc. > > Note that enabling TXCSUM but not RXCSUM will lead to unhappiness, as > checksums won't be generated but will be validated. > > Kris reports that this leads to significant performance improvements > in loopback benchmarking with TCP and UDP for throughput: > > RXCSUM RXCSUM+TXCSUM > TCP 15% 37% > UDP 10% 74% More like 24% instead of 74% actually, the sender and receiver had become unbalanced in that test. Kris