Commit 451c7900 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'devlink-documentation-refactor'



Jacob Keller says:

====================
devlink documentation refactor

This series updates the devlink documentation, with a few primary goals

 * move all of the devlink documentation into a dedicated subfolder
 * convert that documentation to the reStructuredText format
 * merge driver-specific documentations into a single file per driver
 * add missing documentation, including per-driver and devlink generally

For each driver, I took the time to review the code and add further
documentation on the various features it currently supports. Additionally, I
added new documentation files for some of the features such as
devlink-dpipe, devlink-resource, and devlink-regions.

Note for the region snapshot triggering, I kept that as a separate patch as
that is based on work that has not yet been merged to net-next, and may
change.

I also improved the existing documentation for devlink-info and
devlink-param by adding a bit more of an introduction when converting it to
the rst format.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents efa193ba 9cd3e2c6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ but without enabling "switch" mode, or to different bridges.

Devlink configuration parameters
====================
See Documentation/networking/devlink-params-ti-cpsw-switch.txt
See Documentation/networking/devlink/ti-cpsw-switch.rst

====================
# Bridging in dual mac mode
+0 −86
Original line number Diff line number Diff line
The health mechanism is targeted for Real Time Alerting, in order to know when
something bad had happened to a PCI device
- Provide alert debug information
- Self healing
- If problem needs vendor support, provide a way to gather all needed debugging
  information.

The main idea is to unify and centralize driver health reports in the
generic devlink instance and allow the user to set different
attributes of the health reporting and recovery procedures.

The devlink health reporter:
Device driver creates a "health reporter" per each error/health type.
Error/Health type can be a known/generic (eg pci error, fw error, rx/tx error)
or unknown (driver specific).
For each registered health reporter a driver can issue error/health reports
asynchronously. All health reports handling is done by devlink.
Device driver can provide specific callbacks for each "health reporter", e.g.
 - Recovery procedures
 - Diagnostics and object dump procedures
 - OOB initial parameters
Different parts of the driver can register different types of health reporters
with different handlers.

Once an error is reported, devlink health will do 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 recovery attempt is being done. Depends on:
    - Auto-recovery configuration
    - Grace period vs. time passed since last recover

The user interface:
User can access/change each reporter's parameters and driver specific callbacks
via devlink, e.g per error type (per health reporter)
 - Configure reporter's generic parameters (like: disable/enable auto recovery)
 - Invoke recovery procedure
 - Run diagnostics
 - Object dump

The devlink health interface (via netlink):
DEVLINK_CMD_HEALTH_REPORTER_GET
  Retrieves status and configuration info per DEV and reporter.
DEVLINK_CMD_HEALTH_REPORTER_SET
  Allows reporter-related configuration setting.
DEVLINK_CMD_HEALTH_REPORTER_RECOVER
  Triggers a reporter's recovery procedure.
DEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE
  Retrieves diagnostics data from a reporter on a device.
DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET
  Retrieves the last stored dump. Devlink health
  saves a single dump. If an dump is not already stored by the devlink
  for this reporter, devlink generates a new dump.
  dump output is defined by the reporter.
DEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR
  Clears the last saved dump file for the specified reporter.


                                               netlink
                                      +--------------------------+
                                      |                          |
                                      |            +             |
                                      |            |             |
                                      +--------------------------+
                                                   |request for ops
                                                   |(diagnose,
 mlx5_core                             devlink     |recover,
                                                   |dump)
+--------+                            +--------------------------+
|        |                            |    reporter|             |
|        |                            |  +---------v----------+  |
|        |   ops execution            |  |                    |  |
|     <----------------------------------+                    |  |
|        |                            |  |                    |  |
|        |                            |  + ^------------------+  |
|        |                            |    | request for ops     |
|        |                            |    | (recover, dump)     |
|        |                            |    |                     |
|        |                            |  +-+------------------+  |
|        |     health report          |  | health handler     |  |
|        +------------------------------->                    |  |
|        |                            |  +--------------------+  |
|        |     health reporter create |                          |
|        +---------------------------->                          |
+--------+                            +--------------------------+
+0 −18
Original line number Diff line number Diff line
enable_sriov		[DEVICE, GENERIC]
			Configuration mode: Permanent

ignore_ari		[DEVICE, GENERIC]
			Configuration mode: Permanent

msix_vec_per_pf_max	[DEVICE, GENERIC]
			Configuration mode: Permanent

msix_vec_per_pf_min	[DEVICE, GENERIC]
			Configuration mode: Permanent

gre_ver_check		[DEVICE, DRIVER-SPECIFIC]
			Generic Routing Encapsulation (GRE) version check will
			be enabled in the device. If disabled, device skips
			version checking for incoming packets.
			Type: Boolean
			Configuration mode: Permanent
+0 −17
Original line number Diff line number Diff line
flow_steering_mode	[DEVICE, DRIVER-SPECIFIC]
			Controls the flow steering mode of the driver.
			Two modes are supported:
			1. 'dmfs' - Device managed flow steering.
			2. 'smfs  - Software/Driver managed flow steering.
			In DMFS mode, the HW steering entities are created and
			managed through the Firmware.
			In SMFS mode, the HW steering entities are created and
			managed though by the driver directly into Hardware
			without firmware intervention.
			Type: String
			Configuration mode: runtime

enable_roce		[DEVICE, GENERIC]
			Enable handling of RoCE traffic in the device.
			Defaultly enabled.
			Configuration mode: driverinit
+0 −10
Original line number Diff line number Diff line
fw_load_policy		[DEVICE, GENERIC]
			Configuration mode: driverinit

acl_region_rehash_interval	[DEVICE, DRIVER-SPECIFIC]
			Sets an interval for periodic ACL region rehashes.
			The value is in milliseconds, minimal value is "3000".
			Value "0" disables the periodic work.
			The first rehash will be run right after value is set.
			Type: u32
			Configuration mode: runtime
Loading