Re: Was: My planned work on networking stack (vimage)

From: Takanori Watanabe <takawata_at_axe-inc.co.jp>
Date: Wed, 03 Mar 2004 12:36:56 +0900
In message <Pine.BSF.4.21.0403021359220.62088-100000_at_InterJet.elischer.org>, Ju
lian Elischer wrote:
>On Tue, 2 Mar 2004, Marko Zec wrote:
>
>> On Tuesday 02 March 2004 21:01, Julian Elischer wrote:
>> > The major problem with 'vimage' is that all statics are moved to a
>> > large structure so that they can be duplicated...
>> > e.g. The root of the interface list gets moved there so that each
>> > vimage has its own list of interfaces.
>> >
>> >
>> >  This is ok for statically compiled modules, but what can you do for
>> > adding new modules.. either statically of dynamically..
>> >
>> > You end up having to have each module have it's own structure and
>> > each vimage has to have its own list or array of such structures..
>> >
>> 
>> Hi, Julian!
>> 
>> True, this can also become an issue. However, the question is how many 
>> modules in real-life do require per network stack symbols/structures. 
>> For example, the original vimage patch already included the necessary 
>> hooks and reserved the appropriate fields for ipfw or dummynet to be 
>> loaded / unloaded dynamically with no major problems.
>> 
>> On the other hand, no device driver should be affected by the 
>> virtualization, and shouldn't require any network-stack specific 
>> handling. And IMO the device drivers are those which are most commonly 
>> implemented as loadable modules.
>> 
>
>The trick is that you need to be able to arbitrarily add a protocol, 
>or a firewall stack or other modules. As I said it can be done.
>What is a problem is that 'static' form of the current vimage
>structure..
>
>Even 
>
>struct {
>#ifdef	NETINET
>  ..inet variables
>#endif
>#ifdef NETATALK
>  .. appletalk variables
>#endif
>[etc.]
>} vimage;

>is not tennable because you cannot keep adding parts to the structure..
>The whole aim of FreeBSD over the last 10 years has been to move towards 
>modularity, in almost all areas.

Generally  #ifdef's are obstacles for making it moduler.

>If you could add modules and have them add themselves to existing
>(or even only new) vimages, then it could be viable in FreeBSD.

But networking stack itself now contains *many* #ifdef's, so
we cannot add ethernet protocol by kld, for example NETATALK now.
It may be done by all protocols layers are connected by netgraph(4).

Static structure definition are certainly obstackles for making moduler,
but gathering protocol stack private values into a structure will 
on the contrally help for it, by figuring out which data should we duplicate
.
Received on Tue Mar 02 2004 - 18:37:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:45 UTC