Commit c745cfb2 authored by Moshe Shemesh's avatar Moshe Shemesh Committed by Jakub Kicinski

devlink: Update devlink health documentation

Update devlink-health.rst file:
- Add devlink formatted message (fmsg) API documentation.
- Add auto-dump as a condition to do dump once error reported.
- Expand OOB to clarify this acronym.
Signed-off-by: default avatarMoshe Shemesh <moshe@nvidia.com>
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 12af29e7
...@@ -33,7 +33,7 @@ Device driver can provide specific callbacks for each "health reporter", e.g.: ...@@ -33,7 +33,7 @@ Device driver can provide specific callbacks for each "health reporter", e.g.:
* Recovery procedures * Recovery procedures
* Diagnostics procedures * Diagnostics procedures
* Object dump procedures * Object dump procedures
* OOB initial parameters * Out Of Box initial parameters
Different parts of the driver can register different types of health reporters Different parts of the driver can register different types of health reporters
with different handlers. with different handlers.
...@@ -46,12 +46,31 @@ Once an error is reported, devlink health will perform the following actions: ...@@ -46,12 +46,31 @@ Once an error is reported, devlink health will perform the following actions:
* A log is being send to the kernel trace events buffer * A log is being send to the kernel trace events buffer
* Health status and statistics are being updated for the reporter instance * Health status and statistics are being updated for the reporter instance
* Object dump is being taken and saved at the reporter instance (as long as * Object dump is being taken and saved at the reporter instance (as long as
there is no other dump which is already stored) auto-dump is set and there is no other dump which is already stored)
* Auto recovery attempt is being done. Depends on: * Auto recovery attempt is being done. Depends on:
- Auto-recovery configuration - Auto-recovery configuration
- Grace period vs. time passed since last recover - Grace period vs. time passed since last recover
Devlink formatted message
=========================
To handle devlink health diagnose and health dump requests, devlink creates a
formatted message structure ``devlink_fmsg`` and send it to the driver's callback
to fill the data in using the devlink fmsg API.
Devlink fmsg is a mechanism to pass descriptors between drivers and devlink, in
json-like format. The API allows the driver to add nested attributes such as
object, object pair and value array, in addition to attributes such as name and
value.
Driver should use this API to fill the fmsg context in a format which will be
translated by the devlink to the netlink message later. When it needs to send
the data using SKBs to the netlink layer, it fragments the data between
different SKBs. In order to do this fragmentation, it uses virtual nests
attributes, to avoid actual nesting use which cannot be divided between
different SKBs.
User Interface User Interface
============== ==============
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment