summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShahar Shitrit <shshitrit@nvidia.com>2025-08-24 11:43:52 +0300
committerJakub Kicinski <kuba@kernel.org>2025-08-26 17:24:16 -0700
commit6a06d8c40510ba1ecf27977f528b1eb74f290a60 (patch)
treec24b7e1d0b2d36b598e87a1605ad39aeea58df76 /include
parent20597fb9436e2e2372ddf782f0bb5ecbe3481068 (diff)
devlink: Introduce burst period for health reporter
Currently, the devlink health reporter starts the grace period immediately after handling an error, blocking any further recoveries until it finished. However, when a single root cause triggers multiple errors in a short time frame, it is desirable to treat them as a bulk of errors and to allow their recoveries, avoiding premature blocking of subsequent related errors, and reducing the risk of inconsistent or incomplete error handling. To address this, introduce a configurable burst period for devlink health reporter. Start this period when the first error is handled, and allow recovery attempts for reported errors during this window. Once burst period expires, begin the grace period to block further recoveries until it concludes. Timeline summary: ----|--------|------------------------------/----------------------/-- error is error is burst period grace period reported recovered (recoveries allowed) (recoveries blocked) For calculating the burst period duration, use the same last_recovery_ts as the grace period. Update it on recovery only when the burst period is inactive (either disabled or at the first error). This patch implements the framework for the burst period and effectively sets its value to 0 at reporter creation, so the current behavior remains unchanged, which ensures backward compatibility. A downstream patch will make the burst period configurable. Signed-off-by: Shahar Shitrit <shshitrit@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Mark Bloch <mbloch@nvidia.com> Link: https://patch.msgid.link/20250824084354.533182-4-mbloch@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/devlink.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h
index c7ad7a981b39..5f44e702c25c 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -748,6 +748,8 @@ enum devlink_health_reporter_state {
* @test: callback to trigger a test event
* @default_graceful_period: default min time (in msec)
* between recovery attempts
+ * @default_burst_period: default time (in msec) for
+ * error recoveries before starting the grace period
*/
struct devlink_health_reporter_ops {
@@ -763,6 +765,7 @@ struct devlink_health_reporter_ops {
int (*test)(struct devlink_health_reporter *reporter,
struct netlink_ext_ack *extack);
u64 default_graceful_period;
+ u64 default_burst_period;
};
/**