Subject: Re: A possible way of handling variant/common devices
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Andrew Gillham <gillhaa@ghost.whirlpool.com>
List: tech-kern
Date: 03/29/1997 01:29:27
Jonathon Stone writes:

> Since you've split the if_ed driver youself, you've probably observed
> that you still need to call the ISA probe function for the appropriate
> card family, from within the attach function of your EISA device.
> Otherwise, your EISA NE board doesn't get the chipset initialized

Actually I don't call those routines at all, only the dp8390 related
ones.  The board initialization is not particularly tricky, and I've
somewhat hard-coded the values for the shared memory starts and
such.  As my only documentation is a packet driver .asm file, and the
board can only be configured for 32K of RAM, it is enough to get it
working.  Eventually I need to add some code to sanity check the
hardware, but since I'm looking for a specific EISA product id, I *know*
what I have.

> But do  we really want subinterfaces in the first place?  What do they
> give us??

As Erik Fair mentioned, distinct interfaces for routing.  At the moment
the only NetBSD interface I can think of that would need them, would be
the ATM driver.  With subinterfaces, it would be possible to map a PVC
per, with each being on a distinct network.  When/If IPX is supported
subinterfaces can be used with different frame types as well. Which
would require a bit more work. :)  IMHO the 'ifconfig alias' feature
is more of the "I want more than one ip address on this NIC", and that
is it.  Perhaps I would be less unhappy with it, if ifconfig would 
print aliases.  Having to use 'netstat -i' to find addresses that you
added with ifconfig doesn't seem intuitive to me.

> There's a very noticeable lack of consensus that this is, in fact, the
> `right' thing to do. It's in some ways analagous to cloning devices;
> with the difference that there's no real device node for an Ethernet.
> Wouldn't this break a nontrivial amount of existing code that iterates
> over interfaces -- and to little gain?  You seem to be assuming it's
> used for aliases; have you considered non-IP protocol stacks?

Yes, and if different frame types are to be supported, how is that done?

> Last, I haven't looked at it, but if alias syntax is a problem, surely
> we should look at fixing ifconfig's parser before we decide to change
> the kernel??

Well, I didn't specifically mean the syntax.  As I mentioned above
the requirement of using 'netstat -i' to find addresses doesn't make
a lot of sense.  Also it allows you to put aliases on without specifying
a netmask, and doesn't pick the correct mask, even if you have already
configured an address on the same subnet.  This appears to work, but
causes some unusual routing problems.  While subinterfaces don't solve
this specifically, at least you would see everything with 'ifconfig -a'.

I'm not completely convinced subinterfaces would be the "Right Thing",
but since in "Real Life" I manage a large cisco router network, I 
understand how they are pretty a requirement for switched networks.

-Andrew
-- 
-----------------------------------------------------------------
Andrew Gillham                            | This space left blank
gillham@whirlpool.com                     | inadvertently.
I speak for myself, not for my employer.  | Contact the publisher.