From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 24 15:59:27 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D567716A4CE for ; Sat, 24 Jan 2004 15:59:27 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 517B143D46 for ; Sat, 24 Jan 2004 15:59:26 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.10/8.12.10) with ESMTP id i0ONvFUd045463; Sat, 24 Jan 2004 18:57:15 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i0ONvEKO045460; Sat, 24 Jan 2004 18:57:14 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Sat, 24 Jan 2004 18:57:14 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Luigi Rizzo In-Reply-To: <20040124151029.A73519@xorpc.icir.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Max Laier cc: hackers@freebsd.org Subject: Re: XL driver checksum producing corrupted but checksum-correct packets X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2004 23:59:27 -0000 On Sat, 24 Jan 2004, Luigi Rizzo wrote: > On Sat, Jan 24, 2004 at 02:12:12PM -0500, Robert Watson wrote: > ... > > > but going this way you have no idea on what the driver does, including > > > enabling hw checksums. This looks like a useless test at least for the > > > purpose of finding out what is going wrong > > > > Actually, I'm more curious about whether it's a known errata/misbehavior > > for the card that 3Com's drivers work around, or not. The problem could > > well be compleely unrelated to hardware checksuming per se -- the > > corruption might well be taking place as the buffer is moved from the > > card's buffer to the operating system managed buffer. If the NDIS driver > > doesn't illustrate the same problem, it tells us that by frobbing > > appropriately, this problem can be worked around. It also tells us that > > by looking a bit harder at what the driver is doing (i.e., how it frobs > > the hardware), we can learn something about the appropriate workaround. > > yes, but how would you know that, short of reverse engineering the > driver, or tracing I/O accesses to the hardware ? It really looks like > an overkill effort... I'd rather just try to debug the issue working on > an open source driver, or dump the hardware altogether and replace it > with something known to work... My understanding is that NDIS drivers rely on the HAL provided by NT to perform hardware access, so you can generate I/O traces with relative ease. Decoding and following the HAL traces during card setup is probably relatively straight forward, since presumably most of the I/O transactions will match the documented services of the card. It might be useful to add some KTR support to Bill's NDIS pieces for this very purpose, if there's interest. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research