* Re: NICs trading places ?
2003-03-28 22:10 Dave Jones
@ 2003-03-28 22:14 ` Jeff Garzik
2003-03-28 22:15 ` jjs
` (3 subsequent siblings)
4 siblings, 0 replies; 19+ messages in thread
From: Jeff Garzik @ 2003-03-28 22:14 UTC (permalink / raw)
To: Dave Jones, Linux Kernel; +Cc: davem
On Fri, Mar 28, 2003 at 10:10:37PM +0000, Dave Jones wrote:
> I just upgraded a box with 2 NICs in it to 2.5.66, and found
> that what was eth0 in 2.4 is now eth1, and vice versa.
> Is this phenomenon intentional ? documented ?
> What caused it to do this ?
That's a bug that no one has tracked down yet.
Jamal reported it, too.
ethX numbering shouldn't be changing without a good reason...
Jeff
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: NICs trading places ?
2003-03-28 22:10 Dave Jones
2003-03-28 22:14 ` Jeff Garzik
@ 2003-03-28 22:15 ` jjs
2003-03-28 22:25 ` Joel Becker
` (2 subsequent siblings)
4 siblings, 0 replies; 19+ messages in thread
From: jjs @ 2003-03-28 22:15 UTC (permalink / raw)
To: linux kernel
That's bitten me several times, not
just 2.4 -> 2.5 but also within different
versions of 2.4-RHL :-(
I've head you can spell out pci IDs
in modules.conf to nail it down but
I haven't gotten around to trying it -
Joe
Dave Jones wrote:
>I just upgraded a box with 2 NICs in it to 2.5.66, and found
>that what was eth0 in 2.4 is now eth1, and vice versa.
>Is this phenomenon intentional ? documented ?
>What caused it to do this ?
>
>The box in question has a DEC Tulip and a 3com 3c905,
>but I imagine this would affect any system with >1 NIC
>of different vendors/drivers ?
>
> Dave
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>
>
>
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: NICs trading places ?
2003-03-28 22:10 Dave Jones
2003-03-28 22:14 ` Jeff Garzik
2003-03-28 22:15 ` jjs
@ 2003-03-28 22:25 ` Joel Becker
2003-03-28 22:27 ` Randy.Dunlap
2003-03-28 22:34 ` Dave Jones
2003-03-28 22:48 ` Andries Brouwer
2003-03-28 23:30 ` Dax Kelson
4 siblings, 2 replies; 19+ messages in thread
From: Joel Becker @ 2003-03-28 22:25 UTC (permalink / raw)
To: Dave Jones, Linux Kernel
On Fri, Mar 28, 2003 at 10:10:37PM +0000, Dave Jones wrote:
> I just upgraded a box with 2 NICs in it to 2.5.66, and found
> that what was eth0 in 2.4 is now eth1, and vice versa.
> Is this phenomenon intentional ? documented ?
> What caused it to do this ?
Is this a Red Hat system? I encountered the same thing on a
RHAS system. Basically, Anaconda had controlled the module load order
in /etc/modules.conf for 2.4. Because my network drivers were built in
in 2.5, they loaded in the order of the compile-in. This turned out to
be the reverse order.
Swapping eth0 and eth1 in /etc/modules.conf fixed the problem
for me. This is not to say it is "Red Hat's fault" or that this is
entirely the same situation, but I figured this would make a good
datapoint.
Joel
--
"It is not the function of our government to keep the citizen from
falling into error; it is the function of the citizen to keep the
government from falling into error."
- Robert H. Jackson
Joel Becker
Senior Member of Technical Staff
Oracle Corporation
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: NICs trading places ?
2003-03-28 22:25 ` Joel Becker
@ 2003-03-28 22:27 ` Randy.Dunlap
2003-03-28 22:34 ` Dave Jones
1 sibling, 0 replies; 19+ messages in thread
From: Randy.Dunlap @ 2003-03-28 22:27 UTC (permalink / raw)
To: Joel Becker; +Cc: davej, linux-kernel
On Fri, 28 Mar 2003 14:25:25 -0800 Joel Becker <Joel.Becker@oracle.com> wrote:
| On Fri, Mar 28, 2003 at 10:10:37PM +0000, Dave Jones wrote:
| > I just upgraded a box with 2 NICs in it to 2.5.66, and found
| > that what was eth0 in 2.4 is now eth1, and vice versa.
| > Is this phenomenon intentional ? documented ?
| > What caused it to do this ?
|
| Is this a Red Hat system? I encountered the same thing on a
| RHAS system. Basically, Anaconda had controlled the module load order
| in /etc/modules.conf for 2.4. Because my network drivers were built in
| in 2.5, they loaded in the order of the compile-in. This turned out to
| be the reverse order.
| Swapping eth0 and eth1 in /etc/modules.conf fixed the problem
| for me. This is not to say it is "Red Hat's fault" or that this is
| entirely the same situation, but I figured this would make a good
| datapoint.
I saw this same problem at home last night, not on a RH system,
so I think it's just a 2.5.lately thing.
--
~Randy
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: NICs trading places ?
2003-03-28 22:25 ` Joel Becker
2003-03-28 22:27 ` Randy.Dunlap
@ 2003-03-28 22:34 ` Dave Jones
1 sibling, 0 replies; 19+ messages in thread
From: Dave Jones @ 2003-03-28 22:34 UTC (permalink / raw)
To: Joel Becker; +Cc: Linux Kernel
On Fri, Mar 28, 2003 at 02:25:25PM -0800, Joel Becker wrote:
> Is this a Red Hat system? I encountered the same thing on a
> RHAS system.
I've seen the same issue on a SuSE box, and a Debian box.
> Basically, Anaconda had controlled the module load order
> in /etc/modules.conf for 2.4. Because my network drivers were built in
> in 2.5, they loaded in the order of the compile-in. This turned out to
> be the reverse order.
NICs built into kernel in both 2.4 and 2.5.
Dave
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: NICs trading places ?
2003-03-28 22:10 Dave Jones
` (2 preceding siblings ...)
2003-03-28 22:25 ` Joel Becker
@ 2003-03-28 22:48 ` Andries Brouwer
2003-03-28 23:02 ` Andrew Morton
2003-03-29 9:20 ` Marc Zyngier
2003-03-28 23:30 ` Dax Kelson
4 siblings, 2 replies; 19+ messages in thread
From: Andries Brouwer @ 2003-03-28 22:48 UTC (permalink / raw)
To: Dave Jones, Linux Kernel; +Cc: jgarzik, aeb
On Fri, Mar 28, 2003 at 10:10:37PM +0000, Dave Jones wrote:
> I just upgraded a box with 2 NICs in it to 2.5.66, and found
> that what was eth0 in 2.4 is now eth1, and vice versa.
> Is this phenomenon intentional ? documented ?
> What caused it to do this ?
>
> The box in question has a DEC Tulip and a 3com 3c905,
> but I imagine this would affect any system with >1 NIC
> of different vendors/drivers ?
Intentional? No.
Documented? I suppose you can find complaints from others
mentioning the same thing.
Cause? eth discovery order is not well-defined.
Once or twice I have submitted patches to rectify.
They help for a while and then someone breaks things again.
I am not quite sure, apologies in case I misremember, but
maybe the most recent breakage was caused by Marc Zyngier
with EISA bus changes.
Google turns up
http://www.uwsg.iu.edu/hypermail/linux/kernel/0301.2/1139.html
Let me add the patch referred to there. Maybe Jeff likes it this time.
Andries
diff -u --recursive --new-file -X /linux/dontdiff a/drivers/net/3c59x.c b/drivers/net/3c59x.c
--- a/drivers/net/3c59x.c Sat Jan 18 23:54:39 2003
+++ b/drivers/net/3c59x.c Tue Jan 21 18:36:25 2003
@@ -1439,8 +1439,14 @@
acpi_set_WOL(dev);
}
retval = register_netdev(dev);
- if (retval == 0)
+ if (retval == 0) {
+ int i;
+ printk("%s: 3c59x, address", dev->name);
+ for (i = 0; i < 6; i++)
+ printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]);
+ printk("\n");
return 0;
+ }
free_ring:
pci_free_consistent(pdev,
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: NICs trading places ?
2003-03-28 22:48 ` Andries Brouwer
@ 2003-03-28 23:02 ` Andrew Morton
2003-03-28 23:20 ` Andries Brouwer
2003-03-29 9:20 ` Marc Zyngier
1 sibling, 1 reply; 19+ messages in thread
From: Andrew Morton @ 2003-03-28 23:02 UTC (permalink / raw)
To: Andries Brouwer; +Cc: davej, linux-kernel, jgarzik, aeb
Andries Brouwer <aebr@win.tue.nl> wrote:
>
> Cause? eth discovery order is not well-defined.
It's a continual irritation.
> + if (retval == 0) {
> + int i;
> + printk("%s: 3c59x, address", dev->name);
> + for (i = 0; i < 6; i++)
> + printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]);
> + printk("\n");
> return 0;
> + }
hm. typing `ifconfig' shows this information.
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: NICs trading places ?
2003-03-28 23:02 ` Andrew Morton
@ 2003-03-28 23:20 ` Andries Brouwer
2003-03-28 23:41 ` Greg KH
0 siblings, 1 reply; 19+ messages in thread
From: Andries Brouwer @ 2003-03-28 23:20 UTC (permalink / raw)
To: Andrew Morton; +Cc: davej, linux-kernel, jgarzik, aeb
On Fri, Mar 28, 2003 at 03:02:34PM -0800, Andrew Morton wrote:
> Andries Brouwer <aebr@win.tue.nl> wrote:
>
> > + if (retval == 0) {
> > + int i;
> > + printk("%s: 3c59x, address", dev->name);
> > + for (i = 0; i < 6; i++)
> > + printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]);
> > + printk("\n");
> > return 0;
> > + }
>
> hm. typing `ifconfig' shows this information.
I like uniformity.
Either all eth cards should have their address in dmesg, or none.
Almost all do.
And: ifconfig does not give the card types.
So presently one needs both boot messages and ifconfig.
And: in some situations the system does not boot because of
eth numbering mixup, and one never gets the opportunity to
ask ifconfig.
Andries
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: NICs trading places ?
2003-03-28 23:20 ` Andries Brouwer
@ 2003-03-28 23:41 ` Greg KH
2003-03-28 23:56 ` Jeff Garzik
0 siblings, 1 reply; 19+ messages in thread
From: Greg KH @ 2003-03-28 23:41 UTC (permalink / raw)
To: Andries Brouwer; +Cc: Andrew Morton, davej, linux-kernel, jgarzik, aeb
On Sat, Mar 29, 2003 at 12:20:22AM +0100, Andries Brouwer wrote:
>
> And: ifconfig does not give the card types.
> So presently one needs both boot messages and ifconfig.
>
> And: in some situations the system does not boot because of
> eth numbering mixup, and one never gets the opportunity to
> ask ifconfig.
ifconfig can bind cards to devices based on mac addresses.
/sbin/hotplug can also be used for this.
I recommend doing this for anyone with more than one nic card in their
machine.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: NICs trading places ?
2003-03-28 23:41 ` Greg KH
@ 2003-03-28 23:56 ` Jeff Garzik
2003-03-29 0:03 ` Greg KH
0 siblings, 1 reply; 19+ messages in thread
From: Jeff Garzik @ 2003-03-28 23:56 UTC (permalink / raw)
To: Greg KH; +Cc: Andries Brouwer, Andrew Morton, davej, linux-kernel, aeb
Greg KH wrote:
> On Sat, Mar 29, 2003 at 12:20:22AM +0100, Andries Brouwer wrote:
>
>>And: ifconfig does not give the card types.
>>So presently one needs both boot messages and ifconfig.
>>
>>And: in some situations the system does not boot because of
>>eth numbering mixup, and one never gets the opportunity to
>>ask ifconfig.
>
>
> ifconfig can bind cards to devices based on mac addresses.
> /sbin/hotplug can also be used for this.
>
> I recommend doing this for anyone with more than one nic card in their
> machine.
Actually nameif(8) is the preferred way of doing this.
Jeff
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: NICs trading places ?
2003-03-28 23:56 ` Jeff Garzik
@ 2003-03-29 0:03 ` Greg KH
0 siblings, 0 replies; 19+ messages in thread
From: Greg KH @ 2003-03-29 0:03 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andries Brouwer, Andrew Morton, davej, linux-kernel, aeb
On Fri, Mar 28, 2003 at 06:56:22PM -0500, Jeff Garzik wrote:
> Greg KH wrote:
> >On Sat, Mar 29, 2003 at 12:20:22AM +0100, Andries Brouwer wrote:
> >
> >>And: ifconfig does not give the card types.
> >>So presently one needs both boot messages and ifconfig.
> >>
> >>And: in some situations the system does not boot because of
> >>eth numbering mixup, and one never gets the opportunity to
> >>ask ifconfig.
> >
> >
> >ifconfig can bind cards to devices based on mac addresses.
> >/sbin/hotplug can also be used for this.
> >
> >I recommend doing this for anyone with more than one nic card in their
> >machine.
>
>
> Actually nameif(8) is the preferred way of doing this.
Oops, sorry, that's what I meant. Call nameif in a /sbin/hotplug script
when the network interface is registered.
greg k-h
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: NICs trading places ?
2003-03-28 22:48 ` Andries Brouwer
2003-03-28 23:02 ` Andrew Morton
@ 2003-03-29 9:20 ` Marc Zyngier
1 sibling, 0 replies; 19+ messages in thread
From: Marc Zyngier @ 2003-03-29 9:20 UTC (permalink / raw)
To: Andries Brouwer; +Cc: Dave Jones, Linux Kernel, jgarzik, aeb
>>>>> "Andries" == Andries Brouwer <aebr@win.tue.nl> writes:
Andries> I am not quite sure, apologies in case I misremember, but
Andries> maybe the most recent breakage was caused by Marc Zyngier
Andries> with EISA bus changes.
Well, it is not exactly related to EISA bus, although part of the same
patch.
The real problem is that some old drivers are still initialized from
Space.c (they simply do not know about init_etherdev (NULL, ...),
after all these years). So yes, I broke 3c509 in this respect. I also
broke znet if that matters. Oh, and the EISA part of depca in the AC
tree.
So the questions are :
- Should Space.c die ? I think so.
- Should 2.5 be the place and time to kill it ? I also think so.
I know it is a pain for most of us to have interfaces being
renumbered. But relying on something as static as Space.c is the wrong
answer IMHO.
M.
--
Places change, faces change. Life is so very strange.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: NICs trading places ?
2003-03-28 22:10 Dave Jones
` (3 preceding siblings ...)
2003-03-28 22:48 ` Andries Brouwer
@ 2003-03-28 23:30 ` Dax Kelson
2003-03-28 23:42 ` Sean Neakums
4 siblings, 1 reply; 19+ messages in thread
From: Dax Kelson @ 2003-03-28 23:30 UTC (permalink / raw)
To: Dave Jones; +Cc: Linux Kernel
On Fri, 28 Mar 2003, Dave Jones wrote:
> I just upgraded a box with 2 NICs in it to 2.5.66, and found
> that what was eth0 in 2.4 is now eth1, and vice versa.
> Is this phenomenon intentional ? documented ?
> What caused it to do this ?
I've seen the same thing for 5+ years. Multiple things can
trigger it, eg:
Always having your NIC drivers compiled in, and then moving between
different kernel versions.
Going from modular NIC drivers to compiled in drivers can bite you.
Isn't life fun.
Dax
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: NICs trading places ?
2003-03-28 23:30 ` Dax Kelson
@ 2003-03-28 23:42 ` Sean Neakums
0 siblings, 0 replies; 19+ messages in thread
From: Sean Neakums @ 2003-03-28 23:42 UTC (permalink / raw)
To: linux-kernel
commence Dax Kelson quotation:
> On Fri, 28 Mar 2003, Dave Jones wrote:
>
>> I just upgraded a box with 2 NICs in it to 2.5.66, and found
>> that what was eth0 in 2.4 is now eth1, and vice versa.
>> Is this phenomenon intentional ? documented ?
>> What caused it to do this ?
>
> I've seen the same thing for 5+ years. Multiple things can
> trigger it, eg:
>
> Always having your NIC drivers compiled in, and then moving between
> different kernel versions.
>
> Going from modular NIC drivers to compiled in drivers can bite you.
>
> Isn't life fun.
Something I have been meaning to write as soon as I get bitten by this
myself is a script that uses the "ip link set X name Y" command
(possibly in conjuction with a MAC-to-name map, or else just a simple
sort) to name the interfaces consistently.
--
Sean Neakums - <sneakums@zork.net>
^ permalink raw reply [flat|nested] 19+ messages in thread