r8169: remove not needed net_ratelimit() check
Heiner Kallweit
maintainerPATCH 1/1 r8169: remove not needed net_ratelimit() check
We're not in a hot path and don't want to miss this message, therefore remove the net_ratelimit() check.
--- drivers/net/ethernet/realtek/r8169_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/realtek/r8169_main.c +1 -2
@@ -4573,8 +4573,7 @@ static void r8169_phylink_handler(struct net_device *ndev)pm_runtime_idle (&tp->pci_dev->dev); } -if (net_ratelimit ()) -phy_print_status (tp->phydev); +phy_print_status (tp->phydev); }static int r8169_phy_connect (struct rtl8169_private *tp)
Signature · 1 line
2.37.3
Heiner Kallweit <[email protected]> :
Quoted 4 lines
We're not in a hot path and don't want to miss this message, therefore remove the
net_ratelimit()check.Signed-off-by Heiner Kallweit <[email protected]>
There had historically been some user push against excess "spam" messages, even when systems are able to stand a gazillion of phy generated messages - resources constrained systems may not - due to dysfunctionning hardware or externally triggered events.
Things may have changed though.
Signature · 1 line
Ueimor
Heiner Kallweit
maintainerQuoted 4 lines · Francois Romieu
Heiner Kallweit <[email protected]> :
Quoted 3 lines
We're not in a hot path and don't want to miss this message, therefore remove the
net_ratelimit()check.
Quoted 9 lines
Quoted 1 line
Signed-off-by Heiner Kallweit <[email protected]>There had historically been some user push against excess "spam" messages, even when systems are able to stand a gazillion of phy generated messages - resources constrained systems may not - due to dysfunctionning hardware or externally triggered events.
Things may have changed though.
I don't have a strong opinion here and would follow the net maintainers decision. I looked at a few other drivers and none of them protects link up/down messages. If also other network-related components print a message on link-up, then we might miss the PHY message due to the network-global nature of net_ratelimit(). In general newer drivers don't seem to use net_ratelimit() extensively, even though that's not really an argument against using it.
Quoted 10 lines · Francois Romieu
Heiner Kallweit <[email protected]> :
Quoted 4 lines
We're not in a hot path and don't want to miss this message, therefore remove the
net_ratelimit()check.Signed-off-by Heiner Kallweit <[email protected]>There had historically been some user push against excess "spam" messages, even when systems are able to stand a gazillion of phy generated messages - resources constrained systems may not - due to dysfunctionning hardware or externally triggered events.
Ethernet PHYs generally take 1 second to report link down. Auto neg takes a little over 1 second to complete on link up. So i think the worse case here is probably one message per second. Can a resource constrained system be DoS at one message a second? If it really can, i would suggest moving the rate limiting into the phylib helper, so all devices are protected from this DoS vector.
Andrew
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Quoted 7 lines · On Sat, 3 Sep 2022 13:15:13 +0200 you wrote:
We're not in a hot path and don't want to miss this message, therefore remove the
net_ratelimit()check.Signed-off-by Heiner Kallweit <[email protected]>--- drivers/net/ethernet/realtek/r8169_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Here is the summary with links:
- [net-next] r8169: remove not needed net_ratelimit() check
https://git.kernel.org/netdev/net-next/c/96efd6d01461
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html