All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] ipv4: delete sysctls about routing cache
@ 2021-12-23 12:20 cgel.zte
  2021-12-23 16:47 ` Jakub Kicinski
  0 siblings, 1 reply; 3+ messages in thread
From: cgel.zte @ 2021-12-23 12:20 UTC (permalink / raw)
  To: davem
  Cc: yoshfuji, dsahern, kuba, prestwoj, xu.xin16, zxu, praveen5582,
	linux-kernel, netdev, Zeal Robot

From: xu xin <xu.xin16@zte.com.cn>

Since routing cache in ipv4 has been deleted in 2012, the sysctls about
it are useless.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: xu xin <xu.xin16@zte.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


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

end of thread, other threads:[~2021-12-24  2:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-23 12:20 [PATCH net-next] ipv4: delete sysctls about routing cache cgel.zte
2021-12-23 16:47 ` Jakub Kicinski
2021-12-24  2:02   ` CGEL

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.