Date: Fri, 14 Jun 2002 11:19:02 -0700 (PDT) From: Julian Elischer <julian@elischer.org> To: John Polstra <jdp@polstra.com> Cc: net@freebsd.org, spe@selectbourse.net Subject: Re: Problem using ng_ether Message-ID: <Pine.BSF.4.21.0206141116440.409-100000@InterJet.elischer.org> In-Reply-To: <200206141650.g5EGo6c12182@vashon.polstra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0206141116440.409-100000>