This patch switches the MINIX3 ethernet driver stack from a port-based

model to an instance-based model. Each ethernet driver instance is now
responsible for exactly one network interface card. The port field in
/etc/inet.conf now acts as an instance field instead.

This patch also updates the data link protocol. This update:
- eliminates the concept of ports entirely;
- eliminates DL_GETNAME entirely;
- standardizes on using m_source for IPC and DL_ENDPT for safecopies;
- removes error codes from TASK/STAT replies, as they were unused;
- removes a number of other old or unused fields;
- names and renames a few other fields.

All ethernet drivers have been changed to:
- conform to the new protocol, and exactly that;
- take on an instance number based on a given "instance" argument;
- skip that number of PCI devices in probe iterations;
- use config tables and environment variables based on that number;
- no longer be limited to a predefined maximum of cards in any way;
- get rid of any leftover non-safecopy support and other ancient junk;
- have a correct banner protocol figure, or none at all.

Other changes:
* Inet.conf is now taken to be line-based, and supports #-comments.
  No existing installations are expected to be affected by this.
* A new, select-based asynchio library replaces the old one.
  Kindly contributed by Kees J. Bot.
* Inet now supports use of select() on IP devices.
  Combined, the last two changes together speed up dhcpd
  considerably in the presence of multiple interfaces.
* A small bug has been fixed in nonamed.
This commit is contained in:
David van Moolenbroek
2010-05-17 22:22:53 +00:00
parent f5bce90216
commit 9ba65d2ea8
55 changed files with 1971 additions and 4794 deletions
+8 -9
View File
@@ -39,7 +39,7 @@ It tells that network 0 (the one containing devices
and
.BR udp0 )
uses the ethernet device driver handled
by task "DP8390" at port 0. This network is marked as the default
by driver "DP8390" instance 0. This network is marked as the default
network, so most programs use it through the unnumbered devices like
.B /dev/tcp
or
@@ -47,21 +47,20 @@ or
Network 1 is a Pseudo IP network that can be used for
a serial IP over a modem for instance.
.PP
The configuration file may look like a common configuration file as
described by
.BR configfile (5),
but it is currently just a simple subset allowing only what you see here.
The configuration file uses a simple line-based format.
Each network definition has to be fully on its own line.
Empty lines and lines that start with a `#' symbol are ignored.
The following network definitions are possible:
.PP
.BI eth N
.I task port
.I driver instance
.RI { options };
.RS
This sets up an ethernet with device name
.BI /dev/eth N\fR,
built on the given ethernet device driver at the given port at that driver.
(If a network driver manages two network
cards then they are at port 0 and 1.)
built on the given ethernet device driver with the given instance number.
(If there are two network cards of the same type
then they will be managed by instance 0 and 1 of the corresponding driver.)
.br
.RE
.PP