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

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
Loading
Loading
Loading
Loading
+21 −2
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ Device driver can provide specific callbacks for each "health reporter", e.g.:
  * Recovery procedures
  * Diagnostics procedures
  * Object dump procedures
  * OOB initial parameters
  * Out Of Box initial parameters

Different parts of the driver can register different types of health reporters
with different handlers.
@@ -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
  * 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
    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 configuration
    - 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
==============