2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-10 06:34:17 +08:00

ipv4: convert fib_multipath_{use_neigh|hash_policy} sysctls to u8

Make room for better packing of netns_ipv4

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eric Dumazet 2021-03-31 10:52:09 -07:00 committed by David S. Miller
parent cd04bd0222
commit be205fe6ec
2 changed files with 6 additions and 6 deletions

View File

@ -220,8 +220,8 @@ struct netns_ipv4 {
#endif #endif
#endif #endif
#ifdef CONFIG_IP_ROUTE_MULTIPATH #ifdef CONFIG_IP_ROUTE_MULTIPATH
int sysctl_fib_multipath_use_neigh; u8 sysctl_fib_multipath_use_neigh;
int sysctl_fib_multipath_hash_policy; u8 sysctl_fib_multipath_hash_policy;
#endif #endif
struct fib_notifier_ops *notifier_ops; struct fib_notifier_ops *notifier_ops;

View File

@ -456,7 +456,7 @@ static int proc_fib_multipath_hash_policy(struct ctl_table *table, int write,
ipv4.sysctl_fib_multipath_hash_policy); ipv4.sysctl_fib_multipath_hash_policy);
int ret; int ret;
ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); ret = proc_dou8vec_minmax(table, write, buffer, lenp, ppos);
if (write && ret == 0) if (write && ret == 0)
call_netevent_notifiers(NETEVENT_IPV4_MPATH_HASH_UPDATE, net); call_netevent_notifiers(NETEVENT_IPV4_MPATH_HASH_UPDATE, net);
@ -1038,16 +1038,16 @@ static struct ctl_table ipv4_net_table[] = {
{ {
.procname = "fib_multipath_use_neigh", .procname = "fib_multipath_use_neigh",
.data = &init_net.ipv4.sysctl_fib_multipath_use_neigh, .data = &init_net.ipv4.sysctl_fib_multipath_use_neigh,
.maxlen = sizeof(int), .maxlen = sizeof(u8),
.mode = 0644, .mode = 0644,
.proc_handler = proc_dointvec_minmax, .proc_handler = proc_dou8vec_minmax,
.extra1 = SYSCTL_ZERO, .extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_ONE, .extra2 = SYSCTL_ONE,
}, },
{ {
.procname = "fib_multipath_hash_policy", .procname = "fib_multipath_hash_policy",
.data = &init_net.ipv4.sysctl_fib_multipath_hash_policy, .data = &init_net.ipv4.sysctl_fib_multipath_hash_policy,
.maxlen = sizeof(int), .maxlen = sizeof(u8),
.mode = 0644, .mode = 0644,
.proc_handler = proc_fib_multipath_hash_policy, .proc_handler = proc_fib_multipath_hash_policy,
.extra1 = SYSCTL_ZERO, .extra1 = SYSCTL_ZERO,