From owner-freebsd-hackers Fri Feb 27 16:13:59 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA03213 for freebsd-hackers-outgoing; Fri, 27 Feb 1998 16:13:59 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from shell6.ba.best.com (root@shell6.ba.best.com [206.184.139.137]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA03200 for ; Fri, 27 Feb 1998 16:13:42 -0800 (PST) (envelope-from bannai@shell6.ba.best.com) Received: (from bannai@localhost) by shell6.ba.best.com (8.8.8/8.8.BEST) id QAA04406; Fri, 27 Feb 1998 16:13:13 -0800 (PST) From: Vinay Bannai Message-Id: <199802280013.QAA04406@shell6.ba.best.com> Subject: Re: "Best" Fast Ethernet Card In-Reply-To: <199802271811.KAA00364@bubba.whistle.com> from Archie Cobbs at "Feb 27, 98 10:11:46 am" To: archie@whistle.com (Archie Cobbs) Date: Fri, 27 Feb 1998 16:13:12 -0800 (PST) Cc: mike@smith.net.au, sthaug@nethelp.no, hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG According to Archie Cobbs: > Mike Smith writes: > > Sure. However I think the point here is that you can only do hardware > > checksums efficiently if you collapse the protocol stack to the point > > where code has access to both the hardware and then TCP layer. > > > > That's expedient, and fast, but potentially *very* ugly. It also > > raises the issue of fragment reassembly. > > There's nothing wrong with taking stable, existing, working code > and optimizing it for the common case. > > For example, you could do it with an internal mbuf flag M_IPSUM that > would indicate that the hardware has already verified the checksum > on the packet. > > Sure it's not pretty, but it's a lot cleaner than some other stuff > I've seen in there.. (the kernel, that is :-) > > -Archie Yup. The ifnet device has a flag which indicates that it is capable of doing checksum in the hardware and you set this flag in the mbufs and pass it along. This is pretty usefule when computing checksumn in hardware for transmits too. I know of atleast two protocol stack implementations (popular too) that use these techniques... Vinay -- Vinay Bannai E-mail: bannai@best.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message