All of lore.kernel.org
 help / color / mirror / Atom feed
* [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; 9+ 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] 9+ messages in thread
* 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
  0 siblings, 1 reply; 9+ 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] 9+ messages in thread
[parent not found: <fa.vON9rghc4zb2B4B1Ub/ZAaRY2v8@ifi.uio.no>]

end of thread, other threads:[~2007-02-11 22:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-15 16:56 [PATCH] keep track of network interface renaming Olaf Hering
2006-08-16  2:35 ` Patrick McHardy
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
     [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       ` Robert Hancock
2007-02-11 21:41         ` David Miller

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.