From owner-freebsd-questions@FreeBSD.ORG Sat Dec 20 21:37:11 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAADA1065673 for ; Sat, 20 Dec 2008 21:37:11 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail6.sea5.speakeasy.net (mail6.sea5.speakeasy.net [69.17.117.8]) by mx1.freebsd.org (Postfix) with ESMTP id BFAD88FC08 for ; Sat, 20 Dec 2008 21:37:11 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 2544 invoked from network); 20 Dec 2008 21:37:02 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail6.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 20 Dec 2008 21:37:01 -0000 Received: from lowell-desk.lan (lowell-desk.lan [172.30.250.6]) by be-well.ilk.org (Postfix) with ESMTP id 4170350820 for ; Sat, 20 Dec 2008 16:36:58 -0500 (EST) Received: by lowell-desk.lan (Postfix, from userid 1147) id 821531D034; Sat, 20 Dec 2008 16:36:56 -0500 (EST) To: freebsd-questions@freebsd.org References: <1229788709.1583.16.camel@MGW_1> <44iqpezlb8.fsf@lowell-desk.lan> <20081220205414.A10042@wojtek.tensor.gdynia.pl> From: Lowell Gilbert Date: Sat, 20 Dec 2008 16:36:56 -0500 In-Reply-To: <20081220205414.A10042@wojtek.tensor.gdynia.pl> (Wojciech Puchar's message of "Sat\, 20 Dec 2008 20\:55\:42 +0100 \(CET\)") Message-ID: <448wqazfyf.fsf@lowell-desk.lan> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: Network Stack Code Re-write (Possible motivations...?) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Dec 2008 21:37:12 -0000 Wojciech Puchar writes: >> I very much doubt that marketing issues were a significant issue. >> Off-the-shelf OS networking has always fallen short of supporting > > it wasn't made for that. It can be. I've written portable IP stacks intended for exactly this purpose. The routing tables are generally set up in userspace regardless, so it's not a big problem to send the same data to multiple stacks where each stack is supporting a different application. >> As someone else already mentioned in this thread, supporting hardware >> offload for forwarding is a major issue. Core routers (or even >> provider-edge routers) depend on most of the packet forwarding being >> done in proprietary hardware. Operating system IP stacks don't support >> this very well; all of the routers I've worked on used the kernel IP >> stack only for packets going to and from the kernel itself, and used a >> different stack for what I call "transit" packets -- those that are >> only being forwarded by the local system. > > as higher speed routers are "hardware" - why OS has to do ANY work on > routing? > > it's just there to prepare routing tables in format required for > routing ASIC's and put them there! Mostly, yes. But the system still has to be network manageable. That requires that it send and receive packets. Doing so requires using the same routing information that the forwarding engines are using to forward packets in the same address space. The kernel *does* still need to know routes to any of its destinations. Another possible implementation is, as you say, to have the kernel send everything out the same way and not know anything about the forwarding tables. This does, as the original poster said, imply that you're throwing out the capabilities of a stack that you built into your system from the ground up. -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/