Date: Sat, 21 Aug 2004 01:20:26 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Maxim Sobolev <sobomax@portaone.com> Cc: current@FreeBSD.org Subject: Re: on amd64 tcp4 cksums are bad (FYI) Message-ID: <20040820222026.GC73564@ip.net.ua> In-Reply-To: <41265A06.3030800@portaone.com> References: <20040820190525.GA21626@isc.org> <16678.21478.381551.833252@grasshopper.cs.duke.edu> <41265A06.3030800@portaone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Pk6IbRAofICFmK5e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 20, 2004 at 11:07:34PM +0300, Maxim Sobolev wrote: > Andrew Gallatin wrote: >=20 > >David W. Hankins writes: > > >=20 > > > This is as observed via tcpdump on [client], which is what is produci= ng > > > the bad checksums. Obviously it doesn't cause a problem since no one > > > listens to TCP checksums, but it's interesting. I only noticed it > > > because I was tcpdump'ing for completely unrelated reasons, and it=20 > > caught > > > my eye. > > > ><...> > > > > > Client machine is amd64, running 64-bit mode 5-current fresh as of > > > yesterday. Network interface is e1000, so fxp. Server is also freeb= sd > > > >e1000 is actually em. =20 > > > >You're almost certainly using a driver which offloads transmit > >checksums. (both fxp and em do) Since BPF sniffs the packet before it > >leaves the host, the checksum has not yet been calculated, so it looks > >bad. >=20 > Is it possible to detect this situation and flag tcpdump somehow, so=20 > that it don't trust checksum? With the widespread adoption of GigE=20 > cards, this "problem" is likely to be more and more common. >=20 It's easy to detect using the m_pkthdr.csum_flags. It shouldn't be impossible to make a writable mbuf chain copy, and call in_delayed_cksum() on a copy, before calling bpf_mtap(). Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --Pk6IbRAofICFmK5e Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (FreeBSD) iD8DBQFBJnkqqRfpzJluFF4RArMsAJ99I8i5h7n6l1tGvQwuLTuxiamv5gCeIFBD IUCQvcxLFl2ATHVRKH5m6jo= =b66l -----END PGP SIGNATURE----- --Pk6IbRAofICFmK5e--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040820222026.GC73564>