#define DL_OPT_PORT_FN_CAPS BIT(57)
#define DL_OPT_PORT_FN_MAX_IO_EQS BIT(58)
#define DL_OPT_PORT_FN_RATE_TC_BWS BIT(59)
+#define DL_OPT_HEALTH_REPORTER_BURST_PERIOD BIT(60)
struct dl_opts {
uint64_t present; /* flags of present items */
const char *flash_component;
const char *reporter_name;
__u64 reporter_graceful_period;
+ __u64 reporter_burst_period;
bool reporter_auto_recover;
bool reporter_auto_dump;
const char *trap_name;
[DEVLINK_ATTR_HEALTH_REPORTER_RECOVER_COUNT] = MNL_TYPE_U64,
[DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS] = MNL_TYPE_U64,
[DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD] = MNL_TYPE_U64,
+ [DEVLINK_ATTR_HEALTH_REPORTER_BURST_PERIOD] = MNL_TYPE_U64,
[DEVLINK_ATTR_FLASH_UPDATE_COMPONENT] = MNL_TYPE_STRING,
[DEVLINK_ATTR_FLASH_UPDATE_STATUS_MSG] = MNL_TYPE_STRING,
[DEVLINK_ATTR_FLASH_UPDATE_STATUS_DONE] = MNL_TYPE_U64,
if (err)
return err;
o_found |= DL_OPT_HEALTH_REPORTER_GRACEFUL_PERIOD;
+ } else if (dl_argv_match(dl, "burst_period") &&
+ (o_all & DL_OPT_HEALTH_REPORTER_BURST_PERIOD)) {
+ dl_arg_inc(dl);
+ err = dl_argv_uint64_t(dl, &opts->reporter_burst_period);
+ if (err)
+ return err;
+ o_found |= DL_OPT_HEALTH_REPORTER_BURST_PERIOD;
} else if (dl_argv_match(dl, "auto_recover") &&
(o_all & DL_OPT_HEALTH_REPORTER_AUTO_RECOVER)) {
dl_arg_inc(dl);
mnl_attr_put_u64(nlh,
DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD,
opts->reporter_graceful_period);
+ if (opts->present & DL_OPT_HEALTH_REPORTER_BURST_PERIOD)
+ mnl_attr_put_u64(nlh,
+ DEVLINK_ATTR_HEALTH_REPORTER_BURST_PERIOD,
+ opts->reporter_burst_period);
if (opts->present & DL_OPT_HEALTH_REPORTER_AUTO_RECOVER)
mnl_attr_put_u8(nlh, DEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECOVER,
opts->reporter_auto_recover);
NLM_F_REQUEST | NLM_F_ACK);
err = dl_argv_parse(dl, DL_OPT_HANDLE | DL_OPT_HANDLEP | DL_OPT_HEALTH_REPORTER_NAME,
DL_OPT_HEALTH_REPORTER_GRACEFUL_PERIOD |
+ DL_OPT_HEALTH_REPORTER_BURST_PERIOD |
DL_OPT_HEALTH_REPORTER_AUTO_RECOVER |
DL_OPT_HEALTH_REPORTER_AUTO_DUMP);
if (err)
if (tb[DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD])
pr_out_u64(dl, "grace_period",
mnl_attr_get_u64(tb[DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD]));
+ if (tb[DEVLINK_ATTR_HEALTH_REPORTER_BURST_PERIOD])
+ pr_out_u64(dl, "burst_period",
+ mnl_attr_get_u64(tb[DEVLINK_ATTR_HEALTH_REPORTER_BURST_PERIOD]));
if (tb[DEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECOVER])
print_bool(PRINT_ANY, "auto_recover", " auto_recover %s",
mnl_attr_get_u8(tb[DEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECOVER]));
pr_err(" devlink health dump clear { DEV | DEV/PORT_INDEX } reporter REPORTER_NAME\n");
pr_err(" devlink health set { DEV | DEV/PORT_INDEX } reporter REPORTER_NAME\n");
pr_err(" [ grace_period MSEC ]\n");
+ pr_err(" [ burst_period MSEC ]\n");
pr_err(" [ auto_recover { true | false } ]\n");
pr_err(" [ auto_dump { true | false } ]\n");
}
[
.BI "grace_period " MSEC "
] [
+.BI "burst_period " MSEC "
+] [
.BR auto_recover " { " true " | " false " } "
] [
.BR auto_dump " { " true " | " false " } "
.BI grace_period " MSEC "
Time interval between consecutive auto recoveries.
+.TP
+.BI burst_period " MSEC "
+Time window for error recoveries before starting the grace period.
+Configuring burst_period is invalid when the grace period is disabled.
+
.TP
.BR auto_recover " { " true " | " false " } "
Indicates whether the devlink should execute automatic recover on error.
devlink health set pci/0000:00:09.0 reporter fw_fatal auto_recover false
.RS 4
Turn off auto recovery on the specified device and reporter.
+.RE
+.PP
+devlink health set pci/0000:00:09.0 reporter tx burst_period 5000
+.RS 4
+Set the burst period to 5000 milliseconds on the specified
+device and reporter, prior to initiating the grace period.
+.RE
+.PP
+devlink health set pci/0000:00:09.0 reporter tx grace_period 0
+.RS 4
+Disable grace period on the specified device and reporter. Disabling the grace
+period also deactivates the burst period.
+.RE
.RE
.SH SEE ALSO