* [PATCH v1 net-next] udp: Remove redundant __udp_sysctl_init() call from udp_init().
@ 2022-07-29 3:21 Kuniyuki Iwashima
2022-08-01 11:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Kuniyuki Iwashima @ 2022-07-29 3:21 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Tonghao Zhang, Kuniyuki Iwashima, Kuniyuki Iwashima, netdev
__udp_sysctl_init() is called for init_net via udp_sysctl_ops.
While at it, we can rename __udp_sysctl_init() to udp_sysctl_init().
Fixes: 1e8029515816 ("udp: Move the udp sysctl to namespace.")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
---
net/ipv4/udp.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 2516078aa03e..34eda973bbf1 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -3264,7 +3264,7 @@ u32 udp_flow_hashrnd(void)
}
EXPORT_SYMBOL(udp_flow_hashrnd);
-static void __udp_sysctl_init(struct net *net)
+static int __net_init udp_sysctl_init(struct net *net)
{
net->ipv4.sysctl_udp_rmem_min = PAGE_SIZE;
net->ipv4.sysctl_udp_wmem_min = PAGE_SIZE;
@@ -3272,11 +3272,7 @@ static void __udp_sysctl_init(struct net *net)
#ifdef CONFIG_NET_L3_MASTER_DEV
net->ipv4.sysctl_udp_l3mdev_accept = 0;
#endif
-}
-static int __net_init udp_sysctl_init(struct net *net)
-{
- __udp_sysctl_init(net);
return 0;
}
@@ -3352,8 +3348,6 @@ void __init udp_init(void)
sysctl_udp_mem[1] = limit;
sysctl_udp_mem[2] = sysctl_udp_mem[0] * 2;
- __udp_sysctl_init(&init_net);
-
/* 16 spinlocks per cpu */
udp_busylocks_log = ilog2(nr_cpu_ids) + 4;
udp_busylocks = kmalloc(sizeof(spinlock_t) << udp_busylocks_log,
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 net-next] udp: Remove redundant __udp_sysctl_init() call from udp_init().
2022-07-29 3:21 [PATCH v1 net-next] udp: Remove redundant __udp_sysctl_init() call from udp_init() Kuniyuki Iwashima
@ 2022-08-01 11:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-08-01 11:20 UTC (permalink / raw)
To: Kuniyuki Iwashima
Cc: davem, edumazet, kuba, pabeni, xiangxia.m.yue, kuni1840, netdev
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Thu, 28 Jul 2022 20:21:37 -0700 you wrote:
> __udp_sysctl_init() is called for init_net via udp_sysctl_ops.
>
> While at it, we can rename __udp_sysctl_init() to udp_sysctl_init().
>
> Fixes: 1e8029515816 ("udp: Move the udp sysctl to namespace.")
> Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
>
> [...]
Here is the summary with links:
- [v1,net-next] udp: Remove redundant __udp_sysctl_init() call from udp_init().
https://git.kernel.org/netdev/net-next/c/02a7cb2866dd
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-01 11:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-29 3:21 [PATCH v1 net-next] udp: Remove redundant __udp_sysctl_init() call from udp_init() Kuniyuki Iwashima
2022-08-01 11:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).