From owner-freebsd-stable@FreeBSD.ORG Tue Apr 20 11:01:43 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 173EC16A4CE for ; Tue, 20 Apr 2004 11:01:43 -0700 (PDT) Received: from cpc2-cove3-6-0-cust88.brhm.cable.ntl.com (cpc2-cove3-6-0-cust88.brhm.cable.ntl.com [81.107.10.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA6F243D5C for ; Tue, 20 Apr 2004 11:01:41 -0700 (PDT) (envelope-from ianjhart@ntlworld.com) Received: from [192.168.0.12] (gamma.private.lan [192.168.0.12]) ESMTP id i3KI1aap097025; Tue, 20 Apr 2004 19:01:36 +0100 (BST) (envelope-from ianjhart@ntlworld.com) From: ian j hart To: freebsd-stable@freebsd.org Date: Tue, 20 Apr 2004 19:01:35 +0100 User-Agent: KMail/1.6.1 References: <20040407170932.GA74440@xor.obsecurity.org> In-Reply-To: <20040407170932.GA74440@xor.obsecurity.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200404201901.35819.ianjhart@ntlworld.com> cc: Mipam cc: Kris Kennaway Subject: Re: bad tcp/udp checksumsc with 5704C X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2004 18:01:43 -0000 On Wednesday 07 April 2004 18:09, Kris Kennaway wrote: Sorry about the delay - on holiday. > On Wed, Apr 07, 2004 at 03:09:11PM +0200, Mipam wrote: > > Hi, > > > > I'm running FreeBSD 5.2.1-p4 on a dell system with a Broadcom 5704C Nic > > in it. > > > > bge0: mem > > 0xfcd20000-0xfcd2ffff,0xfcd30000-0xfcd3ffff irq 16 at device 0.0 on pci2 > > bge0: Ethernet address: 00:0b:db:93:c5:c4 > > miibus0: on bge0 > > brgphy0: on miibus0 > > brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, > > 1000baseTX-FDX, auto > > > > Since version 4.5 tcp checksum offloading is supported with this NIC. > > However, i'm encountering continuous on all packet send from this > > machines bad tdp/udp checksums: > > > > 16:05:41.287764 x.x.x.x.22 > 192.168.2.1.4761: . [bad tcp cksum > > f48!] 984:984(0) ack 313 win 32824 (DF) [tos 0x10] (ttl 64, id 44539, > > len 40, bad cksum 0!) > > 16:05:41.545073 x.x.x.x.123 > y.y.y.y.123: [bad udp cksum > > 6a52!] v3 server strat 2 poll 6 prec -31 dist 0.007049 disp 0.022796 ref > > 195.169.124.69@3290335106.099078394 orig 3290335541.540184020 rec > > +0.004841091 xmt +0.004874050 [tos 0x10] (ttl 64, id 44541, len 76, bad > > cksum 0!) > > > > When tcp csum offloading is turned on, does the networking stack not > > compute the checksum on outgoing packets and hand it to the driver which > > hands it to bpf and libpcap hands it to tcpdump so tcpdump reports an > > invalid checksum? For now i am not sure whether the behaviour is right or > > not.... it worries me. > > I ran into this yesterday with a different NIC, and Peter Wemm told me > that tcpdump indeed gets it wrong for locally-generated packets when > the card does checksum offloading. Indeed, when I ran the tcpdump on > another machine on the LAN it verified that the checksums on those > packets were all correct. In that case, this PR can probably go. http://www.freebsd.org/cgi/query-pr.cgi?pr=63982 > > > There's more: when i set the speed and duplex hard on the switch and nic > > on 100 and full-duplex, the traffic is very slow. > > Sounds like what happens when full-duplex isn't supported by one > end, or isn't actually being set correctly. > > Kris -- ian j hart http://ars.userfriendly.org/cartoons/?id=20031016