Re: Initialization order of PCI devices

From: Riley Williams (rhw@cus.org.uk)
Date: Tue May 23 2000 - 16:25:07 EST


Hi David, Alan.

On Tue, 23 May 2000, David Woodhouse wrote:

> To be honest, I don't think any of it's necessary in the kernel.
> The initial device ordering isn't non-deterministic, so it
> should suffice to simply work out which eth%d you have to pass
> to the kernel on the command line to get it to work nicely on
> your network. Perhaps you may have to recalculate that each time
> you change your BIOS/kernel, but it's not going to change very
> often.

Probably more useful would be a facility that would answer queries
along the lines of "Which network port last received a packet from an
IP address in network A.B.C.D/X ?" together with a tool that would
send those queries and set up the routing table from the result.

Probably a more useful facility would be one that allowed a userland
tool to do the following:

 1. Read a configuration file specifying what network/netmask
    combinations to look for.

 2. For each combination required that has not already been
    satisfied...

     a. Determine which network port(s) has received one or
        more frames from a system satisfying that combination.

     b. If the port is currently not allocated an IP address
        and we have been given an IP address to allocate to
        the relevant port, then configure the port.

     c. Configure a route to suit.

This would deal with most (if not all) of the problem cases that I
have met when configuring networks, all of which satisfy the following
description...

 Q> A computer with several XbaseY network cards gets moved from
 Q> its usual site following flooding. When it is returned to
 Q> its site, nobody can remember which lead plugged in which
 Q> port.

Given the above facility, it wouldn't matter which lead plugged in
which card since they would all get configured based on what was on
the same network segment.

A sample configuration file could look like the following...

        # System networking configuration file.
        #

        Network 192.168.254.0/24 {
                Address 192.168.254.37
                Broadcast 192.168.254.255
                Gateway 192.168.254.254
        }

        Network 192.168.6.0/24 {
                Address 192.168.6.254
                Broadcast 192.168.6.255
        }

        Network 192.168.27.0/24 {
                Address 192.168.27.254
                Broadcast 192.168.27.255
        }

        Network 192.168.200.0/24 {
                Address 192.168.200.254
                Broadcast 192.168.200.255
                AutoAsk
        }

        # Specific hosts with their own ports.
        # Wasteful, but sometimes necessary.

        Host 192.168.25.19 # Fileserver.

        # EOF.

The system the above description is taken from has four 10base2 NE2k
cards fitted, together with a wireless LAN interface that emulates an
NE2k interface. The AutoAsk keyword is used in the relevant netblock
description, and would be taken to mean "Send a broadcast ping on all
currently unallocated network interfaces looking for this block". This
is why such interfaces should be left until last, as shown.

Best wishes from Riley.

 * Copyright (C) 1999, Memory Alpha Systems.
 * All rights and wrongs reserved.

+----------------------------------------------------------------------+
| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |
+----------------------------------------------------------------------+
 * http://www.memalpha.cx/Linux/Kernel/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:24 EST