From owner-freebsd-net Fri Jun 14 11:20:21 2002 Delivered-To: freebsd-net@freebsd.org Received: from sccrmhc02.attbi.com (sccrmhc02.attbi.com [204.127.202.62]) by hub.freebsd.org (Postfix) with ESMTP id 7FDEE37B41E for ; Fri, 14 Jun 2002 11:20:13 -0700 (PDT) Received: from InterJet.elischer.org ([12.232.206.8]) by sccrmhc02.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020614182012.IZRZ1547.sccrmhc02.attbi.com@InterJet.elischer.org>; Fri, 14 Jun 2002 18:20:12 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id LAA00478; Fri, 14 Jun 2002 11:19:03 -0700 (PDT) Date: Fri, 14 Jun 2002 11:19:02 -0700 (PDT) From: Julian Elischer To: John Polstra Cc: net@freebsd.org, spe@selectbourse.net Subject: Re: Problem using ng_ether In-Reply-To: <200206141650.g5EGo6c12182@vashon.polstra.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Fri, 14 Jun 2002, John Polstra wrote: > > I'm not Julian or Archie, but I think I know what the problem is. > The xl interface supports hardware checksum offloading, while the rl > interface does not. When checksum offloading is used, the NIC itself > checks the checksums of received packets, and calculates the checksums > of transmitted packets. > > When transmitting packets the TCP/IP/UDP stacks set flags in the mbuf > headers which tell the interface to calculate the checksums itself, > if the interface has reported that it is capable of that. In that > case, the TCP/IP/UDP layers don't bother to calculate the checksums > in software. If you pass the mbufs directly from the upper hook > to the lower hook inside the kernel, the relevant mbuf flags are > preserved, and it all works as one would hope. But since you're doing > the forwarding between hooks at the application layer, the mbuf flags > are lost. The TCP/IP/UDP stacks assume the NIC will calculate the > checksums of transmitted packets (because it said it could). But the > flags telling the NIC to do so are lost. I think you are 'spot on' I guess we need to figure out a way make the activation of the netgraph hooks automatically disable H/W checksumming by default. (or at least on how to codify metadata such as that so it can be passed through user space successfully) Julian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message