* [patch 1/1] ipvs: change type of netns_ipvs->sysctl_sync_qlen_max
@ 2013-04-29 18:55 akpm
2013-04-30 2:24 ` Simon Horman
0 siblings, 1 reply; 4+ messages in thread
From: akpm @ 2013-04-29 18:55 UTC (permalink / raw)
To: davem; +Cc: netdev, akpm, zhangyanfei, horms, ja
From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Subject: ipvs: change type of netns_ipvs->sysctl_sync_qlen_max
This member of struct netns_ipvs is calculated from nr_free_buffer_pages
so change its type to unsigned long in case of overflow. Also, type of
its related proc var sync_qlen_max and the return type of function
sysctl_sync_qlen_max() should be changed to unsigned long, too.
Besides, the type of ipvs_master_sync_state->sync_queue_len should be
changed to unsigned long accordingly.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Julian Anastasov <ja@ssi.bg>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/net/ip_vs.h | 8 ++++----
net/netfilter/ipvs/ip_vs_ctl.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff -puN include/net/ip_vs.h~ipvs-change-type-of-netns_ipvs-sysctl_sync_qlen_max include/net/ip_vs.h
--- a/include/net/ip_vs.h~ipvs-change-type-of-netns_ipvs-sysctl_sync_qlen_max
+++ a/include/net/ip_vs.h
@@ -905,7 +905,7 @@ struct ip_vs_app {
struct ipvs_master_sync_state {
struct list_head sync_queue;
struct ip_vs_sync_buff *sync_buff;
- int sync_queue_len;
+ unsigned long sync_queue_len;
unsigned int sync_queue_delay;
struct task_struct *master_thread;
struct delayed_work master_wakeup_work;
@@ -998,7 +998,7 @@ struct netns_ipvs {
int sysctl_snat_reroute;
int sysctl_sync_ver;
int sysctl_sync_ports;
- int sysctl_sync_qlen_max;
+ unsigned long sysctl_sync_qlen_max;
int sysctl_sync_sock_size;
int sysctl_cache_bypass;
int sysctl_expire_nodest_conn;
@@ -1085,7 +1085,7 @@ static inline int sysctl_sync_ports(stru
return ACCESS_ONCE(ipvs->sysctl_sync_ports);
}
-static inline int sysctl_sync_qlen_max(struct netns_ipvs *ipvs)
+static inline unsigned long sysctl_sync_qlen_max(struct netns_ipvs *ipvs)
{
return ipvs->sysctl_sync_qlen_max;
}
@@ -1138,7 +1138,7 @@ static inline int sysctl_sync_ports(stru
return 1;
}
-static inline int sysctl_sync_qlen_max(struct netns_ipvs *ipvs)
+static inline unsigned long sysctl_sync_qlen_max(struct netns_ipvs *ipvs)
{
return IPVS_SYNC_QLEN_MAX;
}
diff -puN net/netfilter/ipvs/ip_vs_ctl.c~ipvs-change-type-of-netns_ipvs-sysctl_sync_qlen_max net/netfilter/ipvs/ip_vs_ctl.c
--- a/net/netfilter/ipvs/ip_vs_ctl.c~ipvs-change-type-of-netns_ipvs-sysctl_sync_qlen_max
+++ a/net/netfilter/ipvs/ip_vs_ctl.c
@@ -1705,9 +1705,9 @@ static struct ctl_table vs_vars[] = {
},
{
.procname = "sync_qlen_max",
- .maxlen = sizeof(int),
+ .maxlen = sizeof(unsigned long),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_doulongvec_minmax,
},
{
.procname = "sync_sock_size",
_
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 1/1] ipvs: change type of netns_ipvs->sysctl_sync_qlen_max
2013-04-29 18:55 [patch 1/1] ipvs: change type of netns_ipvs->sysctl_sync_qlen_max akpm
@ 2013-04-30 2:24 ` Simon Horman
2013-04-30 4:22 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Simon Horman @ 2013-04-30 2:24 UTC (permalink / raw)
To: akpm; +Cc: davem, netdev, zhangyanfei, ja
On Mon, Apr 29, 2013 at 11:55:10AM -0700, akpm@linux-foundation.org wrote:
> From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
> Subject: ipvs: change type of netns_ipvs->sysctl_sync_qlen_max
>
> This member of struct netns_ipvs is calculated from nr_free_buffer_pages
> so change its type to unsigned long in case of overflow. Also, type of
> its related proc var sync_qlen_max and the return type of function
> sysctl_sync_qlen_max() should be changed to unsigned long, too.
>
> Besides, the type of ipvs_master_sync_state->sync_queue_len should be
> changed to unsigned long accordingly.
>
> Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Julian Anastasov <ja@ssi.bg>
> Cc: David Miller <davem@davemloft.net>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Andrew, David,
It seems most appropriate for me to
queue this up for v3.11 in the ipvs-next tree.
Is that fine?
> ---
>
> include/net/ip_vs.h | 8 ++++----
> net/netfilter/ipvs/ip_vs_ctl.c | 4 ++--
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff -puN include/net/ip_vs.h~ipvs-change-type-of-netns_ipvs-sysctl_sync_qlen_max include/net/ip_vs.h
> --- a/include/net/ip_vs.h~ipvs-change-type-of-netns_ipvs-sysctl_sync_qlen_max
> +++ a/include/net/ip_vs.h
> @@ -905,7 +905,7 @@ struct ip_vs_app {
> struct ipvs_master_sync_state {
> struct list_head sync_queue;
> struct ip_vs_sync_buff *sync_buff;
> - int sync_queue_len;
> + unsigned long sync_queue_len;
> unsigned int sync_queue_delay;
> struct task_struct *master_thread;
> struct delayed_work master_wakeup_work;
> @@ -998,7 +998,7 @@ struct netns_ipvs {
> int sysctl_snat_reroute;
> int sysctl_sync_ver;
> int sysctl_sync_ports;
> - int sysctl_sync_qlen_max;
> + unsigned long sysctl_sync_qlen_max;
> int sysctl_sync_sock_size;
> int sysctl_cache_bypass;
> int sysctl_expire_nodest_conn;
> @@ -1085,7 +1085,7 @@ static inline int sysctl_sync_ports(stru
> return ACCESS_ONCE(ipvs->sysctl_sync_ports);
> }
>
> -static inline int sysctl_sync_qlen_max(struct netns_ipvs *ipvs)
> +static inline unsigned long sysctl_sync_qlen_max(struct netns_ipvs *ipvs)
> {
> return ipvs->sysctl_sync_qlen_max;
> }
> @@ -1138,7 +1138,7 @@ static inline int sysctl_sync_ports(stru
> return 1;
> }
>
> -static inline int sysctl_sync_qlen_max(struct netns_ipvs *ipvs)
> +static inline unsigned long sysctl_sync_qlen_max(struct netns_ipvs *ipvs)
> {
> return IPVS_SYNC_QLEN_MAX;
> }
> diff -puN net/netfilter/ipvs/ip_vs_ctl.c~ipvs-change-type-of-netns_ipvs-sysctl_sync_qlen_max net/netfilter/ipvs/ip_vs_ctl.c
> --- a/net/netfilter/ipvs/ip_vs_ctl.c~ipvs-change-type-of-netns_ipvs-sysctl_sync_qlen_max
> +++ a/net/netfilter/ipvs/ip_vs_ctl.c
> @@ -1705,9 +1705,9 @@ static struct ctl_table vs_vars[] = {
> },
> {
> .procname = "sync_qlen_max",
> - .maxlen = sizeof(int),
> + .maxlen = sizeof(unsigned long),
> .mode = 0644,
> - .proc_handler = proc_dointvec,
> + .proc_handler = proc_doulongvec_minmax,
> },
> {
> .procname = "sync_sock_size",
> _
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" 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] 4+ messages in thread
* Re: [patch 1/1] ipvs: change type of netns_ipvs->sysctl_sync_qlen_max
2013-04-30 2:24 ` Simon Horman
@ 2013-04-30 4:22 ` David Miller
2013-05-01 8:51 ` Simon Horman
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2013-04-30 4:22 UTC (permalink / raw)
To: horms; +Cc: akpm, netdev, zhangyanfei, ja
From: Simon Horman <horms@verge.net.au>
Date: Tue, 30 Apr 2013 11:24:17 +0900
> On Mon, Apr 29, 2013 at 11:55:10AM -0700, akpm@linux-foundation.org wrote:
>> From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
>> Subject: ipvs: change type of netns_ipvs->sysctl_sync_qlen_max
>>
>> This member of struct netns_ipvs is calculated from nr_free_buffer_pages
>> so change its type to unsigned long in case of overflow. Also, type of
>> its related proc var sync_qlen_max and the return type of function
>> sysctl_sync_qlen_max() should be changed to unsigned long, too.
>>
>> Besides, the type of ipvs_master_sync_state->sync_queue_len should be
>> changed to unsigned long accordingly.
>>
>> Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
>> Cc: Simon Horman <horms@verge.net.au>
>> Cc: Julian Anastasov <ja@ssi.bg>
>> Cc: David Miller <davem@davemloft.net>
>> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>
> Andrew, David,
>
> It seems most appropriate for me to
> queue this up for v3.11 in the ipvs-next tree.
>
> Is that fine?
I'm personally fine with that.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 1/1] ipvs: change type of netns_ipvs->sysctl_sync_qlen_max
2013-04-30 4:22 ` David Miller
@ 2013-05-01 8:51 ` Simon Horman
0 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2013-05-01 8:51 UTC (permalink / raw)
To: David Miller; +Cc: akpm, netdev, zhangyanfei, ja
On Tue, Apr 30, 2013 at 12:22:44AM -0400, David Miller wrote:
> From: Simon Horman <horms@verge.net.au>
> Date: Tue, 30 Apr 2013 11:24:17 +0900
>
> > On Mon, Apr 29, 2013 at 11:55:10AM -0700, akpm@linux-foundation.org wrote:
> >> From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
> >> Subject: ipvs: change type of netns_ipvs->sysctl_sync_qlen_max
> >>
> >> This member of struct netns_ipvs is calculated from nr_free_buffer_pages
> >> so change its type to unsigned long in case of overflow. Also, type of
> >> its related proc var sync_qlen_max and the return type of function
> >> sysctl_sync_qlen_max() should be changed to unsigned long, too.
> >>
> >> Besides, the type of ipvs_master_sync_state->sync_queue_len should be
> >> changed to unsigned long accordingly.
> >>
> >> Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
> >> Cc: Simon Horman <horms@verge.net.au>
> >> Cc: Julian Anastasov <ja@ssi.bg>
> >> Cc: David Miller <davem@davemloft.net>
> >> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> >
> > Andrew, David,
> >
> > It seems most appropriate for me to
> > queue this up for v3.11 in the ipvs-next tree.
> >
> > Is that fine?
>
> I'm personally fine with that.
Thanks, queued-up accordingly.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-01 8:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-29 18:55 [patch 1/1] ipvs: change type of netns_ipvs->sysctl_sync_qlen_max akpm
2013-04-30 2:24 ` Simon Horman
2013-04-30 4:22 ` David Miller
2013-05-01 8:51 ` Simon Horman
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).