* [PATCH net-next] r8169: remove not needed net_ratelimit() check
@ 2022-09-03 11:15 Heiner Kallweit
2022-09-03 15:21 ` Francois Romieu
2022-09-05 14:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 5+ messages in thread
From: Heiner Kallweit @ 2022-09-03 11:15 UTC (permalink / raw)
To: Jakub Kicinski, David Miller, Realtek linux nic maintainers,
Eric Dumazet, Paolo Abeni
Cc: netdev@vger.kernel.org
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 <hkallweit1@gmail.com>
---
drivers/net/ethernet/realtek/r8169_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 8e1dae4de..52dacf59a 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -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)
--
2.37.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] r8169: remove not needed net_ratelimit() check
2022-09-03 11:15 [PATCH net-next] r8169: remove not needed net_ratelimit() check Heiner Kallweit
@ 2022-09-03 15:21 ` Francois Romieu
2022-09-03 16:10 ` Heiner Kallweit
2022-09-05 17:01 ` Andrew Lunn
2022-09-05 14:00 ` patchwork-bot+netdevbpf
1 sibling, 2 replies; 5+ messages in thread
From: Francois Romieu @ 2022-09-03 15:21 UTC (permalink / raw)
To: Heiner Kallweit
Cc: Jakub Kicinski, David Miller, Realtek linux nic maintainers,
Eric Dumazet, Paolo Abeni, netdev@vger.kernel.org
Heiner Kallweit <hkallweit1@gmail.com> :
> 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 <hkallweit1@gmail.com>
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.
--
Ueimor
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] r8169: remove not needed net_ratelimit() check
2022-09-03 15:21 ` Francois Romieu
@ 2022-09-03 16:10 ` Heiner Kallweit
2022-09-05 17:01 ` Andrew Lunn
1 sibling, 0 replies; 5+ messages in thread
From: Heiner Kallweit @ 2022-09-03 16:10 UTC (permalink / raw)
To: Francois Romieu
Cc: Jakub Kicinski, David Miller, Realtek linux nic maintainers,
Eric Dumazet, Paolo Abeni, netdev@vger.kernel.org
On 03.09.2022 17:21, Francois Romieu wrote:
> Heiner Kallweit <hkallweit1@gmail.com> :
>> 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 <hkallweit1@gmail.com>
>
> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] r8169: remove not needed net_ratelimit() check
2022-09-03 11:15 [PATCH net-next] r8169: remove not needed net_ratelimit() check Heiner Kallweit
2022-09-03 15:21 ` Francois Romieu
@ 2022-09-05 14:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-09-05 14:00 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: kuba, davem, nic_swsd, edumazet, pabeni, netdev
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
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 <hkallweit1@gmail.com>
> ---
> 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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] r8169: remove not needed net_ratelimit() check
2022-09-03 15:21 ` Francois Romieu
2022-09-03 16:10 ` Heiner Kallweit
@ 2022-09-05 17:01 ` Andrew Lunn
1 sibling, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2022-09-05 17:01 UTC (permalink / raw)
To: Francois Romieu
Cc: Heiner Kallweit, Jakub Kicinski, David Miller,
Realtek linux nic maintainers, Eric Dumazet, Paolo Abeni,
netdev@vger.kernel.org
On Sat, Sep 03, 2022 at 05:21:35PM +0200, Francois Romieu wrote:
> Heiner Kallweit <hkallweit1@gmail.com> :
> > 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 <hkallweit1@gmail.com>
>
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-05 17:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-03 11:15 [PATCH net-next] r8169: remove not needed net_ratelimit() check Heiner Kallweit
2022-09-03 15:21 ` Francois Romieu
2022-09-03 16:10 ` Heiner Kallweit
2022-09-05 17:01 ` Andrew Lunn
2022-09-05 14:00 ` 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).