All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netfilter: ipvs: fix compiler warnings
@ 2011-01-25  4:40 Changli Gao
  2011-01-25  5:05 ` Simon Horman
  2011-01-25  6:49 ` Hans Schillstrom
  0 siblings, 2 replies; 14+ messages in thread
From: Changli Gao @ 2011-01-25  4:40 UTC (permalink / raw)
  To: Simon Horman
  Cc: Wensong Zhang, Julian Anastasov, Patrick McHardy,
	David S. Miller, netdev, lvs-devel, netfilter-devel, Changli Gao

Fix compiler warnings when IP_VS_DBG() isn't defined.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
 net/netfilter/ipvs/ip_vs_core.c  |    4 +---
 3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index f36a84f..d889f4f 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1894,9 +1894,7 @@ static int __net_init __ip_vs_init(struct net *net)
 
 static void __net_exit __ip_vs_cleanup(struct net *net)
 {
-	struct netns_ipvs *ipvs = net_ipvs(net);

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

* Re: [PATCH] netfilter: ipvs: fix compiler warnings
  2011-01-25  4:40 [PATCH] netfilter: ipvs: fix compiler warnings Changli Gao
@ 2011-01-25  5:05 ` Simon Horman
  2011-01-25 10:25   ` Patrick McHardy
  2011-01-25  6:49 ` Hans Schillstrom
  1 sibling, 1 reply; 14+ messages in thread
From: Simon Horman @ 2011-01-25  5:05 UTC (permalink / raw)
  To: Changli Gao
  Cc: Wensong Zhang, Julian Anastasov, Patrick McHardy,
	David S. Miller, netdev, lvs-devel, netfilter-devel

On Tue, Jan 25, 2011 at 12:40:18PM +0800, Changli Gao wrote:
> Fix compiler warnings when IP_VS_DBG() isn't defined.
> 
> Signed-off-by: Changli Gao <xiaosuo@gmail.com>

Thanks, I will queue this up for when nf-next-2.6 is open again.

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

* Re: [PATCH] netfilter: ipvs: fix compiler warnings
  2011-01-25  4:40 [PATCH] netfilter: ipvs: fix compiler warnings Changli Gao
  2011-01-25  5:05 ` Simon Horman
@ 2011-01-25  6:49 ` Hans Schillstrom
  1 sibling, 0 replies; 14+ messages in thread
From: Hans Schillstrom @ 2011-01-25  6:49 UTC (permalink / raw)
  To: Changli Gao
  Cc: Simon Horman, Wensong Zhang, Julian Anastasov, Patrick McHardy,
	David S. Miller, netdev, lvs-devel, netfilter-devel

On Tuesday, January 25, 2011 05:40:18 Changli Gao wrote:
> Fix compiler warnings when IP_VS_DBG() isn't defined.
> 
> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Acked-by: Hans Schillstrom <hans.schillstrom@ericsson.com>

> ---
>  net/netfilter/ipvs/ip_vs_core.c  |    4 +---
>  3 files changed, 9 insertions(+), 3 deletions(-)
> diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
> index f36a84f..d889f4f 100644
> --- a/net/netfilter/ipvs/ip_vs_core.c
> +++ b/net/netfilter/ipvs/ip_vs_core.c
> @@ -1894,9 +1894,7 @@ static int __net_init __ip_vs_init(struct net *net)
>  
>  static void __net_exit __ip_vs_cleanup(struct net *net)
>  {
> -	struct netns_ipvs *ipvs = net_ipvs(net);
> -
> -	IP_VS_DBG(10, "ipvs netns %d released\n", ipvs->gen);
> +	IP_VS_DBG(10, "ipvs netns %d released\n", net_ipvs(net)->gen);
>  }
>  
>  static struct pernet_operations ipvs_core_ops = {
> --
Thanks I forgot that one.

Regards
Hans Schillstrom

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

* Re: [PATCH] netfilter: ipvs: fix compiler warnings
  2011-01-25  5:05 ` Simon Horman
@ 2011-01-25 10:25   ` Patrick McHardy
  2011-01-25 13:09     ` Simon Horman
  0 siblings, 1 reply; 14+ messages in thread
From: Patrick McHardy @ 2011-01-25 10:25 UTC (permalink / raw)
  To: Simon Horman
  Cc: Changli Gao, Wensong Zhang, Julian Anastasov, David S. Miller,
	netdev, lvs-devel, netfilter-devel

On 25.01.2011 06:05, Simon Horman wrote:
> On Tue, Jan 25, 2011 at 12:40:18PM +0800, Changli Gao wrote:
>> Fix compiler warnings when IP_VS_DBG() isn't defined.
>>
>> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
> 
> Thanks, I will queue this up for when nf-next-2.6 is open again.

It's already open.

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

* Re: [PATCH] netfilter: ipvs: fix compiler warnings
  2011-01-25 10:25   ` Patrick McHardy
@ 2011-01-25 13:09     ` Simon Horman
  2011-01-25 13:15       ` Simon Horman
  2011-01-25 13:51       ` Patrick McHardy
  0 siblings, 2 replies; 14+ messages in thread
From: Simon Horman @ 2011-01-25 13:09 UTC (permalink / raw)
  To: Patrick McHardy
  Cc: Changli Gao, Wensong Zhang, Julian Anastasov, David S. Miller,
	netdev, lvs-devel, netfilter-devel

On Tue, Jan 25, 2011 at 11:25:42AM +0100, Patrick McHardy wrote:
> On 25.01.2011 06:05, Simon Horman wrote:
> > On Tue, Jan 25, 2011 at 12:40:18PM +0800, Changli Gao wrote:
> >> Fix compiler warnings when IP_VS_DBG() isn't defined.
> >>
> >> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
> > 
> > Thanks, I will queue this up for when nf-next-2.6 is open again.
> 
> It's already open.
> 

Hi Patrick,

I'm a little unsure how you would like me to differentiate
between fixes for 2.6.38 - e.g. my previous two pull requests.
And patches intended for 2.6.39.

In any case I will send a pull request that includes
Changli's change against nf-next-2.6.

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

* Re: [PATCH] netfilter: ipvs: fix compiler warnings
  2011-01-25 13:09     ` Simon Horman
@ 2011-01-25 13:15       ` Simon Horman
  2011-01-25 21:22         ` Julian Anastasov
  2011-01-25 13:51       ` Patrick McHardy
  1 sibling, 1 reply; 14+ messages in thread
From: Simon Horman @ 2011-01-25 13:15 UTC (permalink / raw)
  To: Patrick McHardy
  Cc: Changli Gao, Wensong Zhang, Julian Anastasov, David S. Miller,
	netdev, lvs-devel, netfilter-devel

On Tue, Jan 25, 2011 at 11:09:35PM +1000, Simon Horman wrote:
> On Tue, Jan 25, 2011 at 11:25:42AM +0100, Patrick McHardy wrote:
> > On 25.01.2011 06:05, Simon Horman wrote:
> > > On Tue, Jan 25, 2011 at 12:40:18PM +0800, Changli Gao wrote:
> > >> Fix compiler warnings when IP_VS_DBG() isn't defined.
> > >>
> > >> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
> > > 
> > > Thanks, I will queue this up for when nf-next-2.6 is open again.
> > 
> > It's already open.
> > 
> 
> Hi Patrick,
> 
> I'm a little unsure how you would like me to differentiate
> between fixes for 2.6.38 - e.g. my previous two pull requests.
> And patches intended for 2.6.39.
> 
> In any case I will send a pull request that includes
> Changli's change against nf-next-2.6.

Actually, I realise that Changli's change is actually
2.6.38 material. I'll send a pull request. Please ignore
my noise about 2.6.39.

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

* Re: [PATCH] netfilter: ipvs: fix compiler warnings
  2011-01-25 13:09     ` Simon Horman
  2011-01-25 13:15       ` Simon Horman
@ 2011-01-25 13:51       ` Patrick McHardy
  1 sibling, 0 replies; 14+ messages in thread
From: Patrick McHardy @ 2011-01-25 13:51 UTC (permalink / raw)
  To: Simon Horman
  Cc: Changli Gao, Wensong Zhang, Julian Anastasov, David S. Miller,
	netdev, lvs-devel, netfilter-devel

On 25.01.2011 14:09, Simon Horman wrote:
> On Tue, Jan 25, 2011 at 11:25:42AM +0100, Patrick McHardy wrote:
>> On 25.01.2011 06:05, Simon Horman wrote:
>>> On Tue, Jan 25, 2011 at 12:40:18PM +0800, Changli Gao wrote:
>>>> Fix compiler warnings when IP_VS_DBG() isn't defined.
>>>>
>>>> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
>>>
>>> Thanks, I will queue this up for when nf-next-2.6 is open again.
>>
>> It's already open.
>>
> 
> Hi Patrick,
> 
> I'm a little unsure how you would like me to differentiate
> between fixes for 2.6.38 - e.g. my previous two pull requests.
> And patches intended for 2.6.39.

Oh, I thought those were intended for -next because it included
a netns fix. Best is to just state the intended tree in your
pull request.

> In any case I will send a pull request that includes
> Changli's change against nf-next-2.6.

Thanks.

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

* Re: [PATCH] netfilter: ipvs: fix compiler warnings
  2011-01-25 13:15       ` Simon Horman
@ 2011-01-25 21:22         ` Julian Anastasov
  0 siblings, 0 replies; 14+ messages in thread
From: Julian Anastasov @ 2011-01-25 21:22 UTC (permalink / raw)
  To: Simon Horman
  Cc: Patrick McHardy, Changli Gao, Wensong Zhang, David S. Miller,
	netdev, lvs-devel, netfilter-devel


 	Hello,

On Tue, 25 Jan 2011, Simon Horman wrote:

>> Hi Patrick,
>>
>> I'm a little unsure how you would like me to differentiate
>> between fixes for 2.6.38 - e.g. my previous two pull requests.
>> And patches intended for 2.6.39.
>>
>> In any case I will send a pull request that includes
>> Changli's change against nf-next-2.6.
>
> Actually, I realise that Changli's change is actually
> 2.6.38 material. I'll send a pull request. Please ignore
> my noise about 2.6.39.

 	Simon, I don't see IPVS netns work in 2.6.38-rc2,
so these changes are not for 2.6.38-rc.

Regards

--
Julian Anastasov <ja@ssi.bg>

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

* Re: [PATCH] netfilter: ipvs: fix compiler warnings
  2011-01-22  3:11     ` Simon Horman
@ 2011-01-22  3:12       ` Simon Horman
  0 siblings, 0 replies; 14+ messages in thread
From: Simon Horman @ 2011-01-22  3:12 UTC (permalink / raw)
  To: Changli Gao
  Cc: Wensong Zhang, Julian Anastasov, Patrick McHardy,
	David S. Miller, netdev, lvs-devel, netfilter-devel

On Sat, Jan 22, 2011 at 02:11:16PM +1100, Simon Horman wrote:
> On Sat, Jan 22, 2011 at 10:34:23AM +0800, Changli Gao wrote:
> > On Sat, Jan 22, 2011 at 10:22 AM, Simon Horman <horms@verge.net.au> wrote:
> > > On Fri, Jan 21, 2011 at 06:02:13PM +0800, Changli Gao wrote:
> > >> Fix compiler warnings when no transport protocol load balancing support
> > >> is configured.
> > >>
> > >> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
> > >> ---
> > >>  net/netfilter/ipvs/ip_vs_core.c  |    4 +---
> > >>  net/netfilter/ipvs/ip_vs_ctl.c   |    4 ++++
> > >>  net/netfilter/ipvs/ip_vs_proto.c |    4 ++++
> > >>  3 files changed, 9 insertions(+), 3 deletions(-)
> > >> diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
> > >> index f36a84f..d889f4f 100644
> > >> --- a/net/netfilter/ipvs/ip_vs_core.c
> > >> +++ b/net/netfilter/ipvs/ip_vs_core.c
> > >> @@ -1894,9 +1894,7 @@ static int __net_init __ip_vs_init(struct net *net)
> > >>
> > >>  static void __net_exit __ip_vs_cleanup(struct net *net)
> > >>  {
> > >> -     struct netns_ipvs *ipvs = net_ipvs(net);
> > >> -
> > >> -     IP_VS_DBG(10, "ipvs netns %d released\n", ipvs->gen);
> > >> +     IP_VS_DBG(10, "ipvs netns %d released\n", net_ipvs(net)->gen);
> > >>  }
> > >>
> > >
> > > The hunk above seems unrelated to the problem described.
> > > The rest of the changes look good. I will double check and
> > > apply them to my tree.
> > >
> > 
> > Yes, is a separated patch needed? It is trivial. Thanks.
> 
> Yes, please send a separate patch.

To clarify, I have applied the other hunks and included
them in a pull request that I sent to Patrick a few moments ago.

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

* Re: [PATCH] netfilter: ipvs: fix compiler warnings
  2011-01-22  2:34   ` Changli Gao
@ 2011-01-22  3:11     ` Simon Horman
  2011-01-22  3:12       ` Simon Horman
  0 siblings, 1 reply; 14+ messages in thread
From: Simon Horman @ 2011-01-22  3:11 UTC (permalink / raw)
  To: Changli Gao
  Cc: Wensong Zhang, Julian Anastasov, Patrick McHardy,
	David S. Miller, netdev, lvs-devel, netfilter-devel

On Sat, Jan 22, 2011 at 10:34:23AM +0800, Changli Gao wrote:
> On Sat, Jan 22, 2011 at 10:22 AM, Simon Horman <horms@verge.net.au> wrote:
> > On Fri, Jan 21, 2011 at 06:02:13PM +0800, Changli Gao wrote:
> >> Fix compiler warnings when no transport protocol load balancing support
> >> is configured.
> >>
> >> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
> >> ---
> >>  net/netfilter/ipvs/ip_vs_core.c  |    4 +---
> >>  net/netfilter/ipvs/ip_vs_ctl.c   |    4 ++++
> >>  net/netfilter/ipvs/ip_vs_proto.c |    4 ++++
> >>  3 files changed, 9 insertions(+), 3 deletions(-)
> >> diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
> >> index f36a84f..d889f4f 100644
> >> --- a/net/netfilter/ipvs/ip_vs_core.c
> >> +++ b/net/netfilter/ipvs/ip_vs_core.c
> >> @@ -1894,9 +1894,7 @@ static int __net_init __ip_vs_init(struct net *net)
> >>
> >>  static void __net_exit __ip_vs_cleanup(struct net *net)
> >>  {
> >> -     struct netns_ipvs *ipvs = net_ipvs(net);
> >> -
> >> -     IP_VS_DBG(10, "ipvs netns %d released\n", ipvs->gen);
> >> +     IP_VS_DBG(10, "ipvs netns %d released\n", net_ipvs(net)->gen);
> >>  }
> >>
> >
> > The hunk above seems unrelated to the problem described.
> > The rest of the changes look good. I will double check and
> > apply them to my tree.
> >
> 
> Yes, is a separated patch needed? It is trivial. Thanks.

Yes, please send a separate patch.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] netfilter: ipvs: fix compiler warnings
  2011-01-22  2:22 ` Simon Horman
@ 2011-01-22  2:34   ` Changli Gao
  2011-01-22  3:11     ` Simon Horman
  0 siblings, 1 reply; 14+ messages in thread
From: Changli Gao @ 2011-01-22  2:34 UTC (permalink / raw)
  To: Simon Horman
  Cc: Wensong Zhang, Julian Anastasov, Patrick McHardy,
	David S. Miller, netdev, lvs-devel, netfilter-devel

On Sat, Jan 22, 2011 at 10:22 AM, Simon Horman <horms@verge.net.au> wrote:
> On Fri, Jan 21, 2011 at 06:02:13PM +0800, Changli Gao wrote:
>> Fix compiler warnings when no transport protocol load balancing support
>> is configured.
>>
>> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
>> ---
>>  net/netfilter/ipvs/ip_vs_core.c  |    4 +---
>>  net/netfilter/ipvs/ip_vs_ctl.c   |    4 ++++
>>  net/netfilter/ipvs/ip_vs_proto.c |    4 ++++
>>  3 files changed, 9 insertions(+), 3 deletions(-)
>> diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
>> index f36a84f..d889f4f 100644
>> --- a/net/netfilter/ipvs/ip_vs_core.c
>> +++ b/net/netfilter/ipvs/ip_vs_core.c
>> @@ -1894,9 +1894,7 @@ static int __net_init __ip_vs_init(struct net *net)
>>
>>  static void __net_exit __ip_vs_cleanup(struct net *net)
>>  {
>> -     struct netns_ipvs *ipvs = net_ipvs(net);
>> -
>> -     IP_VS_DBG(10, "ipvs netns %d released\n", ipvs->gen);
>> +     IP_VS_DBG(10, "ipvs netns %d released\n", net_ipvs(net)->gen);
>>  }
>>
>
> The hunk above seems unrelated to the problem described.
> The rest of the changes look good. I will double check and
> apply them to my tree.
>

Yes, is a separated patch needed? It is trivial. Thanks.

-- 
Regards,
Changli Gao(xiaosuo@gmail.com)

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

* Re: [PATCH] netfilter: ipvs: fix compiler warnings
  2011-01-21 10:02 Changli Gao
  2011-01-21 16:50 ` Patrick McHardy
@ 2011-01-22  2:22 ` Simon Horman
  2011-01-22  2:34   ` Changli Gao
  1 sibling, 1 reply; 14+ messages in thread
From: Simon Horman @ 2011-01-22  2:22 UTC (permalink / raw)
  To: Changli Gao
  Cc: Wensong Zhang, Julian Anastasov, Patrick McHardy,
	David S. Miller, netdev, lvs-devel, netfilter-devel

On Fri, Jan 21, 2011 at 06:02:13PM +0800, Changli Gao wrote:
> Fix compiler warnings when no transport protocol load balancing support
> is configured.
> 
> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
> ---
>  net/netfilter/ipvs/ip_vs_core.c  |    4 +---
>  net/netfilter/ipvs/ip_vs_ctl.c   |    4 ++++
>  net/netfilter/ipvs/ip_vs_proto.c |    4 ++++
>  3 files changed, 9 insertions(+), 3 deletions(-)
> diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
> index f36a84f..d889f4f 100644
> --- a/net/netfilter/ipvs/ip_vs_core.c
> +++ b/net/netfilter/ipvs/ip_vs_core.c
> @@ -1894,9 +1894,7 @@ static int __net_init __ip_vs_init(struct net *net)
>  
>  static void __net_exit __ip_vs_cleanup(struct net *net)
>  {
> -	struct netns_ipvs *ipvs = net_ipvs(net);
> -
> -	IP_VS_DBG(10, "ipvs netns %d released\n", ipvs->gen);
> +	IP_VS_DBG(10, "ipvs netns %d released\n", net_ipvs(net)->gen);
>  }
>  

The hunk above seems unrelated to the problem described.
The rest of the changes look good. I will double check and
apply them to my tree.

Patrick, I have another fix. So I think it would be best
to take this fix though my tree and. I'll send you a pull
request shortly.

>  static struct pernet_operations ipvs_core_ops = {
> diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
> index 09ca2ce..68b8033 100644
> --- a/net/netfilter/ipvs/ip_vs_ctl.c
> +++ b/net/netfilter/ipvs/ip_vs_ctl.c
> @@ -2062,7 +2062,9 @@ static const struct file_operations ip_vs_stats_percpu_fops = {
>   */
>  static int ip_vs_set_timeout(struct net *net, struct ip_vs_timeout_user *u)
>  {
> +#if defined(CONFIG_IP_VS_PROTO_TCP) || defined(CONFIG_IP_VS_PROTO_UDP)
>  	struct ip_vs_proto_data *pd;
> +#endif
>  
>  	IP_VS_DBG(2, "Setting timeout tcp:%d tcpfin:%d udp:%d\n",
>  		  u->tcp_timeout,
> @@ -2405,7 +2407,9 @@ __ip_vs_get_dest_entries(struct net *net, const struct ip_vs_get_dests *get,
>  static inline void
>  __ip_vs_get_timeouts(struct net *net, struct ip_vs_timeout_user *u)
>  {
> +#if defined(CONFIG_IP_VS_PROTO_TCP) || defined(CONFIG_IP_VS_PROTO_UDP)
>  	struct ip_vs_proto_data *pd;
> +#endif
>  
>  #ifdef CONFIG_IP_VS_PROTO_TCP
>  	pd = ip_vs_proto_data_get(net, IPPROTO_TCP);
> diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c
> index 6ac986c..17484a4 100644
> --- a/net/netfilter/ipvs/ip_vs_proto.c
> +++ b/net/netfilter/ipvs/ip_vs_proto.c
> @@ -60,6 +60,9 @@ static int __used __init register_ip_vs_protocol(struct ip_vs_protocol *pp)
>  	return 0;
>  }
>  
> +#if defined(CONFIG_IP_VS_PROTO_TCP) || defined(CONFIG_IP_VS_PROTO_UDP) || \
> +    defined(CONFIG_IP_VS_PROTO_SCTP) || defined(CONFIG_IP_VS_PROTO_AH) || \
> +    defined(CONFIG_IP_VS_PROTO_ESP)
>  /*
>   *	register an ipvs protocols netns related data
>   */
> @@ -85,6 +88,7 @@ register_ip_vs_proto_netns(struct net *net, struct ip_vs_protocol *pp)
>  
>  	return 0;
>  }
> +#endif
>  
>  /*
>   *	unregister an ipvs protocol
> 

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

* Re: [PATCH] netfilter: ipvs: fix compiler warnings
  2011-01-21 10:02 Changli Gao
@ 2011-01-21 16:50 ` Patrick McHardy
  2011-01-22  2:22 ` Simon Horman
  1 sibling, 0 replies; 14+ messages in thread
From: Patrick McHardy @ 2011-01-21 16:50 UTC (permalink / raw)
  To: Changli Gao
  Cc: Simon Horman, Wensong Zhang, Julian Anastasov, David S. Miller,
	netdev, lvs-devel, netfilter-devel

Am 21.01.2011 11:02, schrieb Changli Gao:
> Fix compiler warnings when no transport protocol load balancing support
> is configured.

Thanks Changli, I'll apply your patch once one of the IPVS developers
ACKs this.

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

* [PATCH] netfilter: ipvs: fix compiler warnings
@ 2011-01-21 10:02 Changli Gao
  2011-01-21 16:50 ` Patrick McHardy
  2011-01-22  2:22 ` Simon Horman
  0 siblings, 2 replies; 14+ messages in thread
From: Changli Gao @ 2011-01-21 10:02 UTC (permalink / raw)
  To: Simon Horman
  Cc: Wensong Zhang, Julian Anastasov, Patrick McHardy,
	David S. Miller, netdev, lvs-devel, netfilter-devel, Changli Gao

Fix compiler warnings when no transport protocol load balancing support
is configured.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
 net/netfilter/ipvs/ip_vs_core.c  |    4 +---
 net/netfilter/ipvs/ip_vs_ctl.c   |    4 ++++
 net/netfilter/ipvs/ip_vs_proto.c |    4 ++++
 3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index f36a84f..d889f4f 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1894,9 +1894,7 @@ static int __net_init __ip_vs_init(struct net *net)
 
 static void __net_exit __ip_vs_cleanup(struct net *net)
 {
-	struct netns_ipvs *ipvs = net_ipvs(net);
-
-	IP_VS_DBG(10, "ipvs netns %d released\n", ipvs->gen);
+	IP_VS_DBG(10, "ipvs netns %d released\n", net_ipvs(net)->gen);
 }
 
 static struct pernet_operations ipvs_core_ops = {
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index 09ca2ce..68b8033 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -2062,7 +2062,9 @@ static const struct file_operations ip_vs_stats_percpu_fops = {
  */
 static int ip_vs_set_timeout(struct net *net, struct ip_vs_timeout_user *u)
 {
+#if defined(CONFIG_IP_VS_PROTO_TCP) || defined(CONFIG_IP_VS_PROTO_UDP)
 	struct ip_vs_proto_data *pd;
+#endif
 
 	IP_VS_DBG(2, "Setting timeout tcp:%d tcpfin:%d udp:%d\n",
 		  u->tcp_timeout,
@@ -2405,7 +2407,9 @@ __ip_vs_get_dest_entries(struct net *net, const struct ip_vs_get_dests *get,
 static inline void
 __ip_vs_get_timeouts(struct net *net, struct ip_vs_timeout_user *u)
 {
+#if defined(CONFIG_IP_VS_PROTO_TCP) || defined(CONFIG_IP_VS_PROTO_UDP)
 	struct ip_vs_proto_data *pd;
+#endif
 
 #ifdef CONFIG_IP_VS_PROTO_TCP
 	pd = ip_vs_proto_data_get(net, IPPROTO_TCP);
diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c
index 6ac986c..17484a4 100644
--- a/net/netfilter/ipvs/ip_vs_proto.c
+++ b/net/netfilter/ipvs/ip_vs_proto.c
@@ -60,6 +60,9 @@ static int __used __init register_ip_vs_protocol(struct ip_vs_protocol *pp)
 	return 0;
 }
 
+#if defined(CONFIG_IP_VS_PROTO_TCP) || defined(CONFIG_IP_VS_PROTO_UDP) || \
+    defined(CONFIG_IP_VS_PROTO_SCTP) || defined(CONFIG_IP_VS_PROTO_AH) || \
+    defined(CONFIG_IP_VS_PROTO_ESP)
 /*
  *	register an ipvs protocols netns related data
  */
@@ -85,6 +88,7 @@ register_ip_vs_proto_netns(struct net *net, struct ip_vs_protocol *pp)
 
 	return 0;
 }
+#endif
 
 /*
  *	unregister an ipvs protocol

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

end of thread, other threads:[~2011-01-25 21:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25  4:40 [PATCH] netfilter: ipvs: fix compiler warnings Changli Gao
2011-01-25  5:05 ` Simon Horman
2011-01-25 10:25   ` Patrick McHardy
2011-01-25 13:09     ` Simon Horman
2011-01-25 13:15       ` Simon Horman
2011-01-25 21:22         ` Julian Anastasov
2011-01-25 13:51       ` Patrick McHardy
2011-01-25  6:49 ` Hans Schillstrom
  -- strict thread matches above, loose matches on Subject: below --
2011-01-21 10:02 Changli Gao
2011-01-21 16:50 ` Patrick McHardy
2011-01-22  2:22 ` Simon Horman
2011-01-22  2:34   ` Changli Gao
2011-01-22  3:11     ` Simon Horman
2011-01-22  3:12       ` Simon Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.