* 2.6.20/2.6.20-rc7 : ethX renumbered
@ 2007-02-11 11:28 Paul Rolland
2007-02-11 12:54 ` [PATCH] keep track of network interface renaming Olaf Hering
2007-02-11 13:04 ` 2.6.20/2.6.20-rc7 : ethX renumbered Benoit Boissinot
0 siblings, 2 replies; 13+ messages in thread
From: Paul Rolland @ 2007-02-11 11:28 UTC (permalink / raw)
To: 'Linux Kernel Mailing List'; +Cc: rol
[-- Attachment #1: Type: text/plain, Size: 2064 bytes --]
Hello,
I'm facing something quite strange... When booting one of these kernels
(it's a new machine, I've not been running older kernels), the boot message
says :
ACPI: PCI Interrupt 0000:04:00.0[A] -> GSI 19 (level, low) -> IRQ 19
sky2 v1.10 addr 0xff8fc000 irq 19 Yukon-EC (0xb6) rev 2
sky2 eth0: addr 00:18:f3:e0:5d:d4
ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 16 (level, low) -> IRQ 16
sky2 v1.10 addr 0xff7fc000 irq 16 Yukon-EC (0xb6) rev 2
sky2 eth1: addr 00:18:f3:e0:36:fd
So, I'm expecting two interfaces : eth0 and eth1
Unfortunately, at the end of the boot process, I can find eth1 and eth2,
something/somewhat/someone has renumbered them ;
eth1 Link encap:Ethernet HWaddr 00:18:F3:E0:36:FD
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:16
eth2 Link encap:Ethernet HWaddr 00:18:F3:E0:5D:D4
inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::218:f3ff:fee0:5dd4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:42780 errors:0 dropped:0 overruns:0 frame:0
TX packets:25519 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:61859841 (58.9 MiB) TX bytes:2031644 (1.9 MiB)
Interrupt:19
This does also occurs when I boot in single user mode, so I did a quick check
at the processes running then, and found udevd, but there is no reference to
ethX in the configuration files, only veth :
root@riri:/Kernels/External# cd /etc/udev/
root@riri:/etc/udev# grep -r eth *
rules.d/90-modprobe.rules:ENV{VIO_TYPE}=="network",
RUN+="/sbin/modprobe -Qba ibmveth"
rules.d/90-modprobe.rules:ENV{VIO_TYPE}=="vlan",
RUN+="/sbin/modprobe -Qba iseries_veth"
Is it something expected ? Or is it because Sky2 is still EXPERIMENTAL ?
Regards,
Paul
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3715 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH] keep track of network interface renaming
2007-02-11 11:28 2.6.20/2.6.20-rc7 : ethX renumbered Paul Rolland
@ 2007-02-11 12:54 ` Olaf Hering
2007-02-11 13:29 ` Paul Rolland
2007-02-11 17:55 ` David Miller
2007-02-11 13:04 ` 2.6.20/2.6.20-rc7 : ethX renumbered Benoit Boissinot
1 sibling, 2 replies; 13+ messages in thread
From: Olaf Hering @ 2007-02-11 12:54 UTC (permalink / raw)
To: Paul Rolland, Andrew Morton; +Cc: 'Linux Kernel Mailing List', rol
On Sun, Feb 11, Paul Rolland wrote:
> I'm facing something quite strange... When booting one of these kernels
> (it's a new machine, I've not been running older kernels), the boot message
> says :
>
> ACPI: PCI Interrupt 0000:04:00.0[A] -> GSI 19 (level, low) -> IRQ 19
> sky2 v1.10 addr 0xff8fc000 irq 19 Yukon-EC (0xb6) rev 2
> sky2 eth0: addr 00:18:f3:e0:5d:d4
> ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 16 (level, low) -> IRQ 16
> sky2 v1.10 addr 0xff7fc000 irq 16 Yukon-EC (0xb6) rev 2
> sky2 eth1: addr 00:18:f3:e0:36:fd
>
> So, I'm expecting two interfaces : eth0 and eth1
>
> Unfortunately, at the end of the boot process, I can find eth1 and eth2,
Unfortunately, this patch was not applied to mainline last year.
Maybe this year.
Keep track about which network interface names were renamed after the
network device driver printed its banner.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
--- linux-2.6.19.orig/net/core/dev.c
+++ linux-2.6.19/net/core/dev.c
@@ -749,7 +749,11 @@ int dev_change_name(struct net_device *d
else if (__dev_get_by_name(newname))
return -EEXIST;
else
+ {
+ if (strncmp(newname, dev->name, IFNAMSIZ))
+ printk(KERN_INFO "%s renamed to %s\n", dev->name, newname);
strlcpy(dev->name, newname, IFNAMSIZ);
+ }
err = class_device_rename(&dev->class_dev, dev->name);
if (!err) {
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [PATCH] keep track of network interface renaming
2007-02-11 12:54 ` [PATCH] keep track of network interface renaming Olaf Hering
@ 2007-02-11 13:29 ` Paul Rolland
2007-02-11 17:55 ` David Miller
1 sibling, 0 replies; 13+ messages in thread
From: Paul Rolland @ 2007-02-11 13:29 UTC (permalink / raw)
To: 'Olaf Hering', 'Paul Rolland', 'Andrew Morton'
Cc: 'Linux Kernel Mailing List'
Excellent Olaf !
Yes, I got a "eth0 renamed to eth2".
> Unfortunately, this patch was not applied to mainline last year.
> Maybe this year.
Seconded, you have my vote for this !
Regards,
Paul
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] keep track of network interface renaming
2007-02-11 12:54 ` [PATCH] keep track of network interface renaming Olaf Hering
2007-02-11 13:29 ` Paul Rolland
@ 2007-02-11 17:55 ` David Miller
[not found] ` <20070211182704.GA14021@avocado.homenet>
1 sibling, 1 reply; 13+ messages in thread
From: David Miller @ 2007-02-11 17:55 UTC (permalink / raw)
To: olaf; +Cc: rol, akpm, linux-kernel, rol
From: Olaf Hering <olaf@aepfle.de>
Date: Sun, 11 Feb 2007 13:54:23 +0100
> Keep track about which network interface names were renamed after the
> network device driver printed its banner.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
This is kernel log clutter.
You can ask the kernel for the list of interfaces, and
use even ethtool to ask what driver each interface is
associated with.
The patch wasn't applied because it really is not necessary.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 2.6.20/2.6.20-rc7 : ethX renumbered
2007-02-11 11:28 2.6.20/2.6.20-rc7 : ethX renumbered Paul Rolland
2007-02-11 12:54 ` [PATCH] keep track of network interface renaming Olaf Hering
@ 2007-02-11 13:04 ` Benoit Boissinot
2007-02-11 13:14 ` Paul Rolland
1 sibling, 1 reply; 13+ messages in thread
From: Benoit Boissinot @ 2007-02-11 13:04 UTC (permalink / raw)
To: rol; +Cc: Linux Kernel Mailing List, rol
On 2/11/07, Paul Rolland <rol@witbe.net> wrote:
> Hello,
>
> I'm facing something quite strange... When booting one of these kernels
> (it's a new machine, I've not been running older kernels), the boot message
> says :
>
> ACPI: PCI Interrupt 0000:04:00.0[A] -> GSI 19 (level, low) -> IRQ 19
> sky2 v1.10 addr 0xff8fc000 irq 19 Yukon-EC (0xb6) rev 2
> sky2 eth0: addr 00:18:f3:e0:5d:d4
> ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 16 (level, low) -> IRQ 16
> sky2 v1.10 addr 0xff7fc000 irq 16 Yukon-EC (0xb6) rev 2
> sky2 eth1: addr 00:18:f3:e0:36:fd
>
> So, I'm expecting two interfaces : eth0 and eth1
>
> Unfortunately, at the end of the boot process, I can find eth1 and eth2,
> something/somewhat/someone has renumbered them ;
usually distro enable persistent interface naming with udev, check
/etc/iftab and see if you have something like
/etc/udev/something-iftab.rules
regards,
Benoit
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: 2.6.20/2.6.20-rc7 : ethX renumbered
2007-02-11 13:04 ` 2.6.20/2.6.20-rc7 : ethX renumbered Benoit Boissinot
@ 2007-02-11 13:14 ` Paul Rolland
2007-02-11 13:35 ` Paul Rolland
0 siblings, 1 reply; 13+ messages in thread
From: Paul Rolland @ 2007-02-11 13:14 UTC (permalink / raw)
To: 'Benoit Boissinot', rol, 'Olaf Hering'
Cc: 'Linux Kernel Mailing List'
Hello Benoit,
> usually distro enable persistent interface naming with udev, check
> /etc/iftab and see if you have something like
> /etc/udev/something-iftab.rules
Found this :
# This file assigns persistent names to network interfaces.
# See iftab(5) for syntax.
eth0 mac 00:11:d8:a9:c0:c2 arp 1
ra0 mac 00:11:d8:b9:27:7e arp 1
As these are no MAC on my machine, I suspect this is the reason for the
renaming.
I'm trying Olaf's patch to check the message is printed, and next boot
is without this crap in this /etc/iftab file.
Regards,
Paul
^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <fa.vON9rghc4zb2B4B1Ub/ZAaRY2v8@ifi.uio.no>]
* [PATCH] keep track of network interface renaming
@ 2006-08-15 16:56 Olaf Hering
2006-08-16 2:35 ` Patrick McHardy
0 siblings, 1 reply; 13+ messages in thread
From: Olaf Hering @ 2006-08-15 16:56 UTC (permalink / raw)
To: netdev
Keep track about which network interface names were renamed after the
network device driver printed its banner. Previous kernel names will
be reused when new interfaces get registerd.
Recent udev scripts implement a stable kernel device name for network
interfaces.
This printk avoids confusion about what network hardware maps to what
kernel interface in later driver or network stack messages.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
net/core/dev.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: linux-2.6.18-rc4/net/core/dev.c
===================================================================
--- linux-2.6.18-rc4.orig/net/core/dev.c
+++ linux-2.6.18-rc4/net/core/dev.c
@@ -738,8 +738,11 @@ int dev_change_name(struct net_device *d
}
else if (__dev_get_by_name(newname))
return -EEXIST;
- else
+ else {
+ if (strcmp(newname, dev->name))
+ printk(KERN_INFO "%s renamed to %s\n", dev->name, newname);
strlcpy(dev->name, newname, IFNAMSIZ);
+ }
err = class_device_rename(&dev->class_dev, dev->name);
if (!err) {
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] keep track of network interface renaming
2006-08-15 16:56 Olaf Hering
@ 2006-08-16 2:35 ` Patrick McHardy
0 siblings, 0 replies; 13+ messages in thread
From: Patrick McHardy @ 2006-08-16 2:35 UTC (permalink / raw)
To: Olaf Hering; +Cc: netdev
Olaf Hering wrote:
> Keep track about which network interface names were renamed after the
> network device driver printed its banner. Previous kernel names will
> be reused when new interfaces get registerd.
> Recent udev scripts implement a stable kernel device name for network
> interfaces.
> This printk avoids confusion about what network hardware maps to what
> kernel interface in later driver or network stack messages.
I think it would be even easier to follow, especially with many devices,
if some stable identifier was included in messages relating to network
devices, like ifindex or maybe the LL address. And it would avoid
spamming the ringbuffer for people making use of this to implement
alternative naming schemes.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2007-02-11 22:34 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-11 11:28 2.6.20/2.6.20-rc7 : ethX renumbered Paul Rolland
2007-02-11 12:54 ` [PATCH] keep track of network interface renaming Olaf Hering
2007-02-11 13:29 ` Paul Rolland
2007-02-11 17:55 ` David Miller
[not found] ` <20070211182704.GA14021@avocado.homenet>
2007-02-11 18:28 ` David Miller
2007-02-11 22:35 ` Tilman Schmidt
2007-02-11 13:04 ` 2.6.20/2.6.20-rc7 : ethX renumbered Benoit Boissinot
2007-02-11 13:14 ` Paul Rolland
2007-02-11 13:35 ` Paul Rolland
[not found] <fa.vON9rghc4zb2B4B1Ub/ZAaRY2v8@ifi.uio.no>
[not found] ` <fa.EIATc7QlHJ5coYaEARiq54/4h6A@ifi.uio.no>
[not found] ` <fa.rECiNcG8qmgC5L7se1aXLWosf4E@ifi.uio.no>
[not found] ` <fa./pMesnnnb80P5K2iQYUkxeYCpXA@ifi.uio.no>
2007-02-11 19:20 ` [PATCH] keep track of network interface renaming Robert Hancock
2007-02-11 21:41 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2006-08-15 16:56 Olaf Hering
2006-08-16 2:35 ` Patrick McHardy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.