Received: by oss.sgi.com id ; Tue, 27 Jun 2000 23:44:37 -0700 Received: from mail.informatik.uni-ulm.de ([134.60.68.63]:11310 "EHLO mail.informatik.uni-ulm.de") by oss.sgi.com with ESMTP id ; Tue, 27 Jun 2000 23:44:18 -0700 Received: from [134.60.8.166] (helo=ferret.extern.uni-ulm.de ident=user92474) by mail.informatik.uni-ulm.de with esmtp (Exim 3.00 #1) id 137BaK-0004h2-00; Wed, 28 Jun 2000 08:44:32 +0200 Received: from blackbird.extern.uni-ulm.de ([172.16.1.10] ident=root) by ferret.extern.uni-ulm.de with esmtp (Exim 3.02 #2) id 137BJ7-00003Y-00; Wed, 28 Jun 2000 08:26:45 +0200 Received: (from stefan@localhost) by blackbird.extern.uni-ulm.de (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id IAA00969; Wed, 28 Jun 2000 08:22:07 +0200 Date: Wed, 28 Jun 2000 08:22:07 +0200 From: Stefan Schlott To: Andy Cc: netdev@oss.sgi.com Subject: Re: Network protocols as modules Message-ID: <20000628082207.A587@blackbird.extern.uni-ulm.de> References: <3958BED5.43FE6C27@x0.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <3958BED5.43FE6C27@x0.org>; from andy@x0.org on Tue, Jun 27, 2000 at 10:48:53AM -0400 Sender: owner-netdev@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;netdev-outgoing Hello Andy, I think separating the basic protocols (icmp/igmp, tcp, udp) from the ip module is not a good idea. > Cleaner code > Better maintainability True. That would certainly be an advantage. > Better extensibility Even with tcp, ... included in the ip module, you can write new network protocols as separate modules. > Modularity > Smaller initial kernel Well... who would want ip without tcp or udp? :-) icmp will be mandatory anyway, because otherwise you would break the ip functionality (think of "no route to host", "packet too big", ... error messages) > Higher efficiency I dare to doubt that. > Problems of putting TCP on some other layer or sticking another layer > between TCP and > IP. If TCP would be independent from IP, then this would be trivial. > IPV6 support is complicated because TCP has its tenticles inside IP > implementation. And imho there are some perfectly sound reasons to do so. Sure, the code is (to put it mildly) a bit cryptic, but kernel code is not an "object d'art". The only thing that counts is performance. I am absolutely sure the kernel programmers could have done better than using ugly "goto" statements, inline assembler code, ... The only reason they did so is to improve performance. If you want a clean code, you will have to look at some "academic" OS (minix might be an example, though I have never seen its network code). If you want to write a "real world OS", you'll soon start counting the number of times a network packet is copied in memory; and that's what the current networking code tries to minimize. Please don't get me wrong - there are certainly situations where I wished the code would be a bit more modular, too (you should have heard me cursing when I saw how fragmentation is done in the ipv6 module ;-). I am no kernel hacker, but I think I figured out why the code is like it currently is. Stefan. -- *--- please cut here... -------------------------------------- thanks! ---* |-> E-Mail: stefan.schlott@student.uni-ulm.de DH-PGP-Key: 0x2F36F4FE <-| | Mary had a crypto key, she kept it in escrow, | | and everything that Mary said, the Feds were sure to know. | | -- Sam Simpson, July 9, 1998 | *-------------------------------------------------------------------------*