Thread (11 messages) 11 messages, 2 authors, 2021-03-31

[PATCH net-next 4/9] ipv4: convert udp_l3mdev_accept sysctl to u8

flat view
STALE2021d

From: Eric Dumazet <hidden>
Date: 2021-03-31 17:53:28
Subsystem: networking [general], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Eric Dumazet <redacted>

Reduce footprint of sysctls.

Signed-off-by: Eric Dumazet <redacted>
---
 include/net/netns/ipv4.h   | 2 +-
 net/ipv4/sysctl_net_ipv4.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
index b187ac597b8ce33376070bcd42c8c935b9c287eb..d309b1b897158c564ac8e07e4ed6826fa6e7c7b7 100644
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -194,7 +194,7 @@ struct netns_ipv4 {
 	u8 sysctl_fib_notify_on_flag_change;
 
 #ifdef CONFIG_NET_L3_MASTER_DEV
-	int sysctl_udp_l3mdev_accept;
+	u8 sysctl_udp_l3mdev_accept;
 #endif
 
 	int sysctl_igmp_max_memberships;
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index a2352d8d88cc9956ac0ddcaf351cbc996fa10add..1b6ce649a433c6614d9b1ac28d6c6c3daa01a525 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -1065,9 +1065,9 @@ static struct ctl_table ipv4_net_table[] = {
 	{
 		.procname	= "udp_l3mdev_accept",
 		.data		= &init_net.ipv4.sysctl_udp_l3mdev_accept,
-		.maxlen		= sizeof(int),
+		.maxlen		= sizeof(u8),
 		.mode		= 0644,
-		.proc_handler	= proc_dointvec_minmax,
+		.proc_handler	= proc_dou8vec_minmax,
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= SYSCTL_ONE,
 	},
-- 
2.31.0.291.g576ba9dcdaf-goog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help