netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-2.6.24][NETNS][patch 0/3] fixes for the core network namespace
@ 2007-09-12 12:38 dlezcano
  2007-09-12 12:38 ` [net-2.6.24][NETNS][patch 1/3] fix export symbols dlezcano
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: dlezcano @ 2007-09-12 12:38 UTC (permalink / raw)
  To: davem; +Cc: ebiederm, containers, netdev

The following patches fixes some compilation errors and boot problems
related to the network namespace patchset.

They apply to net-2.6.24
-- 

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

* [net-2.6.24][NETNS][patch 1/3] fix export symbols
  2007-09-12 12:38 [net-2.6.24][NETNS][patch 0/3] fixes for the core network namespace dlezcano
@ 2007-09-12 12:38 ` dlezcano
  2007-09-12 12:53   ` David Miller
  2007-09-12 12:38 ` [net-2.6.24][NETNS][patch 2/3] fix loopback network namespace initialization dlezcano
  2007-09-12 12:38 ` [net-2.6.24][NETNS][patch 3/3] fix bad macro definition dlezcano
  2 siblings, 1 reply; 8+ messages in thread
From: dlezcano @ 2007-09-12 12:38 UTC (permalink / raw)
  To: davem; +Cc: ebiederm, containers, netdev, Mark Nelson, Benjamin Thery

[-- Attachment #1: net-fix-export-symbol.patch --]
[-- Type: text/plain, Size: 1116 bytes --]

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Add the appropriate EXPORT_SYMBOLS for proc_net_create,
proc_net_fops_create and proc_net_remove to fix errors when
compiling allmodconfig

Signed-off-by: Mark Nelson <markn@au1.ibm.com>
Acked-by: Benjamin Thery <benjamin.thery@bull.net>
---
 fs/proc/proc_net.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: net-2.6.24/fs/proc/proc_net.c
===================================================================
--- net-2.6.24.orig/fs/proc/proc_net.c
+++ net-2.6.24/fs/proc/proc_net.c
@@ -31,6 +31,7 @@
 {
 	return create_proc_info_entry(name,mode, net->proc_net, get_info);
 }
+EXPORT_SYMBOL_GPL(proc_net_create);
 
 struct proc_dir_entry *proc_net_fops_create(struct net *net,
 	const char *name, mode_t mode, const struct file_operations *fops)
@@ -42,12 +43,13 @@
 		res->proc_fops = fops;
 	return res;
 }
+EXPORT_SYMBOL_GPL(proc_net_fops_create);
 
 void proc_net_remove(struct net *net, const char *name)
 {
 	remove_proc_entry(name, net->proc_net);
 }
-
+EXPORT_SYMBOL_GPL(proc_net_remove);
 
 static struct proc_dir_entry *proc_net_shadow;
 

-- 

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

* [net-2.6.24][NETNS][patch 2/3] fix loopback network namespace initialization
  2007-09-12 12:38 [net-2.6.24][NETNS][patch 0/3] fixes for the core network namespace dlezcano
  2007-09-12 12:38 ` [net-2.6.24][NETNS][patch 1/3] fix export symbols dlezcano
@ 2007-09-12 12:38 ` dlezcano
  2007-09-12 12:55   ` David Miller
  2007-09-12 12:38 ` [net-2.6.24][NETNS][patch 3/3] fix bad macro definition dlezcano
  2 siblings, 1 reply; 8+ messages in thread
From: dlezcano @ 2007-09-12 12:38 UTC (permalink / raw)
  To: davem; +Cc: ebiederm, containers, netdev

[-- Attachment #1: net-fix-kernel-bug-dev-nd-net-null.patch --]
[-- Type: text/plain, Size: 833 bytes --]

From: Daniel Lezcano <dlezcano@fr.ibm.com>

The core patchset of the network namespace sent by 
Eric Biederman does not do dynamic loopback creation.
So there is no call to alloc_netdev_mq which fills the
network namespace field of the netdevice.

This patch assign the loopback to the init network namespace.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
---
 drivers/net/loopback.c |    1 +
 1 file changed, 1 insertion(+)

Index: net-2.6.24/drivers/net/loopback.c
===================================================================
--- net-2.6.24.orig/drivers/net/loopback.c
+++ net-2.6.24/drivers/net/loopback.c
@@ -225,6 +225,7 @@
 				  | NETIF_F_LLTX
 				  | NETIF_F_NETNS_LOCAL,
 	.ethtool_ops		= &loopback_ethtool_ops,
+	.nd_net                 = &init_net,
 };
 
 /* Setup and register the loopback device. */

-- 

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

* [net-2.6.24][NETNS][patch 3/3] fix bad macro definition
  2007-09-12 12:38 [net-2.6.24][NETNS][patch 0/3] fixes for the core network namespace dlezcano
  2007-09-12 12:38 ` [net-2.6.24][NETNS][patch 1/3] fix export symbols dlezcano
  2007-09-12 12:38 ` [net-2.6.24][NETNS][patch 2/3] fix loopback network namespace initialization dlezcano
@ 2007-09-12 12:38 ` dlezcano
  2007-09-12 12:58   ` David Miller
  2 siblings, 1 reply; 8+ messages in thread
From: dlezcano @ 2007-09-12 12:38 UTC (permalink / raw)
  To: davem; +Cc: ebiederm, containers, netdev, Benjamin Thery

[-- Attachment #1: net-fix-llc-core-init-panic.patch --]
[-- Type: text/plain, Size: 2205 bytes --]

From: Daniel Lezcano <dlezcano@fr.ibm.com>

The macro definition is bad. When calling next_net_device with 
parameter name "dev", the resulting code is:
	  struct net_device *dev = dev and that leads to an unexpected
behavior. Especially when llc_core is compiled in, the kernel panics
at boot time.
The patchset change macro definition with static inline functions as
they were defined before.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
---
 include/linux/netdevice.h |   35 +++++++++++++++++------------------
 1 file changed, 17 insertions(+), 18 deletions(-)

Index: net-2.6.24/include/linux/netdevice.h
===================================================================
--- net-2.6.24.orig/include/linux/netdevice.h
+++ net-2.6.24/include/linux/netdevice.h
@@ -41,7 +41,8 @@
 #include <linux/dmaengine.h>
 #include <linux/workqueue.h>
 
-struct net;
+#include <net/net_namespace.h>
+
 struct vlan_group;
 struct ethtool_ops;
 struct netpoll_info;
@@ -739,23 +740,21 @@
 		list_for_each_entry_continue(d, &(net)->dev_base_head, dev_list)
 #define net_device_entry(lh)	list_entry(lh, struct net_device, dev_list)
 
-#define next_net_device(d) 						\
-({									\
-	struct net_device *dev = d;					\
-	struct list_head *lh;						\
-	struct net *net;						\
-									\
-	net = dev->nd_net;						\
-	lh = dev->dev_list.next;					\
-	lh == &net->dev_base_head ? NULL : net_device_entry(lh);	\
-})
-
-#define first_net_device(N)					\
-({								\
-	struct net *NET = (N);					\
-	list_empty(&NET->dev_base_head) ? NULL :		\
-		net_device_entry(NET->dev_base_head.next);	\
-})
+static inline struct net_device *next_net_device(struct net_device *dev)
+{
+	struct list_head *lh;
+	struct net *net;
+
+	net = dev->nd_net;
+        lh = dev->dev_list.next;
+	return lh == &net->dev_base_head ? NULL : net_device_entry(lh);
+}
+
+static inline struct net_device *first_net_device(struct net *net)
+{
+	return list_empty(&net->dev_base_head) ? NULL :
+		net_device_entry(net->dev_base_head.next);
+}
 
 extern int 			netdev_boot_setup_check(struct net_device *dev);
 extern unsigned long		netdev_boot_base(const char *prefix, int unit);

-- 

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

* Re: [net-2.6.24][NETNS][patch 1/3] fix export symbols
  2007-09-12 12:38 ` [net-2.6.24][NETNS][patch 1/3] fix export symbols dlezcano
@ 2007-09-12 12:53   ` David Miller
  2007-09-12 12:57     ` Daniel Lezcano
  0 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2007-09-12 12:53 UTC (permalink / raw)
  To: dlezcano; +Cc: ebiederm, containers, netdev, markn, benjamin.thery

From: dlezcano@fr.ibm.com
Date: Wed, 12 Sep 2007 14:38:12 +0200

> From: Daniel Lezcano <dlezcano@fr.ibm.com>
> 
> Add the appropriate EXPORT_SYMBOLS for proc_net_create,
> proc_net_fops_create and proc_net_remove to fix errors when
> compiling allmodconfig
> 
> Signed-off-by: Mark Nelson <markn@au1.ibm.com>
> Acked-by: Benjamin Thery <benjamin.thery@bull.net>

Applied to net-2.6.24, thanks.

Why aren't you signing off on these patches?  Please
do so in the future.

Because "From: " usually means you are the patch author, and I can't
tell who wrote these patches, you or these other people listed in the
signoff area.

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

* Re: [net-2.6.24][NETNS][patch 2/3] fix loopback network namespace initialization
  2007-09-12 12:38 ` [net-2.6.24][NETNS][patch 2/3] fix loopback network namespace initialization dlezcano
@ 2007-09-12 12:55   ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2007-09-12 12:55 UTC (permalink / raw)
  To: dlezcano; +Cc: ebiederm, containers, netdev

From: dlezcano@fr.ibm.com
Date: Wed, 12 Sep 2007 14:38:13 +0200

> From: Daniel Lezcano <dlezcano@fr.ibm.com>
> 
> The core patchset of the network namespace sent by 
> Eric Biederman does not do dynamic loopback creation.
> So there is no call to alloc_netdev_mq which fills the
> network namespace field of the netdevice.
> 
> This patch assign the loopback to the init network namespace.
> 
> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>

Applied, thanks.

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

* Re: [net-2.6.24][NETNS][patch 1/3] fix export symbols
  2007-09-12 12:53   ` David Miller
@ 2007-09-12 12:57     ` Daniel Lezcano
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Lezcano @ 2007-09-12 12:57 UTC (permalink / raw)
  To: David Miller; +Cc: ebiederm, containers, netdev, markn, benjamin.thery

David Miller wrote:
> From: dlezcano@fr.ibm.com
> Date: Wed, 12 Sep 2007 14:38:12 +0200
> 
>> From: Daniel Lezcano <dlezcano@fr.ibm.com>
>>
>> Add the appropriate EXPORT_SYMBOLS for proc_net_create,
>> proc_net_fops_create and proc_net_remove to fix errors when
>> compiling allmodconfig
>>
>> Signed-off-by: Mark Nelson <markn@au1.ibm.com>
>> Acked-by: Benjamin Thery <benjamin.thery@bull.net>
> 
> Applied to net-2.6.24, thanks.
> 
> Why aren't you signing off on these patches?  Please
> do so in the future.
> 
> Because "From: " usually means you are the patch author, and I can't
> tell who wrote these patches, you or these other people listed in the
> signoff area.
> 

Sorry for that, I will take care of that next time. Thanks.

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

* Re: [net-2.6.24][NETNS][patch 3/3] fix bad macro definition
  2007-09-12 12:38 ` [net-2.6.24][NETNS][patch 3/3] fix bad macro definition dlezcano
@ 2007-09-12 12:58   ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2007-09-12 12:58 UTC (permalink / raw)
  To: dlezcano; +Cc: ebiederm, containers, netdev, benjamin.thery

From: dlezcano@fr.ibm.com
Date: Wed, 12 Sep 2007 14:38:14 +0200

> From: Daniel Lezcano <dlezcano@fr.ibm.com>
> 
> The macro definition is bad. When calling next_net_device with 
> parameter name "dev", the resulting code is:
> 	  struct net_device *dev = dev and that leads to an unexpected
> behavior. Especially when llc_core is compiled in, the kernel panics
> at boot time.
> The patchset change macro definition with static inline functions as
> they were defined before.
> 
> Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>

Applied, thanks.

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

end of thread, other threads:[~2007-09-12 12:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-12 12:38 [net-2.6.24][NETNS][patch 0/3] fixes for the core network namespace dlezcano
2007-09-12 12:38 ` [net-2.6.24][NETNS][patch 1/3] fix export symbols dlezcano
2007-09-12 12:53   ` David Miller
2007-09-12 12:57     ` Daniel Lezcano
2007-09-12 12:38 ` [net-2.6.24][NETNS][patch 2/3] fix loopback network namespace initialization dlezcano
2007-09-12 12:55   ` David Miller
2007-09-12 12:38 ` [net-2.6.24][NETNS][patch 3/3] fix bad macro definition dlezcano
2007-09-12 12:58   ` David Miller

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