linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] keep track of network interface renaming
       [not found]     ` <fa./pMesnnnb80P5K2iQYUkxeYCpXA@ifi.uio.no>
@ 2007-02-11 19:20       ` Robert Hancock
  2007-02-11 21:41         ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Hancock @ 2007-02-11 19:20 UTC (permalink / raw)
  To: David Miller, linux-kernel; +Cc: lunz

David Miller wrote:
> From: Jason Lunz <lunz@falooley.org>
> Date: Sun, 11 Feb 2007 13:27:05 -0500
> 
>> On Sun, Feb 11, 2007 at 09:55:52AM -0800, David Miller wrote:
>>> 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.
>> I disagree completely. I'm working right now on a udev-based system that
>> does ethernet device renaming. It's quite difficult when working with
>> udev to tell exactly when and why each interface was renamed, since it's
>> typically done within initramfs where it's difficult to enable debug
>> messages. This printk helps immensely.
> 
> You can listen on a netlink socket for these events if you
> want to see when they occur.

Unfortunately that's not very practical if, as in this case, the 
renaming is being done from an initramfs. Hiding this information as we 
do now is rather user-hostile.

> 
> There is no need for this log message, it is superfluous.

I think the minimal extra output from this is well worth it. If we care 
so much about limiting dmesg output, how about getting rid of all those 
hundreds of "PM: Adding info for" messages in recent kernels..

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] keep track of network interface renaming
  2007-02-11 19:20       ` [PATCH] keep track of network interface renaming Robert Hancock
@ 2007-02-11 21:41         ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2007-02-11 21:41 UTC (permalink / raw)
  To: hancockr; +Cc: linux-kernel, lunz

From: Robert Hancock <hancockr@shaw.ca>
Date: Sun, 11 Feb 2007 13:20:10 -0600

> Unfortunately that's not very practical if, as in this case, the 
> renaming is being done from an initramfs. Hiding this information as we 
> do now is rather user-hostile.

Perhaps you have a point, I'll think about this some more.

But on the other hand note that kernel log messages can scroll away
and get lost, so you cannot really rely upon them for gathering
information which is necessary for properly detecting devices
in userspace or anything like that.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] keep track of network interface renaming
  2007-02-11 18:28       ` David Miller
@ 2007-02-11 22:35         ` Tilman Schmidt
  0 siblings, 0 replies; 7+ messages in thread
From: Tilman Schmidt @ 2007-02-11 22:35 UTC (permalink / raw)
  To: David Miller; +Cc: lunz, olaf, rol, akpm, linux-kernel, rol

[-- Attachment #1: Type: text/plain, Size: 1511 bytes --]

Am 11.02.2007 19:28 schrieb David Miller:
> From: Jason Lunz <lunz@falooley.org>
> Date: Sun, 11 Feb 2007 13:27:05 -0500
> 
>> On Sun, Feb 11, 2007 at 09:55:52AM -0800, David Miller wrote:
>>> 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.
>> I disagree completely. I'm working right now on a udev-based system that
>> does ethernet device renaming. It's quite difficult when working with
>> udev to tell exactly when and why each interface was renamed, since it's
>> typically done within initramfs where it's difficult to enable debug
>> messages. This printk helps immensely.
> 
> You can listen on a netlink socket for these events if you
> want to see when they occur.
> 
> There is no need for this log message, it is superfluous.

I disagree. This message can be very helpful. The problem of network
interfaces being renamed is a real and frequent one. A single message
per interface is tolerable even if you don't actually need it. My
kernel log currently produces well over 400 messages per boot, so if
you want to reduce kernel log clutter, there are lots of other
candidates.

-- 
Tilman Schmidt                          E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 253 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] keep track of network interface renaming
       [not found]     ` <20070211182704.GA14021@avocado.homenet>
@ 2007-02-11 18:28       ` David Miller
  2007-02-11 22:35         ` Tilman Schmidt
  0 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2007-02-11 18:28 UTC (permalink / raw)
  To: lunz; +Cc: olaf, rol, akpm, linux-kernel, rol

From: Jason Lunz <lunz@falooley.org>
Date: Sun, 11 Feb 2007 13:27:05 -0500

> On Sun, Feb 11, 2007 at 09:55:52AM -0800, David Miller wrote:
> > 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.
> 
> I disagree completely. I'm working right now on a udev-based system that
> does ethernet device renaming. It's quite difficult when working with
> udev to tell exactly when and why each interface was renamed, since it's
> typically done within initramfs where it's difficult to enable debug
> messages. This printk helps immensely.

You can listen on a netlink socket for these events if you
want to see when they occur.

There is no need for this log message, it is superfluous.

^ permalink raw reply	[flat|nested] 7+ 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; 7+ 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] 7+ 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; 7+ 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] 7+ 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
  0 siblings, 2 replies; 7+ 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] 7+ messages in thread

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).