diff mbox series

[net-next,3/9] ipv4: convert fib_notify_on_flag_change sysctl to u8

Message ID 20210331175213.691460-4-eric.dumazet@gmail.com (mailing list archive)
State Accepted
Commit b2908fac5b7b23c03fa1d3e1055ad95ba305c871
Delegated to: Netdev Maintainers
Headers show
Series inet: shrink netns_ipv{4|6} | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers warning 6 maintainers not CCed: dsahern@kernel.org yoshfuji@linux-ipv6.org andreas.a.roeseler@gmail.com roopa@cumulusnetworks.com amcohen@nvidia.com weiwan@google.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 7030 this patch: 7030
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 19 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 7245 this patch: 7245
netdev/header_inline success Link

Commit Message

Eric Dumazet March 31, 2021, 5:52 p.m. UTC
From: Eric Dumazet <edumazet@google.com>

Reduce footprint of sysctls.

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 include/net/netns/ipv4.h   | 2 +-
 net/ipv4/sysctl_net_ipv4.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
index 538ed69919dc4d51acfd43c7d6d1fca611fcb003..b187ac597b8ce33376070bcd42c8c935b9c287eb 100644
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -191,7 +191,7 @@  struct netns_ipv4 {
 	int sysctl_udp_wmem_min;
 	int sysctl_udp_rmem_min;
 
-	int sysctl_fib_notify_on_flag_change;
+	u8 sysctl_fib_notify_on_flag_change;
 
 #ifdef CONFIG_NET_L3_MASTER_DEV
 	int sysctl_udp_l3mdev_accept;
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 9199f507a005efc3f57ca0225d3898bfa5d01c53..a2352d8d88cc9956ac0ddcaf351cbc996fa10add 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -1364,9 +1364,9 @@  static struct ctl_table ipv4_net_table[] = {
 	{
 		.procname	= "fib_notify_on_flag_change",
 		.data		= &init_net.ipv4.sysctl_fib_notify_on_flag_change,
-		.maxlen		= sizeof(int),
+		.maxlen		= sizeof(u8),
 		.mode		= 0644,
-		.proc_handler	= proc_dointvec_minmax,
+		.proc_handler	= proc_dou8vec_minmax,
 		.extra1		= SYSCTL_ZERO,
 		.extra2		= &two,
 	},