netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: linux-next: net build failure
       [not found] <20080327182441.8d09b8ad.sfr@canb.auug.org.au>
@ 2008-03-27  9:22 ` David Miller
  2008-03-27 10:29   ` [PATCH 1/2 net-2.6.26] [NETNS]: Compile NET /proc support only if CONFIG_NET is set Denis V. Lunev
                     ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: David Miller @ 2008-03-27  9:22 UTC (permalink / raw)
  To: sfr; +Cc: yoshfuji, linux-next, netdev

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 27 Mar 2008 18:24:41 +1100

> Today's linux-next build (powerpc allnoconfig (i.e. CONFIG_NET not
> defined)) fails thusly:
> 
> In file included from include/linux/rtc.h:112,
>                  from include/linux/efi.h:20,
>                  from init/main.c:44:
> include/linux/seq_file.h: In function 'seq_file_net':
> include/linux/seq_file.h:81: error: 'init_net' undeclared (first use in this function)
> include/linux/seq_file.h:81: error: (Each undeclared identifier is reported only once
> include/linux/seq_file.h:81: error: for each function it appears in.)
> 
> Introduced by commit 1218854afa6f659be90b748cf1bc7badee954a35 ("[NET]
> NETNS: Omit seq_net_private->net without CONFIG_NET_NS.").

Yoshifuji-san, please fix this.

I tried to, but the cases, especially those in netdevice.h, are
difficult to resolve.

Thank you.

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

* [PATCH 1/2 net-2.6.26] [NETNS]: Compile NET /proc support only if CONFIG_NET is set.
  2008-03-27  9:22 ` linux-next: net build failure David Miller
@ 2008-03-27 10:29   ` Denis V. Lunev
  2008-03-27 21:27     ` David Miller
  2008-03-27 10:29   ` [PATCH 2/2 net-2.6.26] [NETNS]: Do no include NET related headers if CONFIG_NET is not set Denis V. Lunev
  2008-03-27 10:30   ` linux-next: net build failure YOSHIFUJI Hideaki / 吉藤英明
  2 siblings, 1 reply; 9+ messages in thread
From: Denis V. Lunev @ 2008-03-27 10:29 UTC (permalink / raw)
  To: davem; +Cc: netdev, containers, yoshfuji, --cc, Denis V. Lunev

This fix broken compilation for 'allnoconfig'. This was introduced by
Introduced by commit 1218854afa6f659be90b748cf1bc7badee954a35 ("[NET]
NETNS: Omit seq_net_private->net without CONFIG_NET_NS.")

Signed-off-by: Denis V. Lunev <den@openvz.org>
---
 fs/proc/proc_net.c       |    2 ++
 include/linux/seq_file.h |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c
index 13cd783..7034fac 100644
--- a/fs/proc/proc_net.c
+++ b/fs/proc/proc_net.c
@@ -51,6 +51,7 @@ int seq_open_net(struct inode *ino, struct file *f,
 }
 EXPORT_SYMBOL_GPL(seq_open_net);
 
+#ifdef CONFIG_NET
 int seq_release_net(struct inode *ino, struct file *f)
 {
 	struct seq_file *seq;
@@ -218,3 +219,4 @@ int __init proc_net_init(void)
 
 	return register_pernet_subsys(&proc_net_ns_ops);
 }
+#endif /* CONFIG_NET */
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index d870a82..5da70c3 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -63,6 +63,7 @@ extern struct list_head *seq_list_start_head(struct list_head *head,
 extern struct list_head *seq_list_next(void *v, struct list_head *head,
 		loff_t *ppos);
 
+#ifdef CONFIG_NET
 struct net;
 struct seq_net_private {
 #ifdef CONFIG_NET_NS
@@ -81,6 +82,7 @@ static inline struct net *seq_file_net(struct seq_file *seq)
 	return &init_net;
 #endif
 }
+#endif	/* CONFIG_NET */
 
 #endif
 #endif
-- 
1.5.3.rc5


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

* [PATCH 2/2 net-2.6.26] [NETNS]: Do no include NET related headers if CONFIG_NET is not set.
  2008-03-27  9:22 ` linux-next: net build failure David Miller
  2008-03-27 10:29   ` [PATCH 1/2 net-2.6.26] [NETNS]: Compile NET /proc support only if CONFIG_NET is set Denis V. Lunev
@ 2008-03-27 10:29   ` Denis V. Lunev
  2008-03-27 21:27     ` David Miller
  2008-03-27 10:30   ` linux-next: net build failure YOSHIFUJI Hideaki / 吉藤英明
  2 siblings, 1 reply; 9+ messages in thread
From: Denis V. Lunev @ 2008-03-27 10:29 UTC (permalink / raw)
  To: davem; +Cc: netdev, containers, yoshfuji, --cc, Denis V. Lunev

This fix broken compilation for 'allnoconfig'. This was introduced by
Introduced by commit 1218854afa6f659be90b748cf1bc7badee954a35 ("[NET]
NETNS: Omit seq_net_private->net without CONFIG_NET_NS.")

Signed-off-by: Denis V. Lunev <den@openvz.org>
---
 lib/kobject_uevent.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 5a402e2..0d56dad 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -15,12 +15,16 @@
  */
 
 #include <linux/spinlock.h>
+#include <linux/string.h>
+#include <linux/kobject.h>
+#include <linux/module.h>
+
+#ifdef CONFIG_NET
 #include <linux/socket.h>
 #include <linux/skbuff.h>
 #include <linux/netlink.h>
-#include <linux/string.h>
-#include <linux/kobject.h>
 #include <net/sock.h>
+#endif
 
 
 u64 uevent_seqnum;
-- 
1.5.3.rc5


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

* Re: linux-next: net build failure
  2008-03-27  9:22 ` linux-next: net build failure David Miller
  2008-03-27 10:29   ` [PATCH 1/2 net-2.6.26] [NETNS]: Compile NET /proc support only if CONFIG_NET is set Denis V. Lunev
  2008-03-27 10:29   ` [PATCH 2/2 net-2.6.26] [NETNS]: Do no include NET related headers if CONFIG_NET is not set Denis V. Lunev
@ 2008-03-27 10:30   ` YOSHIFUJI Hideaki / 吉藤英明
  2008-03-27 11:05     ` David Miller
  2 siblings, 1 reply; 9+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2008-03-27 10:30 UTC (permalink / raw)
  To: davem; +Cc: sfr, linux-next, netdev, yoshfuji

In article <20080327.022206.100283150.davem@davemloft.net> (at Thu, 27 Mar 2008 02:22:06 -0700 (PDT)), David Miller <davem@davemloft.net> says:

> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 27 Mar 2008 18:24:41 +1100
> 
> > Today's linux-next build (powerpc allnoconfig (i.e. CONFIG_NET not
> > defined)) fails thusly:
> > 
> > In file included from include/linux/rtc.h:112,
> >                  from include/linux/efi.h:20,
> >                  from init/main.c:44:
> > include/linux/seq_file.h: In function 'seq_file_net':
> > include/linux/seq_file.h:81: error: 'init_net' undeclared (first use in this function)
> > include/linux/seq_file.h:81: error: (Each undeclared identifier is reported only once
> > include/linux/seq_file.h:81: error: for each function it appears in.)
> > 
> > Introduced by commit 1218854afa6f659be90b748cf1bc7badee954a35 ("[NET]
> > NETNS: Omit seq_net_private->net without CONFIG_NET_NS.").
> 
> Yoshifuji-san, please fix this.
> 
> I tried to, but the cases, especially those in netdevice.h, are
> difficult to resolve.
> 
> Thank you.

How about this?
I believe all functions are not used outside the net subsystem.

I'm still testing with allmodconfig but 
at least, allnoconfig works for me.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 15fa84a..f51c89c 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -739,6 +739,7 @@ struct net_device
 #define	NETDEV_ALIGN		32
 #define	NETDEV_ALIGN_CONST	(NETDEV_ALIGN - 1)
 
+#ifdef CONFIG_NET
 /*
  * Net namespace inlines
  */
@@ -759,6 +760,7 @@ void dev_net_set(struct net_device *dev, struct net *net)
 	dev->nd_net = net;
 #endif
 }
+#endif
 
 /**
  *	netdev_priv - access network device private data
@@ -831,6 +833,7 @@ extern rwlock_t				dev_base_lock;		/* Device list lock */
 		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)
 
+#ifdef CONFIG_NET
 static inline struct net_device *next_net_device(struct net_device *dev)
 {
 	struct list_head *lh;
@@ -846,6 +849,7 @@ 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);
 }
+#endif
 
 extern int 			netdev_boot_setup_check(struct net_device *dev);
 extern unsigned long		netdev_boot_base(const char *prefix, int unit);
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index d870a82..ff51e03 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -70,6 +70,7 @@ struct seq_net_private {
 #endif
 };
 
+#ifdef CONFIG_NET
 int seq_open_net(struct inode *, struct file *,
 		 const struct seq_operations *, int);
 int seq_release_net(struct inode *, struct file *);
@@ -81,6 +82,7 @@ static inline struct net *seq_file_net(struct seq_file *seq)
 	return &init_net;
 #endif
 }
+#endif
 
 #endif
 #endif
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 8bec0d6..aa85a41 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -218,6 +218,7 @@ extern struct neighbour 	*neigh_event_ns(struct neigh_table *tbl,
 extern struct neigh_parms	*neigh_parms_alloc(struct net_device *dev, struct neigh_table *tbl);
 extern void			neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms);
 
+#ifdef CONFIG_NET
 static inline
 struct net			*neigh_parms_net(const struct neigh_parms *parms)
 {
@@ -227,6 +228,7 @@ struct net			*neigh_parms_net(const struct neigh_parms *parms)
 	return &init_net;
 #endif
 }
+#endif
 
 extern unsigned long		neigh_rand_reach_time(unsigned long base);
 
@@ -235,6 +237,7 @@ extern void			pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p,
 extern struct pneigh_entry	*pneigh_lookup(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev, int creat);
 extern int			pneigh_delete(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev);
 
+#ifdef CONFIG_NET
 static inline
 struct net			*pneigh_net(const struct pneigh_entry *pneigh)
 {
@@ -244,6 +247,7 @@ struct net			*pneigh_net(const struct pneigh_entry *pneigh)
 	return &init_net;
 #endif
 }
+#endif
 
 extern void neigh_app_ns(struct neighbour *n);
 extern void neigh_for_each(struct neigh_table *tbl, void (*cb)(struct neighbour *, void *), void *cookie);
diff --git a/include/net/sock.h b/include/net/sock.h
index 1c9d059..a6047cb 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1347,6 +1347,7 @@ static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_e
 }
 #endif
 
+#ifdef CONFIG_NET
 static inline
 struct net *sock_net(const struct sock *sk)
 {
@@ -1376,6 +1377,7 @@ static inline void sk_change_net(struct sock *sk, struct net *net)
 	put_net(sock_net(sk));
 	sock_net_set(sk, net);
 }
+#endif
 
 extern void sock_enable_timestamp(struct sock *sk);
 extern int sock_get_timestamp(struct sock *, struct timeval __user *);

-- 
YOSHIFUJI Hideaki @ USAGI Project  <yoshfuji@linux-ipv6.org>
GPG-FP  : 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

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

* Re: linux-next: net build failure
  2008-03-27 10:30   ` linux-next: net build failure YOSHIFUJI Hideaki / 吉藤英明
@ 2008-03-27 11:05     ` David Miller
  2008-03-27 12:12       ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2008-03-27 11:05 UTC (permalink / raw)
  To: yoshfuji; +Cc: sfr, linux-next, netdev

From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Date: Thu, 27 Mar 2008 19:30:06 +0900 (JST)

> How about this?
> I believe all functions are not used outside the net subsystem.
> 
> I'm still testing with allmodconfig but 
> at least, allnoconfig works for me.
> 
> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

Denis has posted a slightly different approach.

I kind of agree with what he is doing, because kobject_uevent
should not be including any networking headers when CONFIG_NET
is not set and that causes large portions of the breakage.

What do you think of his 2 patches?

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

* Re: linux-next: net build failure
  2008-03-27 11:05     ` David Miller
@ 2008-03-27 12:12       ` YOSHIFUJI Hideaki / 吉藤英明
  2008-03-27 21:26         ` David Miller
  0 siblings, 1 reply; 9+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2008-03-27 12:12 UTC (permalink / raw)
  To: davem; +Cc: sfr, linux-next, netdev, yoshfuji

In article <20080327.040502.144245837.davem@davemloft.net> (at Thu, 27 Mar 2008 04:05:02 -0700 (PDT)), David Miller <davem@davemloft.net> says:

> From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
> Date: Thu, 27 Mar 2008 19:30:06 +0900 (JST)
> 
> > How about this?
> > I believe all functions are not used outside the net subsystem.
> > 
> > I'm still testing with allmodconfig but 
> > at least, allnoconfig works for me.
> > 
> > Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> 
> Denis has posted a slightly different approach.
> 
> I kind of agree with what he is doing, because kobject_uevent
> should not be including any networking headers when CONFIG_NET
> is not set and that causes large portions of the breakage.
> 
> What do you think of his 2 patches?

I agree.

Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

--yoshfuji

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

* Re: linux-next: net build failure
  2008-03-27 12:12       ` YOSHIFUJI Hideaki / 吉藤英明
@ 2008-03-27 21:26         ` David Miller
  0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2008-03-27 21:26 UTC (permalink / raw)
  To: yoshfuji; +Cc: sfr, linux-next, netdev

From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Date: Thu, 27 Mar 2008 21:12:34 +0900 (JST)

> In article <20080327.040502.144245837.davem@davemloft.net> (at Thu, 27 Mar 2008 04:05:02 -0700 (PDT)), David Miller <davem@davemloft.net> says:
> 
> > From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
> > Date: Thu, 27 Mar 2008 19:30:06 +0900 (JST)
> > 
> > > How about this?
> > > I believe all functions are not used outside the net subsystem.
> > > 
> > > I'm still testing with allmodconfig but 
> > > at least, allnoconfig works for me.
> > > 
> > > Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> > 
> > Denis has posted a slightly different approach.
> > 
> > I kind of agree with what he is doing, because kobject_uevent
> > should not be including any networking headers when CONFIG_NET
> > is not set and that causes large portions of the breakage.
> > 
> > What do you think of his 2 patches?
> 
> I agree.
> 
> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

Great, I've added his patches to net-2.6.26

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

* Re: [PATCH 1/2 net-2.6.26] [NETNS]: Compile NET /proc support only if CONFIG_NET is set.
  2008-03-27 10:29   ` [PATCH 1/2 net-2.6.26] [NETNS]: Compile NET /proc support only if CONFIG_NET is set Denis V. Lunev
@ 2008-03-27 21:27     ` David Miller
  0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2008-03-27 21:27 UTC (permalink / raw)
  To: den; +Cc: netdev, containers, yoshfuji, --cc

From: "Denis V. Lunev" <den@openvz.org>
Date: Thu, 27 Mar 2008 13:29:56 +0300

> This fix broken compilation for 'allnoconfig'. This was introduced by
> Introduced by commit 1218854afa6f659be90b748cf1bc7badee954a35 ("[NET]
> NETNS: Omit seq_net_private->net without CONFIG_NET_NS.")
> 
> Signed-off-by: Denis V. Lunev <den@openvz.org>

Applied.


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

* Re: [PATCH 2/2 net-2.6.26] [NETNS]: Do no include NET related headers if CONFIG_NET is not set.
  2008-03-27 10:29   ` [PATCH 2/2 net-2.6.26] [NETNS]: Do no include NET related headers if CONFIG_NET is not set Denis V. Lunev
@ 2008-03-27 21:27     ` David Miller
  0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2008-03-27 21:27 UTC (permalink / raw)
  To: den; +Cc: netdev, containers, yoshfuji, --cc

From: "Denis V. Lunev" <den@openvz.org>
Date: Thu, 27 Mar 2008 13:29:57 +0300

> This fix broken compilation for 'allnoconfig'. This was introduced by
> Introduced by commit 1218854afa6f659be90b748cf1bc7badee954a35 ("[NET]
> NETNS: Omit seq_net_private->net without CONFIG_NET_NS.")
> 
> Signed-off-by: Denis V. Lunev <den@openvz.org>

Applied, thanks a lot!

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

end of thread, other threads:[~2008-03-27 21:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20080327182441.8d09b8ad.sfr@canb.auug.org.au>
2008-03-27  9:22 ` linux-next: net build failure David Miller
2008-03-27 10:29   ` [PATCH 1/2 net-2.6.26] [NETNS]: Compile NET /proc support only if CONFIG_NET is set Denis V. Lunev
2008-03-27 21:27     ` David Miller
2008-03-27 10:29   ` [PATCH 2/2 net-2.6.26] [NETNS]: Do no include NET related headers if CONFIG_NET is not set Denis V. Lunev
2008-03-27 21:27     ` David Miller
2008-03-27 10:30   ` linux-next: net build failure YOSHIFUJI Hideaki / 吉藤英明
2008-03-27 11:05     ` David Miller
2008-03-27 12:12       ` YOSHIFUJI Hideaki / 吉藤英明
2008-03-27 21:26         ` 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).