[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211223122010.569553-1-xu.xin16@zte.com.cn>
Date: Thu, 23 Dec 2021 12:20:10 +0000
From: cgel.zte@...il.com
To: davem@...emloft.net
Cc: yoshfuji@...ux-ipv6.org, dsahern@...nel.org, kuba@...nel.org,
prestwoj@...il.com, xu.xin16@....com.cn, zxu@...kedin.com,
praveen5582@...il.com, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, Zeal Robot <zealci@....com.cn>
Subject: [PATCH net-next] ipv4: delete sysctls about routing cache
From: xu xin <xu.xin16@....com.cn>
Since routing cache in ipv4 has been deleted in 2012, the sysctls about
it are useless.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: xu xin <xu.xin16@....com.cn>
---
include/uapi/linux/sysctl.h | 10 ++++----
net/ipv4/route.c | 48 -------------------------------------
2 files changed, 5 insertions(+), 53 deletions(-)
diff --git a/include/uapi/linux/sysctl.h b/include/uapi/linux/sysctl.h
index 6a3b194c50fe..72ecdf38c4ed 100644
--- a/include/uapi/linux/sysctl.h
+++ b/include/uapi/linux/sysctl.h
@@ -432,9 +432,9 @@ enum {
NET_IPV4_ROUTE_FLUSH=1,
NET_IPV4_ROUTE_MIN_DELAY=2, /* obsolete since 2.6.25 */
NET_IPV4_ROUTE_MAX_DELAY=3, /* obsolete since 2.6.25 */
- NET_IPV4_ROUTE_GC_THRESH=4,
- NET_IPV4_ROUTE_MAX_SIZE=5,
- NET_IPV4_ROUTE_GC_MIN_INTERVAL=6,
+ NET_IPV4_ROUTE_GC_THRESH=4, /* obsolete */
+ NET_IPV4_ROUTE_MAX_SIZE=5, /* obsolete */
+ NET_IPV4_ROUTE_GC_MIN_INTERVAL=6, /* obsolete */
NET_IPV4_ROUTE_GC_TIMEOUT=7,
NET_IPV4_ROUTE_GC_INTERVAL=8, /* obsolete since 2.6.38 */
NET_IPV4_ROUTE_REDIRECT_LOAD=9,
@@ -442,12 +442,12 @@ enum {
NET_IPV4_ROUTE_REDIRECT_SILENCE=11,
NET_IPV4_ROUTE_ERROR_COST=12,
NET_IPV4_ROUTE_ERROR_BURST=13,
- NET_IPV4_ROUTE_GC_ELASTICITY=14,
+ NET_IPV4_ROUTE_GC_ELASTICITY=14, /* obsolete */
NET_IPV4_ROUTE_MTU_EXPIRES=15,
NET_IPV4_ROUTE_MIN_PMTU=16,
NET_IPV4_ROUTE_MIN_ADVMSS=17,
NET_IPV4_ROUTE_SECRET_INTERVAL=18,
- NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS=19,
+ NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS=19, /* obsolete */
};
enum
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 843a7a3699fe..4b0d7d654859 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -110,7 +110,6 @@
#define RT_GC_TIMEOUT (300*HZ)
-static int ip_rt_max_size;
static int ip_rt_redirect_number __read_mostly = 9;
static int ip_rt_redirect_load __read_mostly = HZ / 50;
static int ip_rt_redirect_silence __read_mostly = ((HZ / 50) << (9 + 1));
@@ -3428,8 +3427,6 @@ void ip_rt_multicast_event(struct in_device *in_dev)
}
#ifdef CONFIG_SYSCTL
-static int ip_rt_gc_interval __read_mostly = 60 * HZ;
-static int ip_rt_gc_min_interval __read_mostly = HZ / 2;
static int ip_rt_gc_elasticity __read_mostly = 8;
static int ip_min_valid_pmtu __read_mostly = IPV4_MIN_MTU;
@@ -3448,36 +3445,6 @@ static int ipv4_sysctl_rtcache_flush(struct ctl_table *__ctl, int write,
}
static struct ctl_table ipv4_route_table[] = {
- {
- .procname = "gc_thresh",
- .data = &ipv4_dst_ops.gc_thresh,
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec,
- },
- {
- .procname = "max_size",
- .data = &ip_rt_max_size,
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec,
- },
- {
- /* Deprecated. Use gc_min_interval_ms */
-
- .procname = "gc_min_interval",
- .data = &ip_rt_gc_min_interval,
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
- {
- .procname = "gc_min_interval_ms",
- .data = &ip_rt_gc_min_interval,
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec_ms_jiffies,
- },
{
.procname = "gc_timeout",
.data = &ip_rt_gc_timeout,
@@ -3485,13 +3452,6 @@ static struct ctl_table ipv4_route_table[] = {
.mode = 0644,
.proc_handler = proc_dointvec_jiffies,
},
- {
- .procname = "gc_interval",
- .data = &ip_rt_gc_interval,
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
{
.procname = "redirect_load",
.data = &ip_rt_redirect_load,
@@ -3527,13 +3487,6 @@ static struct ctl_table ipv4_route_table[] = {
.mode = 0644,
.proc_handler = proc_dointvec,
},
- {
- .procname = "gc_elasticity",
- .data = &ip_rt_gc_elasticity,
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec,
- },
{
.procname = "mtu_expires",
.data = &ip_rt_mtu_expires,
@@ -3705,7 +3658,6 @@ int __init ip_rt_init(void)
panic("IP: failed to allocate ipv4_dst_blackhole_ops counter\n");
ipv4_dst_ops.gc_thresh = ~0;
- ip_rt_max_size = INT_MAX;
devinet_init();
ip_fib_init();
--
2.25.1
Powered by blists - more mailing lists