From: Andrew Morton <akpm@osdl.org>
To: yoshfuji@linux-ipv6.org, torvalds@osdl.org, davem@davemloft.net,
netdev@oss.sgi.com
Subject: Re: [IPV4] Fix ip_rt_gc_min_interval_ms procfs/sysctl
Date: Fri, 18 Feb 2005 03:02:22 -0800 [thread overview]
Message-ID: <20050218030222.51fcc83f.akpm@osdl.org> (raw)
In-Reply-To: <20050218024917.2e5c19ec.akpm@osdl.org>
Andrew Morton <akpm@osdl.org> wrote:
>
> A better approach wold be to rework ip_rt_gc_min_interval so that its
> userspace-visible units are milliseconds.
<actually looks at the code>
We are doing, via gc_min_interval_ms.
Funny thing is, sysctl table is treating ip_rt_gc_min_interval as a long,
and it isn't. I wonder if the current code works correctly on 64-bit
big-endian.
Seems to me a simpler fix would be to make it a long?
diff -puN net/ipv4/route.c~a net/ipv4/route.c
--- 25/net/ipv4/route.c~a 2005-02-18 02:58:19.000000000 -0800
+++ 25-akpm/net/ipv4/route.c 2005-02-18 03:01:30.000000000 -0800
@@ -113,7 +113,7 @@ static int ip_rt_max_delay = 10 * HZ;
static int ip_rt_max_size;
static int ip_rt_gc_timeout = RT_GC_TIMEOUT;
static int ip_rt_gc_interval = 60 * HZ;
-static int ip_rt_gc_min_interval = HZ / 2;
+static long ip_rt_gc_min_interval = HZ / 2;
static int ip_rt_redirect_number = 9;
static int ip_rt_redirect_load = HZ / 50;
static int ip_rt_redirect_silence = ((HZ / 50) << (9 + 1));
@@ -2536,9 +2536,9 @@ ctl_table ipv4_route_table[] = {
.ctl_name = NET_IPV4_ROUTE_GC_MIN_INTERVAL,
.procname = "gc_min_interval",
.data = &ip_rt_gc_min_interval,
- .maxlen = sizeof(int),
+ .maxlen = sizeof(long),
.mode = 0644,
- .proc_handler = &proc_dointvec_jiffies,
+ .proc_handler = &proc_doulongvec_minmax,
.strategy = &sysctl_jiffies,
},
{
_
next prev parent reply other threads:[~2005-02-18 11:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-18 10:24 [IPV4] Fix ip_rt_gc_min_interval_ms procfs/sysctl YOSHIFUJI Hideaki / 吉藤英明
2005-02-18 10:49 ` Andrew Morton
2005-02-18 10:59 ` YOSHIFUJI Hideaki / 吉藤英明
2005-02-18 11:02 ` Andrew Morton [this message]
2005-02-18 11:09 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050218030222.51fcc83f.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=davem@davemloft.net \
--cc=netdev@oss.sgi.com \
--cc=torvalds@osdl.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.