[openbeosnetteam] Modules...

  • From: "David Reid" <dreid@xxxxxxxxxxxx>
  • To: "OpenBeOS Network Team" <openbeosnetteam@xxxxxxxxxxxxx>
  • Date: Mon, 4 Feb 2002 16:27:40 -0000

I've been carrying on with my coding of an ipv6 portion for the newos stack
and it's been interesting work.

A few things have become clearer and so I'm going to make some suggestions
here about what needs to be done and how we proceed.  This also lowers the
"entry requirements" a little so should make jumping in easier for people.

At present Travis readily admits that the whole net stack is a hack to get
things working for him.  This means that while we have code in place, we
also have pretty much a blank canvas to work on.  Other improvements and
additions mean that we may be approaching a point where we can start adding
code that works as we want it.

Currently, each module and device driver is loaded as part of the module and
references are then hard coded into the neccesary files.  Look at
kernel/net/net.c to see what I mean.  Unless you list your NIC driver in
kernel/dev/devs.c it won't even be found!  The good news is that the modules
do try to behave like modules and be modular in their interactions with the
other parts, although this again needs more abstraction.

We've talked before that what we need is a modular stack, where each
protocol is implemented as an add-on that is loaded at stack-start.  The
same should be true of the NIC drivers, these should be modules.

The cbuf's that newos use are a start, but more work needs doing on them and
we should probably review how we actually want to deal with the whole buffer
issue. Travis doesn't like the way that Linux does things, but maybe a
half-way house can be found as at present we have a lot of copying going on.

Each module needs to be self contained, which sounds ideal in principal, but
in practise, often higher level modules need to refer to lower level ones.
So, while we can make the modules self contained we need to be aware that
some "backward looking" will be required. perhaps we accumulate modules?
Don' know the answer yet.

The modules are simple enough in that all they really export are _input,
_output and other "housekeeping" functions we need for things like loading,
init and start/stop.

So, where do we go from here?  Well, despite the milestones we agreed, I
think it would be good if we actually started looking at getting the
infrastructure in place so we could have the drivers and modules as loadable
modules.  Once we have that working we can move further.  Apparently the
iso9660 module is currently loaded this way, so that should give us a
starting point for how to deal with this.

So, what do we think?

david


Other related posts:

  • » [openbeosnetteam] Modules...