2006-01-05 13:59:46

by Adrian Bunk

[permalink] [raw]
Subject: [2.6 patch] fix ipvs compilation

I don't know which change broke it, but I'm getting the following
compile error in Linus' tree:

<-- snip -->

...
CC net/ipv4/ipvs/ip_vs_sched.o
net/ipv4/ipvs/ip_vs_sched.c: In function 'ip_vs_sched_getbyname':
net/ipv4/ipvs/ip_vs_sched.c:110: warning: implicit declaration of function 'local_bh_disable'
net/ipv4/ipvs/ip_vs_sched.c:124: warning: implicit declaration of function 'local_bh_enable'
...
CC net/ipv4/ipvs/ip_vs_est.o
net/ipv4/ipvs/ip_vs_est.c: In function 'ip_vs_new_estimator':
net/ipv4/ipvs/ip_vs_est.c:147: warning: implicit declaration of function 'local_bh_disable'
net/ipv4/ipvs/ip_vs_est.c:156: warning: implicit declaration of function 'local_bh_enable'
...
LD .tmp_vmlinux1
net/built-in.o: In function `ip_vs_sched_getbyname':ip_vs_sched.c:(.text+0x99cfa): undefined reference to `local_bh_disable'
net/built-in.o: In function `register_ip_vs_scheduler': undefined reference to `local_bh_disable'
net/built-in.o: In function `unregister_ip_vs_scheduler': undefined reference to `local_bh_disable'
net/built-in.o: In function `ip_vs_new_estimator': undefined reference to `local_bh_disable'
net/built-in.o: In function `ip_vs_kill_estimator': undefined reference to `local_bh_disable'
net/built-in.o: more undefined references to `local_bh_disable' follow
make: *** [.tmp_vmlinux1] Error 1

<-- snip -->


This patch fixes them by #include'ing linux/interrupt.h.


Signed-off-by: Adrian Bunk <[email protected]>

--- linux-git/net/ipv4/ipvs/ip_vs_sched.c.old 2006-01-05 14:56:44.000000000 +0100
+++ linux-git/net/ipv4/ipvs/ip_vs_sched.c 2006-01-05 14:56:59.000000000 +0100
@@ -22,6 +22,7 @@
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
+#include <linux/interrupt.h>
#include <asm/string.h>
#include <linux/kmod.h>

--- linux-git/net/ipv4/ipvs/ip_vs_est.c.old 2006-01-05 14:57:15.000000000 +0100
+++ linux-git/net/ipv4/ipvs/ip_vs_est.c 2006-01-05 14:57:27.000000000 +0100
@@ -18,6 +18,7 @@
#include <linux/jiffies.h>
#include <linux/slab.h>
#include <linux/types.h>
+#include <linux/interrupt.h>

#include <net/ip_vs.h>



2006-01-05 14:21:41

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: Re: [2.6 patch] fix ipvs compilation

On 1/5/06, Adrian Bunk <[email protected]> wrote:
> I don't know which change broke it, but I'm getting the following
> compile error in Linus' tree:
>
> <-- snip -->
>
> ...
> CC net/ipv4/ipvs/ip_vs_sched.o
> net/ipv4/ipvs/ip_vs_sched.c: In function 'ip_vs_sched_getbyname':
> net/ipv4/ipvs/ip_vs_sched.c:110: warning: implicit declaration of function 'local_bh_disable'
> net/ipv4/ipvs/ip_vs_sched.c:124: warning: implicit declaration of function 'local_bh_enable'

Thanks Adrian, its related to some header sanitization work I did.

Acked-by: Arnaldo Carvalho de Melo <[email protected]>

- Arnaldo

2006-01-06 04:43:54

by Joe Kappus

[permalink] [raw]
Subject: Re: [2.6 patch] fix ipvs compilation

On 1/5/06, Adrian Bunk <[email protected]> wrote:
> I don't know which change broke it, but I'm getting the following
> compile error in Linus' tree:
>
> <-- snip -->
>
> ...
> CC net/ipv4/ipvs/ip_vs_sched.o
> net/ipv4/ipvs/ip_vs_sched.c: In function 'ip_vs_sched_getbyname':
> net/ipv4/ipvs/ip_vs_sched.c:110: warning: implicit declaration of function 'local_bh_disable'
> net/ipv4/ipvs/ip_vs_sched.c:124: warning: implicit declaration of function 'local_bh_enable'
> ...
> CC net/ipv4/ipvs/ip_vs_est.o
> net/ipv4/ipvs/ip_vs_est.c: In function 'ip_vs_new_estimator':
> net/ipv4/ipvs/ip_vs_est.c:147: warning: implicit declaration of function 'local_bh_disable'
> net/ipv4/ipvs/ip_vs_est.c:156: warning: implicit declaration of function 'local_bh_enable'
> ...
> LD .tmp_vmlinux1
> net/built-in.o: In function `ip_vs_sched_getbyname':ip_vs_sched.c:(.text+0x99cfa): undefined reference to `local_bh_disable'
> net/built-in.o: In function `register_ip_vs_scheduler': undefined reference to `local_bh_disable'
> net/built-in.o: In function `unregister_ip_vs_scheduler': undefined reference to `local_bh_disable'
> net/built-in.o: In function `ip_vs_new_estimator': undefined reference to `local_bh_disable'
> net/built-in.o: In function `ip_vs_kill_estimator': undefined reference to `local_bh_disable'
> net/built-in.o: more undefined references to `local_bh_disable' follow
> make: *** [.tmp_vmlinux1] Error 1
>
> <-- snip -->
>
>
> This patch fixes them by #include'ing linux/interrupt.h.
>
>
> Signed-off-by: Adrian Bunk <[email protected]>
>
> --- linux-git/net/ipv4/ipvs/ip_vs_sched.c.old 2006-01-05 14:56:44.000000000 +0100
> +++ linux-git/net/ipv4/ipvs/ip_vs_sched.c 2006-01-05 14:56:59.000000000 +0100
> @@ -22,6 +22,7 @@
> #include <linux/module.h>
> #include <linux/sched.h>
> #include <linux/spinlock.h>
> +#include <linux/interrupt.h>
> #include <asm/string.h>
> #include <linux/kmod.h>
>
> --- linux-git/net/ipv4/ipvs/ip_vs_est.c.old 2006-01-05 14:57:15.000000000 +0100
> +++ linux-git/net/ipv4/ipvs/ip_vs_est.c 2006-01-05 14:57:27.000000000 +0100
> @@ -18,6 +18,7 @@
> #include <linux/jiffies.h>
> #include <linux/slab.h>
> #include <linux/types.h>
> +#include <linux/interrupt.h>
>
> #include <net/ip_vs.h>
>
>

Thats not all either, ./net/ipv4/netfilter/ipt_helper.c has the same
error and the same fix.

Here's the patch for this one. Sorry for the dupe.. i sent the last
as html by accident.

--- linux/net/ipv4/netfilter/ipt_helper.c.old 2006-01-05
19:38:32.498991515 -0500
+++ linux/net/ipv4/netfilter/ipt_helper.c 2006-01-05 19:40:30.047057859 -0500
@@ -13,6 +13,7 @@
#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/netfilter.h>
+#include <linux/interrupt.h>
#if defined(CONFIG_IP_NF_CONNTRACK) || defined(CONFIG_IP_NF_CONNTRACK_MODULE)
#include <linux/netfilter_ipv4/ip_conntrack.h>
#include <linux/netfilter_ipv4/ip_conntrack_core.h>

2006-01-06 21:20:32

by David Miller

[permalink] [raw]
Subject: Re: [2.6 patch] fix ipvs compilation

From: Joe <[email protected]>
Date: Thu, 5 Jan 2006 23:43:52 -0500

> Thats not all either, ./net/ipv4/netfilter/ipt_helper.c has the same
> error and the same fix.
>
> Here's the patch for this one. Sorry for the dupe.. i sent the last
> as html by accident.

Applied, please provide a "Signed-off-by:" line with your patch
next time.

Thanks.

2006-01-07 03:31:04

by Joe Kappus

[permalink] [raw]
Subject: Re: [2.6 patch] fix ipvs compilation

On 1/6/06, David S. Miller <[email protected]> wrote:
> From: Joe <[email protected]>
> Date: Thu, 5 Jan 2006 23:43:52 -0500
>
> > Thats not all either, ./net/ipv4/netfilter/ipt_helper.c has the same
> > error and the same fix.
> >
> > Here's the patch for this one. Sorry for the dupe.. i sent the last
> > as html by accident.
>
> Applied, please provide a "Signed-off-by:" line with your patch
> next time.
>
> Thanks.
>

Why not then, we'll do this one as well since it needs it.

Signed-off-by: Joe Kappus <[email protected]>

--- ./net/ipv4/netfilter/ip_conntrack_proto_sctp.c.old 2006-01-06
22:27:08.885583023 -0500
+++ ./net/ipv4/netfilter/ip_conntrack_proto_sctp.c 2006-01-06
22:27:44.606582972 -0500
@@ -16,6 +16,7 @@
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/timer.h>
+#include <linux/interrupt.h>
#include <linux/netfilter.h>
#include <linux/module.h>
#include <linux/in.h>

2006-01-07 07:16:40

by David Miller

[permalink] [raw]
Subject: Re: [2.6 patch] fix ipvs compilation

From: Joe Kappus <[email protected]>
Date: Fri, 6 Jan 2006 22:30:56 -0500

> Why not then, we'll do this one as well since it needs it.
>
> Signed-off-by: Joe Kappus <[email protected]>

Your email client corrupted the patch, I fixed it up manually
this time, but next time I won't be so nice so please get this
working.

Thanks.