All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] devlink: make health report on unregistered instance warn just once
@ 2023-05-31  1:55 Jakub Kicinski
  2023-05-31  6:28 ` Jiri Pirko
  2023-06-01  5:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2023-05-31  1:55 UTC (permalink / raw)
  To: davem; +Cc: netdev, edumazet, pabeni, Jakub Kicinski, jiri

Devlink health is involved in error recovery. Machines in bad
state tend to be fairly unreliable, and occasionally get stuck
in error loops. Even with a reasonable grace period devlink health
may get a thousand reports in an hour.

In case of reporting on an unregistered devlink instance
the subsequent reports don't add much value. Switch to
WARN_ON_ONCE() to avoid flooding dmesg and fleet monitoring
dashboards.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: jiri@resnulli.us
---
 net/devlink/health.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/devlink/health.c b/net/devlink/health.c
index 0839706d5741..194340a8bb86 100644
--- a/net/devlink/health.c
+++ b/net/devlink/health.c
@@ -480,7 +480,7 @@ static void devlink_recover_notify(struct devlink_health_reporter *reporter,
 	int err;
 
 	WARN_ON(cmd != DEVLINK_CMD_HEALTH_REPORTER_RECOVER);
-	WARN_ON(!xa_get_mark(&devlinks, devlink->index, DEVLINK_REGISTERED));
+	ASSERT_DEVLINK_REGISTERED(devlink);
 
 	msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
 	if (!msg)
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] devlink: make health report on unregistered instance warn just once
  2023-05-31  1:55 [PATCH net-next] devlink: make health report on unregistered instance warn just once Jakub Kicinski
@ 2023-05-31  6:28 ` Jiri Pirko
  2023-06-01  5:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2023-05-31  6:28 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni

Wed, May 31, 2023 at 03:55:23AM CEST, kuba@kernel.org wrote:
>Devlink health is involved in error recovery. Machines in bad
>state tend to be fairly unreliable, and occasionally get stuck
>in error loops. Even with a reasonable grace period devlink health
>may get a thousand reports in an hour.
>
>In case of reporting on an unregistered devlink instance
>the subsequent reports don't add much value. Switch to
>WARN_ON_ONCE() to avoid flooding dmesg and fleet monitoring
>dashboards.
>
>Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Reviewed-by: Jiri Pirko <jiri@nvidia.com>

Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] devlink: make health report on unregistered instance warn just once
  2023-05-31  1:55 [PATCH net-next] devlink: make health report on unregistered instance warn just once Jakub Kicinski
  2023-05-31  6:28 ` Jiri Pirko
@ 2023-06-01  5:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-06-01  5:40 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni, jiri

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 30 May 2023 18:55:23 -0700 you wrote:
> Devlink health is involved in error recovery. Machines in bad
> state tend to be fairly unreliable, and occasionally get stuck
> in error loops. Even with a reasonable grace period devlink health
> may get a thousand reports in an hour.
> 
> In case of reporting on an unregistered devlink instance
> the subsequent reports don't add much value. Switch to
> WARN_ON_ONCE() to avoid flooding dmesg and fleet monitoring
> dashboards.
> 
> [...]

Here is the summary with links:
  - [net-next] devlink: make health report on unregistered instance warn just once
    https://git.kernel.org/netdev/net-next/c/6f4b98147b8d

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] 3+ messages in thread

end of thread, other threads:[~2023-06-01  5:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-31  1:55 [PATCH net-next] devlink: make health report on unregistered instance warn just once Jakub Kicinski
2023-05-31  6:28 ` Jiri Pirko
2023-06-01  5:40 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.