linux-next: net build failure
Subsystems (6)
A message that is not in the archive (sent off-list or not yet received): [email protected]
David Miller
maintainerFrom: Stephen Rothwell <[email protected]>
Date: Thu, 27 Mar 2008 18:24:41 +1100
Quoted 6 lines
Today's linux-next build (powerpc allnoconfig (i.e.
CONFIG_NETnot defined)) fails thusly:In file included from
include/linux/rtc.h:112,from include/linux/efi.h:20, from init/main.c:44:
Quoted 7 lines
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 onceinclude/linux/seq_file.h:81: error: for each function it appears in.)Introduced by commit
1218854afa6f659be90b748cf1bc7badee954a35("[NET]
NETNS: Omitseq_net_private->netwithoutCONFIG_NET_NS.").
Yoshifuji-san, please fix this.
I tried to, but the cases, especially those in netdevice.h, are difficult to resolve.
Thank you.
In article <[email protected]> (at Thu, 27 Mar 2008 02:22:06 -0700 (PDT)), David Miller <[email protected]> says:
Quoted 17 lines
From: Stephen Rothwell <[email protected]>
Date: Thu, 27 Mar 2008 18:24:41 +1100Quoted 6 lines
Today's linux-next build (powerpc allnoconfig (i.e.
CONFIG_NETnot defined)) fails thusly:In file included from
include/linux/rtc.h:112,from include/linux/efi.h:20, from init/main.c:44:Quoted 7 lines
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 onceinclude/linux/seq_file.h:81: error: for each function it appears in.)Introduced by commit
1218854afa6f659be90b748cf1bc7badee954a35("[NET]
NETNS: Omitseq_net_private->netwithoutCONFIG_NET_NS.").
Quoted 6 lines
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.
include/linux/netdevice.h +4 -0
@@ -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);
include/linux/seq_file.h +2 -0
@@ -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
include/net/neighbour.h +4 -0
@@ -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);
include/net/sock.h +2 -0
@@ -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 *);
Signature · 2 lines
YOSHIFUJI Hideaki @ USAGI Project <[email protected]> GPG-FP : 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
David Miller
maintainerFrom: YOSHIFUJI Hideaki / 吉藤英明 <[email protected]>
Date: Thu, 27 Mar 2008 19:30:06 +0900 (JST)
Quoted 7 lines
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 <[email protected]>
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?
YOSHIFUJI Hideaki / 吉藤英明
Acked-byIn article <[email protected]> (at Thu, 27 Mar 2008 04:05:02 -0700 (PDT)), David Miller <[email protected]> says:
Quoted 11 lines
From: YOSHIFUJI Hideaki / 吉藤英明 <[email protected]>
Date: Thu, 27 Mar 2008 19:30:06 +0900 (JST)Quoted 7 lines
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 <[email protected]>
Quoted 7 lines
Denis has posted a slightly different approach.
I kind of agree with what he is doing, because
kobject_ueventshould not be including any networking headers whenCONFIG_NETis not set and that causes large portions of the breakage.What do you think of his 2 patches?
I agree.
--yoshfuji
David Miller
maintainerFrom: YOSHIFUJI Hideaki / 吉藤英明 <[email protected]>
Date: Thu, 27 Mar 2008 21:12:34 +0900 (JST)
Quoted 19 lines
In article <[email protected]> (at Thu, 27 Mar 2008 04:05:02 -0700 (PDT)), David Miller <[email protected]> says:
Quoted 17 lines
From: YOSHIFUJI Hideaki / 吉藤英明 <[email protected]>
Date: Thu, 27 Mar 2008 19:30:06 +0900 (JST)Quoted 7 lines
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 <[email protected]>Denis has posted a slightly different approach.
I kind of agree with what he is doing, because
kobject_ueventshould not be including any networking headers whenCONFIG_NETis not set and that causes large portions of the breakage.
Quoted 5 lines
Quoted 1 line
What do you think of his 2 patches?
I agree.
Great, I've added his patches to net-2.6.26
PATCH 1/2 : Compile NET /proc support only if CONFIG_NET is set.
In reply to David MillerThis fix broken compilation for 'allnoconfig'. This was introduced by Introduced by commit 1218854afa6f659be90b748cf1bc7badee954a35 ("[NET]
NETNS: Omit seq_net_private->net without CONFIG_NET_NS.")
--- fs/proc/proc_net.c | 2 ++ include/linux/seq_file.h | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-)
fs/proc/proc_net.c +2 -0
@@ -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 */
include/linux/seq_file.h +2 -0
@@ -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
Signature · 1 line
1.5.3.rc5
Re: [PATCH 1/2 net-2.6.26] [NETNS]: Compile NET /proc support only if CONFIG_NET is set.
From: "Denis V. Lunev" <[email protected]>
Date: Thu, 27 Mar 2008 13:29:56 +0300
Quoted 5 lines
This fix broken compilation for 'allnoconfig'. This was introduced by Introduced by commit
1218854afa6f659be90b748cf1bc7badee954a35("[NET]
NETNS: Omitseq_net_private->netwithoutCONFIG_NET_NS.")Signed-off-by Denis V. Lunev <[email protected]>
Applied.
PATCH 2/2 : Do no include NET related headers if CONFIG_NET is not set.
In reply to David MillerThis fix broken compilation for 'allnoconfig'. This was introduced by Introduced by commit 1218854afa6f659be90b748cf1bc7badee954a35 ("[NET]
NETNS: Omit seq_net_private->net without CONFIG_NET_NS.")
--- lib/kobject_uevent.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
lib/kobject_uevent.c +6 -2
@@ -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;
Signature · 1 line
1.5.3.rc5
Re: [PATCH 2/2 net-2.6.26] [NETNS]: Do no include NET related headers if CONFIG_NET is not set.
From: "Denis V. Lunev" <[email protected]>
Date: Thu, 27 Mar 2008 13:29:57 +0300
Quoted 5 lines
This fix broken compilation for 'allnoconfig'. This was introduced by Introduced by commit
1218854afa6f659be90b748cf1bc7badee954a35("[NET]
NETNS: Omitseq_net_private->netwithoutCONFIG_NET_NS.")Signed-off-by Denis V. Lunev <[email protected]>
Applied, thanks a lot!