Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

devlink: make health report on unregistered instance warn just once

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.

Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20230531015523.48961-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+1 -1
+1 -1
net/devlink/health.c
··· 480 480 int err; 481 481 482 482 WARN_ON(cmd != DEVLINK_CMD_HEALTH_REPORTER_RECOVER); 483 - WARN_ON(!xa_get_mark(&devlinks, devlink->index, DEVLINK_REGISTERED)); 483 + ASSERT_DEVLINK_REGISTERED(devlink); 484 484 485 485 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); 486 486 if (!msg)