From owner-freebsd-stable@FreeBSD.ORG Wed Apr 7 20:54:18 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 4A74616A4CE for ; Wed, 7 Apr 2004 20:54:18 -0700 (PDT) Received: from mta4.rcsntx.swbell.net (mta4.rcsntx.swbell.net [151.164.30.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7374B43D5A for ; Wed, 7 Apr 2004 20:54:17 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (dfaed35b3646f369a19298728e98de21@adsl-67-115-73-128.dsl.lsan03.pacbell.net [67.115.73.128])i37H9X3A018353; Wed, 7 Apr 2004 12:09:34 -0500 (CDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 1BF7F511F0; Wed, 7 Apr 2004 10:09:33 -0700 (PDT) Date: Wed, 7 Apr 2004 10:09:33 -0700 From: Kris Kennaway To: Mipam Message-ID: <20040407170932.GA74440@xor.obsecurity.org> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T4sUOijqQbZv57TR" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i cc: freebsd-stable@freebsd.org 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: Thu, 08 Apr 2004 03:54:18 -0000 --T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 07, 2004 at 03:09:11PM +0200, Mipam wrote: > Hi, >=20 > I'm running FreeBSD 5.2.1-p4 on a dell system with a Broadcom 5704C Nic in > it. >=20 > 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 >=20 > 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: >=20 > 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. > 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 --T4sUOijqQbZv57TR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAdDXMWry0BWjoQKURAlcgAJwLdq6SkP3tcfo1PN7wAcyoeVVMcgCfVMMg 7Hb3s32aizL12LfKD23HfQ0= =nO2d -----END PGP SIGNATURE----- --T4sUOijqQbZv57TR--