[openbeosnetteam] Re: porting FreeBSD's new netstack
- From: Waldemar Kornewald <Waldemar.Kornewald@xxxxxx>
- To: openbeosnetteam@xxxxxxxxxxxxx
- Date: Wed, 22 Sep 2004 10:34:37 +0200
Axel Dörfler wrote:
While I am certainly a friend of clean designs, I think that it's
crucial for a service like this to perform as efficient as possible.
If the design already imposes (obviously unnecessary) restrictions on
the efficiency, I would not consider it appropriate for this task.
So if the BSD stack is not just a big and unmaintainable mess that
happens to work almost perfectly, I would consider keeping it. And
then, I would not persue any efforts to put layers between the kernel
and the stack to keep it unchanged - I would port it as natively as
possible (because if you don't you would render it's biggest advantage
senseless).
We definitely need "layers". By creating a module you already place a
layer around the stack. I would also say that it has many advantages if
we can just copy new stack versions over to our repository and it will
simply work. The FreeBSD team always improves the stack (we do not have
the energy and time to do this). Maybe they will change to a no-lock
concept, too. If new protocols get supported we can easily add them.
Of course, we would not leave the stack completely as it is. IMHO,
Nathan's typed layer system should be adopted in order to get better
modularization. A firewall module would not need a firewall API because
it could just say it wants to sit in front of IP.
The rest we planned is just playing around with attributes, but we could
as well live with mbufs (though, BONE-like packets behave better with
huge amounts of data). We could easily give our changes back to the
FreeBSD community. If we work together it could lead to much better
results than reinventing everything (like too many other [unsucessful!]
OSS projects). I am sure the FreeBSD people will appreciate it if we
make their code more readable and improve their packet API.
Axel, what do you think about that?
The overhead in our newstack might be rather small and not affect
speed...but in the last few days I thought about the real advantages
that our own netstack would have and I tend to say that we will be
happier with a good port and co-operation with FreeBSD. Also, we do not
have enough man-power to even maintain our own stack and it would
probably be better if the net-team concentrated on adding features and
extending usability. We will already have enough to do with mDNS,
ZeroConf, networked file system(s), LDAP address book FS, etc.. The list
is long and the usability grows with it whereas a new stack gives
nothing to the user.
Maybe NewStack is just to make us devs happy because we always wanted to
write our own netstack? Philippe, do we really need a new stack in R2 or
should we work together with the FreeBSD community so their stack
evolves into our NewStack's direction? I would like to know what other
people think about it.
I saw nearly no locking at all in the ported stuff. Maybe TCP is
safe,
but it will be very complicated to find all the places in our core
module where locking is needed and we will have to take care of
dead-locks. This will be a major undertaking.
You make it sound like porting the new FreeBSD stack is the only option
:-)
Heh, I know how to convince people. ;))
I did not help porting the old stack, so I cannot say how much work a
new port means, but I know the current source and it will be damn-hard
to get a stable stack, especially because nobody of us really knows the
BSD stack and and thus we do not know if placing a lock somewhere might
lead to a dead-lock somewhere else.
Also, we really need IPv6 which we currently do not have. It could even
simplify porting apps: most of the BIND porting work was #ifdef'ing out
the IPv6 code. ;)
I want to know what the people who would help with the port have to say
(Philippe? :). We need at least two net-developers working on the port.
Bye,
Waldemar
Other related posts: