Commit d81a2253 authored by Robert Olsson's avatar Robert Olsson Committed by Thomas Graf

[IPV4]: Add gc_min_interval_ms sysctl.

The existing seconds based gc_min_interval is barely
usable.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0aeb8293
...@@ -1709,12 +1709,13 @@ flush ...@@ -1709,12 +1709,13 @@ flush
Writing to this file results in a flush of the routing cache. Writing to this file results in a flush of the routing cache.
gc_elasticity, gc_interval, gc_min_interval, gc_tresh, gc_timeout, gc_elasticity, gc_interval, gc_min_interval_ms, gc_timeout, gc_thresh
gc_thresh, gc_thresh1, gc_thresh2, gc_thresh3 ---------------------------------------------------------------------
--------------------------------------------------------------
Values to control the frequency and behavior of the garbage collection Values to control the frequency and behavior of the garbage collection
algorithm for the routing cache. algorithm for the routing cache. gc_min_interval is deprecated and replaced
by gc_min_interval_ms.
max_size max_size
-------- --------
......
...@@ -365,6 +365,7 @@ enum { ...@@ -365,6 +365,7 @@ enum {
NET_IPV4_ROUTE_MIN_PMTU=16, NET_IPV4_ROUTE_MIN_PMTU=16,
NET_IPV4_ROUTE_MIN_ADVMSS=17, NET_IPV4_ROUTE_MIN_ADVMSS=17,
NET_IPV4_ROUTE_SECRET_INTERVAL=18, NET_IPV4_ROUTE_SECRET_INTERVAL=18,
NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS=19,
}; };
enum enum
......
...@@ -2529,6 +2529,8 @@ ctl_table ipv4_route_table[] = { ...@@ -2529,6 +2529,8 @@ ctl_table ipv4_route_table[] = {
.proc_handler = &proc_dointvec, .proc_handler = &proc_dointvec,
}, },
{ {
/* Deprecated. Use gc_min_interval_ms */
.ctl_name = NET_IPV4_ROUTE_GC_MIN_INTERVAL, .ctl_name = NET_IPV4_ROUTE_GC_MIN_INTERVAL,
.procname = "gc_min_interval", .procname = "gc_min_interval",
.data = &ip_rt_gc_min_interval, .data = &ip_rt_gc_min_interval,
...@@ -2537,6 +2539,15 @@ ctl_table ipv4_route_table[] = { ...@@ -2537,6 +2539,15 @@ ctl_table ipv4_route_table[] = {
.proc_handler = &proc_dointvec_jiffies, .proc_handler = &proc_dointvec_jiffies,
.strategy = &sysctl_jiffies, .strategy = &sysctl_jiffies,
}, },
{
.ctl_name = NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS,
.procname = "gc_min_interval_ms",
.data = &ip_rt_gc_min_interval,
.maxlen = sizeof(unsigned long),
.mode = 0644,
.proc_handler = &proc_doulongvec_ms_jiffies_minmax,
.strategy = &sysctl_jiffies,
},
{ {
.ctl_name = NET_IPV4_ROUTE_GC_TIMEOUT, .ctl_name = NET_IPV4_ROUTE_GC_TIMEOUT,
.procname = "gc_timeout", .procname = "gc_timeout",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment