Updating RTEMS FreeBSD network stack
Ralf Corsepius
ralf.corsepius at rtems.org
Wed Jun 22 05:08:20 UTC 2005
On Wed, 2005-06-22 at 12:04 +1000, Andrew Sinclair wrote:
> Hi everyone,
>
> The FreeBSD network stack has changed somewhat since it was originally
> ported to RTEMS.
>
> With this in mind, there are a couple questions I would like to discuss:
> 1. Has a process of keeping the RTEMS network stack inline with FreeBSD
> been considered?
Yes, the development you see in RTEMS CVS head is such an attempt.
Unfortunately RTEMS's network stack is based on very old FreeBSD code
(ca. 1999) and has not had much of attention since it had been ported.
This makes porting code from newer FreeBSD quite tedious, because
FreeBSD and RTEMS networking stack have diverged quite a lot and
compilers/toolchains have progressed since the initial port.
> 2. Has there been any thought of updating the RTEMS with a fresh copy of
> the FreeBSD network stack?
> 3. Has anyone ported a recent copy of the FreeBSD network stack?
My recent changes to the networking stack in RTEMS CVS-Head is a merger
of current FreeBSD's network stack with RTEMS-4.6.x's network stack.
> 4. How difficult is it to port a new copy of the FreeBSD stack?
It's quite complicated and tedious, but I would not exclude the
possibility it could show to be easier than trying to re-sync the RTEMS
networking stack with current FreeBSD :(
> Is it a
> matter of identifying the relevant files, dropping them in and updating
> rtems glue source if necessary?
To some extend yes, but this is the easy part.
The difficult parts are elsewhere:
* FreeBSD's networking stack is not as portable as RTEMS needs it.
* FreeBSD's networking stack is based on FreeBSD-proprietary kernel
internals.
* RTEMS networking stack contains RTEMS proprietary features.
> Issues I can see with updating the network stack are:
> 1. The RTEMS port of the FreeBSD network stack is robust in its current
> form.
True.
> A new port of FreeBSD could be introduce problems.
True.
> 2. Many of the additional plug in code like PPPD and FTPD may require
> update.
To some extend yes, but not really. For RTEMS pppd, and ftpd are
applications, using the "networking API".
So unless this "API" changes heavily, they should not require too much
work.
The crucial part is RTEMS networking drivers. They are based on
FreeBSD's internal APIs (Which has changed quite a lot in FreeBSD) and
therefore would require to be modified and _tested_ thoroughly.
> 3. Porting a fresh copy of the FreeBSD network stack is just hard work?
I don't think it's "that hard", but it definitely is not a trivial task.
My current strategy is to gradually merge code from FreeBSD's networking
code into RTEMS networking stack, instead of replacing the networking
stack at once - But as I said above, I ...
Ralf
More information about the users
mailing list