netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ieee1394: eth1394: use "firewire%d" instead of "eth%d" as interface name
@ 2009-05-21 13:29 Stefan Richter
  2009-05-21 13:48 ` Jiri Pirko
  2009-05-21 19:34 ` David Miller
  0 siblings, 2 replies; 12+ messages in thread
From: Stefan Richter @ 2009-05-21 13:29 UTC (permalink / raw)
  To: linux1394-devel; +Cc: netdev, Jay Fenlason, linux-hotplug, linux-kernel

Change the initial name of IP-over-1394 networking interfaces from
"eth[0-9]+" to "firewire[0-9]+".

This should have been done years ago for the reason mentioned in the
inline comment.  The naming issue basically prevented acceptance of
IP networking over 1394 on Linux.

The future IP-over1394 driver in the newer alternative firewire driver
stack will use the "firewire%d" format from the start while "eth%d" will
no longer be used in the new driver.

Necessary changes in userland:

People who use the eth1394 driver either have to update their network
configuration (or instead perhaps respecpective udev interface renaming
rules) to the new names, or add

    options eth1394 firewire_interface_name=N

to /etc/modprobe.conf or /etc/modprobe.d/whatever if they really prefer
the old names.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
 drivers/ieee1394/eth1394.c |   23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

Index: linux/drivers/ieee1394/eth1394.c
===================================================================
--- linux.orig/drivers/ieee1394/eth1394.c
+++ linux/drivers/ieee1394/eth1394.c
@@ -146,6 +146,25 @@ MODULE_DESCRIPTION("IEEE 1394 IPv4 Drive
 MODULE_LICENSE("GPL");
 
 /*
+ * Legacy option:  Choose between "eth%d" (old) and "firewire%d" (new, default)
+ * as name template of eth1304's networking interfaces.
+ *
+ * eth1394 used to set "eth[0-9]+" as the initial name of an IP-over-1394
+ * networking interface.  This caused trouble for users and admins since
+ * it is indistinguishable from Ethernet drivers' interfaces.
+ *
+ * From Linux 2.6.31 on, "eth[0-9]+" remains only an option which can be
+ * activated by setting the following module parameter to N.  The default
+ * name format is "firewire[0-9]+" now.  This way, people will immediately
+ * recognize what kind of networking interface this is, and no mix-ups
+ * with Ethernet interface configurations will happen anymore.
+ */
+static int firewire_interface_name = 1;
+module_param(firewire_interface_name, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(firewire_interface_name, "use 'firewire' (= Y, default) or "
+		 "'eth' (= N, legacy option) as name prefix of interfaces");
+
+/*
  * The max_partial_datagrams parameter is the maximum number of fragmented
  * datagrams per node that eth1394 will keep in memory.  Providing an upper
  * bound allows us to limit the amount of memory that partial datagrams
@@ -595,7 +614,9 @@ static void ether1394_add_host(struct hp
 		return;
 	}
 
-	dev = alloc_netdev(sizeof(*priv), "eth%d", ether1394_init_dev);
+	dev = alloc_netdev(sizeof(*priv),
+			   firewire_interface_name ? "firewire%d" : "eth%d",
+			   ether1394_init_dev);
 	if (dev == NULL) {
 		ETH1394_PRINT_G(KERN_ERR, "Out of memory\n");
 		goto out;

-- 
Stefan Richter
-=====-==--= -=-= =-=-=
http://arcgraph.de/sr/


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 

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

end of thread, other threads:[~2009-05-25 10:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-21 13:29 [PATCH] ieee1394: eth1394: use "firewire%d" instead of "eth%d" as interface name Stefan Richter
2009-05-21 13:48 ` Jiri Pirko
2009-05-21 14:31   ` Stefan Richter
2009-05-21 16:43     ` Kay Sievers
     [not found]     ` <alpine.DEB.2.01.0905232309400.7424@bogon>
2009-05-24  9:47       ` Stefan Richter
2009-05-25  8:33         ` Matthias Schwarzott
2009-05-25 10:43           ` Stefan Richter
2009-05-25 10:57           ` Kay Sievers
2009-05-21 19:34 ` David Miller
2009-05-21 20:13   ` Stefan Richter
2009-05-21 20:33     ` David Miller
2009-05-21 21:35       ` Stefan Richter

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).