Re: [PATCH net-next v5 17/25] ovpn: implement keepalive mechanism
From: Antonio Quartulli <antonio@openvpn.net>
Date: 2024-07-18 07:44:02
On 18/07/2024 04:01, Andrew Lunn wrote:
quoted
quoted
quoted
+ if (ovpn_is_keepalive(skb)) { + netdev_dbg(peer->ovpn->dev, + "ping received from peer %u\n", peer->id);That should probably be _ratelimited, but it seems we don't have _ratelimited variants for the netdev_* helpers.Right. I have used the net_*_ratelimited() variants when needed. Too bad we don't have those.If you think netdev_dbg_ratelimited() would be useful, i don't see why you cannot add it. I just did an search and found something interesting in the history: https://lore.kernel.org/all/20190809002941.15341-1-liuhangbin@gmail.com/T/#u (local) Maybe limit it to netdev_dbg_ratelimited() to avoid the potential abuse DaveM was worried about.
I see what Dave says however... ...along the packet processing routine there are several messages (some are err or warn or info) which require ratelimiting. Otherwise you end up with a gazilion log entries in case of a long lasting issue. Right now I am using net_dbg/warn/err/info_ratelimited(), therefore not having a netdev counterpart is not really helping with Dave's argument. I can try to take on this mission after this patchset is in and see what Dave/Jakub think about it. Regards, -- Antonio Quartulli OpenVPN Inc.