Lewis Donzis
12/06/2008 10:16 AM
post18071
|
I know this has been batted around a bit already, and I'm trying to be objective about the whole thing, but I can't see
the grand purpose behind changing interface nomenclature in io-pkt.
I'm trying to understand, why is it so desirable to have interface names based on chip architecture rather than the old
sequential numbering method? (Not to mention that someone felt it necessary to add device name mapping capability in
select areas.)
As this pertains to our own platforms, the new architecture seems quite problematic. We have a platform with multiple
network interfaces that the end-user configures sort of like a router, i.e., specifying an interface name and giving it
an IP address, speed, duplex, etc. The interfaces are currently named en0-enX where X depends on the model, but can go
as high as 9.
We have gone to some lengths to always ensure that the interface names are sequentially numbered across the system and
have gone so far as to actually silk-screen the names en0, en1, etc. on the front panel.
Over the years, we've used four different chip families, and early next year, we'll be adding 10G Ethernet. So with
this new architecture, not only can we not generically specify the interface names, on some platforms, there is a
mixture of architectures, e.g., some speedo ports and some Intel gigabit ports.
Obviously, the physical labelling of the ports will be incorrect, not to mention that it's very difficult to explain
what the actual interface names will be to a customer! In some environments, if someone replaces, for example, a
Broadcom card with an Intel card, the functionality is the same, but the interface name changes and therefore the whole
configuration may be invalid including "sliding" some of the interface names around. And changing the interface names
depending on whether the driver is old or new is even harder to explain to the end user.
By comparison, on a Cisco router, they do specify interface names based on the physical type of port (e.g., Ethernet,
FastEthernet, GigabitEthernet, TenGigabitEthernet), but never based on the underlying MAC architecture. However, even
this is sort of academic because they also specify a slot/port number and they don't generally mix different types of
ports on a slot.
Anyway, point being, I would have understood naming interfaces based on their physical type/speed a lot better than
naming them based on the underlying software model.
It sure would be nice if every driver supported an option to specify its prefix name. Then, if people want to call
everything "en" they could do that, or if they want them named based on speed, they could do that too, or if they like
the current model based on MAC type, that would still be available. Seems like the best of all worlds?
While we have no particular use for the new naming convention, I can understand that some people may think this is a
wonderful new feature, although I have yet to understand why. My only request is that there should be a fully
functional method of using the old names. (If I understand it correctly, the current name mapping function applies only
to certain types of usage and is not universal.)
Thanks for your consideration,
lew
|
|
|
Robert Craig
12/06/2008 11:22 AM
post18074
|
Hi Lew:
To be honest, the main reason why the interface naming was changed was because of the way that we've decided to stay
as closely as possible to the NetBSD way of doing things so that we don't end up with a huge porting effort every time a
new version of NetBSD comes out. This is the way that NetBSD names things, so that's what we do. There was much
gnashing of teeth internally about this and there were definitely conflicting opinions about the appropriateness of
either naming strategy.
After such an impassioned plea, though, how could we NOT look into it. I've got a funny feeling that it's probably
not a big deal to add in a generic driver option to override the given prefix name. I'll let you know what we decide.
After all, that's half of what these forums are about... Making sure that we have customers who can do what they want
to with what we give them.
Thanks for the input,
Robert.
|
|
|
Andrew Boyd(deleted)
12/06/2008 12:57 PM
post18075
|
> There was much gnashing of teeth internally about
> this and there were definitely conflicting opinions
> about the appropriateness of either naming strategy.
Funny story: a few months ago, everybody in the networking
group but me was out of the office for a couple days. I
forget why - shriners convention, or some such, and I had
forgetten my fez at home.
Anyways, here was my golden opportunity. Cackling with
glee, I created a PR that the io-pkt interface names were unnecessarily
different from the io-net names, and giggling
like a school-girl, I committed the changes to make the driver
names in io-pkt en0, en1, etc just like io-net.
See, I was hoping that feelings on this subject wouldn't
be strong enough, and there would be enough inertia,
that my change would stick. No dice. Everyone got home
from the Shriner's convention, the fertilzer hit the rotating
cooling device, and I had to change the driver names back
to the BSD way. Oh well. You can't say I didn't try!
However, Sean is just as crafty as I am. For example, I
just started up io-pkt-v4-hc with the i82544 driver, and
when I type
# ifconfig wm0
there is the interface. However, if I type
# ifconfig en0
gosh, there is the same interface.
So, even if you AREN'T running the shim, Sean has aliased
the interfaces so you can still use en0, en1 in your
config scripts :-)
--
aboyd
|
|
|
Robert Craig
12/11/2008 2:10 PM
post18443
|
We just added in a generic "name=" option that's picked up during the
device attach. This let's you provide an interface name of your
choosing to override the default name. This unfortunately will NOT work
with io-net style drivers because of the way that the option parsing is
currently handled in the io-net drivers (you will end up with an
"unknown option" failure and the driver won't load).
E.g.
io-pkt-v4 -di82544 name=en
Starts the devnp-i82544 driver with the same prefixing convention as
io-net (enXX).
This also lets you do interface naming based on functionality.
e.g
io-pkt-v4 -di82544 pci=0,name=wan
Changes where made to sys/device_qnx.c for those who want to build a
version of the stack from the release branch with only this option
added.
They'll be rolled out "officially" with our 6.4.1 release.
Robert.
-----Original Message-----
From: Andrew Boyd [mailto:community-noreply@qnx.com]
Sent: Saturday, December 06, 2008 12:58 PM
To: drivers-networking
Subject: RE: more on device names
> There was much gnashing of teeth internally about this and there were
> definitely conflicting opinions about the appropriateness of either
> naming strategy.
Funny story: a few months ago, everybody in the networking group but me
was out of the office for a couple days. I forget why - shriners
convention, or some such, and I had forgetten my fez at home.
Anyways, here was my golden opportunity. Cackling with glee, I created
a PR that the io-pkt interface names were unnecessarily different from
the io-net names, and giggling like a school-girl, I committed the
changes to make the driver names in io-pkt en0, en1, etc just like
io-net.
See, I was hoping that feelings on this subject wouldn't be strong
enough, and there would be enough inertia, that my change would stick.
No dice. Everyone got home from the Shriner's convention, the fertilzer
hit the rotating cooling device, and I had to change the driver names
back to the BSD way. Oh well. You can't say I didn't try!
However, Sean is just as crafty as I am. For example, I just started up
io-pkt-v4-hc with the i82544 driver, and when I type
# ifconfig wm0
there is the interface. However, if I type
# ifconfig en0
gosh, there is the same interface.
So, even if you AREN'T running the shim, Sean has aliased the interfaces
so you can still use en0, en1 in your config scripts :-)
--
aboyd
_______________________________________________
Networking Drivers
http://community.qnx.com/sf/go/post18075
|
|
|
Lewis Donzis
|
Re: RE: more on device names
|
Lewis Donzis
12/12/2008 1:17 AM
post18473
|
Re: RE: more on device names
That's awfully nice of you, thanks!
lew
|
|
|
Robert Craig
|
RE: RE: more on device names
|
Robert Craig
12/12/2008 8:54 AM
post18486
|
RE: RE: more on device names
Just seemed to be the Right Thing To Do. :)
Robert.
-----Original Message-----
From: Lewis Donzis [mailto:community-noreply@qnx.com]
Sent: Friday, December 12, 2008 1:17 AM
To: drivers-networking
Subject: Re: RE: more on device names
That's awfully nice of you, thanks!
lew
_______________________________________________
Networking Drivers
http://community.qnx.com/sf/go/post18473
|
|
|
Lewis Donzis
|
Re: RE: RE: more on device names
|
Lewis Donzis
10/26/2009 11:42 PM
post40729
|
Re: RE: RE: more on device names
Sorry to re-open this, but we've been playing with using the name= option over the last few months and I keep meaning to
write...
It seems like the automatic "en" mapping feature is sometimes getting in the way. Now that you have the name= option,
what do you think about removing all of that other clever logic? If someone wants to use old-style names, they can do
it with the name= option, otherwise, they should stick with the new names.
The problem is that the mapping code appears to be all over the place and might create more problems than it solves.
And there are some other subtle issues. For example, it appears that nicinfo assumes that if a device name starts with
"en" then it must use the old-style devctl. There appears to be no way around this, so if you use name=en with a new
driver, then it breaks nicinfo.
It was nice to provide backward compatibility, but it seems to create some catch-22's.
lew
|
|
|
Lewis Donzis
|
Re: RE: RE: more on device names
|
Lewis Donzis
12/13/2009 1:11 PM
post43752
|
Re: RE: RE: more on device names
Any thoughts on my last post?
Thanks,
lew
|
|
|
|