lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] MINIX 3 has switched to lwIP


From: address@hidden
Subject: Re: [lwip-devel] MINIX 3 has switched to lwIP
Date: Tue, 2 May 2017 20:23:18 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

David,

thanks for that excellent roundup! And thanks for all your work on lwIP, I guess both sides had their benefit. Maybe we can work on those leftover patches and see what can get mainlined, maybe others can use them too.

Simon

D.C. van Moolenbroek wrote:
All,

As of today, the MINIX 3 operating system has switched over to a
lwIP-based TCP/IP stack. I am posting about that here not just because I
promised to do so :) but also because it may be of some interest to
other developers, now or in the future, to have an additional reference
of how lwIP can be used in the context of a (for lwIP) relatively
resource-unconstrained operating system. In our specific case, the lwIP
core ("raw") implementation is combined with a significant amount of
custom code to form a microkernel service that can support much of
NetBSD's networking userland, requiring minimal or no source code
changes on that userland side. The microkernel service, named "LWIP" or
"lwip" (ie same-case, as opposed to "lwIP"), is an unprivileged system
process, single threaded and event driven based on IPC messages. It does
not contain ethernet drivers; those are separate unprivileged system
processes on MINIX 3.

I do not think this is the place to elaborate on why we chose lwIP over
the appropriately-licensed alternatives (in particular, extracting the
network stack from NetBSD), but we had both technical and ideological
reasons for our decision. Obviously, that is the kind of decision that
each operating system project (etc) will have to make for itself. lwIP's
own socket/netconn implementations were a mismatch for MINIX 3 in many
respects (functionality, threading, the fact that MINIX 3 has a separate
VFS service, and so on) so use of the core lwIP API was a no-brainer.

For those interested in examining the MINIX 3 implementation, or even
reusing parts from it (as it is BSD-3 licensed [1] just like lwIP),
allow me to supply a few quick pointers. The lwIP source code is
imported and compiled as a library [2], with the imported lwIP source
code in dist/ as is, except for a few small local changes which are also
stored separately in patches/. The lwipopts.h, arch/cc.h, and Makefiles
for lwIP are in lib/. The resulting library is used by the LWIP service
[3], which is about 24 KLoC of new code that implements the socket and
interface/route management on top of the core lwIP API. The LWIP service
itself is driven by two more generic socket libraries, libsockdriver [4]
and libsockevent [5], also both new. Finally, test91-94.c and socklib.c
from our test set [6] implement a number of new regression tests for the
LWIP service. That should be the gist, although of course various other
parts from the rest of the MINIX 3 source tree [7] are involved as well.

In any case, I myself am very happy how the choice for lwIP has turned
out, and how good a match lwIP is for MINIX 3 in general. Of course
there are also areas where some of the basic NetBSD userland
functionality can not (or not easily) be implemented due to lwIP's
minimality. As one random example: static ARP table entries with a
timeout. It is my hope that we can resolve some of such small issues in
the future, in collaboration with the lwIP project whenever possible. I
can only say that working with the kind lwIP folks on here has been a
great experience. However, at least for a while, I myself will not have
much additional time to spend on any of this, sadly. Even staying
up-to-date with the current lwIP source code, which MINIX 3 aims to do,
will be a bit of a challenge right now. I will still be around though,
so please feel free to ask questions or whatnot (off-list if needed).

Regards,
David

[1]
http://git.minix3.org/index.cgi?p=minix.git;a=blob;f=LICENSE;h=a119efa5f44dc93086bc34e7c95f10ed55b6401f;hb=HEAD
[2]
http://git.minix3.org/index.cgi?p=minix.git;a=tree;f=minix/lib/liblwip;h=8aec5defc9deaf7ff4e5067b9f0fa6f9dde9d978;hb=HEAD
[3]
http://git.minix3.org/index.cgi?p=minix.git;a=tree;f=minix/net/lwip;h=6b1730ca084d89a3b5c6c26535683fa3ef222fba;hb=HEAD
[4]
http://git.minix3.org/index.cgi?p=minix.git;a=tree;f=minix/lib/libsockdriver;h=3bb6a6356021e5149a96eaa8fe020540b87adc06;hb=HEAD
[5]
http://git.minix3.org/index.cgi?p=minix.git;a=tree;f=minix/lib/libsockevent;h=099dbf9229e7b77868584c7e9854524301c4a5f1;hb=HEAD
[6]
http://git.minix3.org/index.cgi?p=minix.git;a=tree;f=minix/tests;h=d522aa1f8b64f9d9435fac50dd432d40297145a9;hb=HEAD
[7]
http://git.minix3.org/index.cgi?p=minix.git;a=tree;h=e54c19c251b87db521533b316d3d81491dca7621;hb=HEAD

_______________________________________________
lwip-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-devel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]