ipv6_tunnel: Rate limit warning messages
Subsystems (3)
Ido Schimmel
maintainerPATCH 1/1 ipv6_tunnel: Rate limit warning messages
The warning messages can be invoked from the data path for every packet transmitted through an ip6gre netdev, leading to high CPU utilization.
Fix that by rate limiting the messages.
Fixes 09c6bbf090ec ("[IPV6]: Do mandatory IPv6 tunnel endpoint checks in realtime")
Reported-by Maksym Yaremchuk <[email protected]>
Tested-by Maksym Yaremchuk <[email protected]>
Signed-off-by Ido Schimmel <[email protected]>
Reviewed-by Amit Cohen <[email protected]>
--- net/ipv6/ip6_tunnel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
net/ipv6/ip6_tunnel.c +4 -4
@@ -1036,14 +1036,14 @@ int ip6_tnl_xmit_ctl(struct ip6_tnl *t,if (unlikely (!ipv6_chk_addr_and_flags (net, laddr, ldev, false,0 ,IFA_F_TENTATIVE ))) -pr_warn ("%s xmit: Local address not yet configured!\n" , - p->name); +pr_warn_ratelimited ("%s xmit: Local address not yet configured!\n" , + p->name);else if (!(p->flags &IP6_TNL_F_ALLOW_LOCAL_REMOTE ) && !ipv6_addr_is_multicast (raddr) &&unlikely (ipv6_chk_addr_and_flags (net, raddr, ldev, true,0 ,IFA_F_TENTATIVE ))) -pr_warn ("%s xmit: Routing loop! Remote address found on this node!\n" , - p->name); +pr_warn_ratelimited ("%s xmit: Routing loop! Remote address found on this node!\n" , + p->name);else ret =1 ;rcu_read_unlock ();
Signature · 1 line
2.33.1
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:
Quoted 5 lines · On Thu, 20 Jan 2022 10:05:46 +0200 you wrote:
The warning messages can be invoked from the data path for every packet transmitted through an ip6gre netdev, leading to high CPU utilization.
Fix that by rate limiting the messages.
Quoted 7 lines
Fixes 09c6bbf090ec ("[IPV6]: Do mandatory IPv6 tunnel endpoint checks in realtime")Reported-by Maksym Yaremchuk <[email protected]>Tested-by Maksym Yaremchuk <[email protected]>Signed-off-by Ido Schimmel <[email protected]>Reviewed-by Amit Cohen <[email protected]>[...]
Here is the summary with links:
- [net] ipv6_tunnel: Rate limit warning messages
https://git.kernel.org/netdev/net/c/6cee105e7f2c
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html