1 .. SPDX-License-Identifier: GPL-2.0
7 ``devlink`` provides capability for a driver to expose device parameters for low
8 level device functionality. Since devlink can operate at the device-wide
9 level, it can be used to provide configuration that may affect multiple
10 ports on a single device.
12 This document describes a number of generic parameters that are supported
13 across multiple drivers. Each driver is also free to add their own
14 parameters. Each driver must document the specific parameters they support,
15 whether generic or not.
20 Parameters may be set in different configuration modes.
22 .. list-table:: Possible configuration modes
28 - set while the driver is running, and takes effect immediately. No
31 - applied while the driver initializes. Requires the user to restart
32 the driver using the ``devlink`` reload command.
34 - written to the device's non-volatile memory. A hard reset is required
35 for it to take effect.
40 In order for ``driverinit`` parameters to take effect, the driver must
41 support reloading via the ``devlink-reload`` command. This command will
42 request a reload of the device driver.
44 Generic configuration parameters
45 ================================
46 The following is a list of generic configuration parameters that drivers may
47 add. Use of generic parameters is preferred over each driver creating their
50 .. list-table:: List of generic parameters
58 - Enable Single Root I/O Virtualization (SRIOV) in the device.
61 - Ignore Alternative Routing-ID Interpretation (ARI) capability. If
62 enabled, the adapter will ignore ARI capability even when the
63 platform has support enabled. The device will create the same number
64 of partitions as when the platform does not support ARI.
65 * - ``msix_vec_per_pf_max``
67 - Provides the maximum number of MSI-X interrupts that a device can
68 create. Value is the same across all physical functions (PFs) in the
70 * - ``msix_vec_per_pf_min``
72 - Provides the minimum number of MSI-X interrupts required for the
73 device to initialize. Value is the same across all physical functions
75 * - ``fw_load_policy``
77 - Control the device's firmware loading policy.
78 - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER`` (0)
79 Load firmware version preferred by the driver.
80 - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH`` (1)
81 Load firmware currently stored in flash.
82 - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK`` (2)
83 Load firmware currently available on host's disk.
84 * - ``reset_dev_on_drv_probe``
86 - Controls the device's reset policy on driver probe.
87 - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_UNKNOWN`` (0)
88 Unknown or invalid value.
89 - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_ALWAYS`` (1)
90 Always reset device on driver probe.
91 - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_NEVER`` (2)
92 Never reset device on driver probe.
93 - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_DISK`` (3)
94 Reset the device only if firmware can be found in the filesystem.
97 - Enable handling of RoCE traffic in the device.
98 * - ``internal_err_reset``
100 - When enabled, the device driver will reset the device on internal
104 - Specifies the maximum number of MAC addresses per ethernet port of
106 * - ``region_snapshot_enable``
108 - Enable capture of ``devlink-region`` snapshots.