From owner-freebsd-net@FreeBSD.ORG Thu Jul 10 19:54:00 2008 Return-Path: Delivered-To: net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B280106566C; Thu, 10 Jul 2008 19:54:00 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from proxy.meer.net (proxy.meer.net [64.13.141.13]) by mx1.freebsd.org (Postfix) with ESMTP id 111608FC1C; Thu, 10 Jul 2008 19:54:00 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from mail.meer.net (mail.meer.net [64.13.141.3]) by proxy.meer.net (8.14.2/8.14.2) with ESMTP id m6AJrx2e038753; Thu, 10 Jul 2008 12:53:59 -0700 (PDT) (envelope-from gnn@neville-neil.com) Received: from mail2.meer.net (mail2.meer.net [64.13.141.16]) by mail.meer.net (8.13.3/8.13.3/meer) with ESMTP id m6AJqC1Z059439; Thu, 10 Jul 2008 12:52:13 -0700 (PDT) (envelope-from gnn@neville-neil.com) Received: from minion.local.neville-neil.com (209.249.190.254.available.above.net [209.249.190.254] (may be forged)) (authenticated bits=0) by mail2.meer.net (8.14.1/8.14.1) with ESMTP id m6AJqCTN035108; Thu, 10 Jul 2008 12:52:12 -0700 (PDT) (envelope-from gnn@neville-neil.com) Date: Thu, 10 Jul 2008 15:52:11 -0400 Message-ID: From: gnn@FreeBSD.org To: Robert Watson In-Reply-To: <20080710114028.T34050@fledge.watson.org> References: <20080710114028.T34050@fledge.watson.org> User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.1.50 (i386-apple-darwin8.11.1) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Canit-CHI2: 0.50 X-Bayes-Prob: 0.5 (Score 0, tokens from: ) X-Spam-Score: 0.40 () [Tag at 5.00] COMBINED_FROM,PORN_RP_NASTY X-CanItPRO-Stream: default X-Canit-Stats-ID: 911374 - e7c0111dbdb5 X-Scanned-By: CanIt (www . roaringpenguin . com) on 64.13.141.13 Cc: net@FreeBSD.org Subject: Re: What's the deal with hardware checksum and net.inet.udp.checksum? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jul 2008 19:54:00 -0000 At Thu, 10 Jul 2008 11:43:23 +0100 (BST), rwatson wrote: > > On Wed, 9 Jul 2008, gnn@freebsd.org wrote: > > > I would assume that if a card, say the em, has hardware TX checksum that the > > UDP checksum could be calculated by the hardware, but this seems not to be > > the case. The manual pages are unhelpful in this regard. > > On the whole, they should be generated in hardware as long as it's > not administratively disabled with ifconfig, and as long as there > aren't know bugs in the hardware for the rev you're using. Just for > example, hardware checksumming is disabled in software for quite a > few early 1gbps cards due to bugs in the hardware causing rather > nasty side effects. What specific problem are you seeing? We do do > a software checksum of the pseudo-header, but the UDP data should be > checksummed by hardware. > > (The usual test for hardware checksum being enabled on transmit is > to tcpdump the interface and see tcpdump reporting lots of bad > checksums, as the BPF capture happens before hardware checksumming > is run -- in principle on the receive side that shouldn't happen!) > If the sysctl it turned off on the transmitter then the receiving machine sees UDP checksums of 0. Best, George