0001 .. SPDX-License-Identifier: GPL-2.0
0002
0003 ==============
0004 Devlink Params
0005 ==============
0006
0007 ``devlink`` provides capability for a driver to expose device parameters for low
0008 level device functionality. Since devlink can operate at the device-wide
0009 level, it can be used to provide configuration that may affect multiple
0010 ports on a single device.
0011
0012 This document describes a number of generic parameters that are supported
0013 across multiple drivers. Each driver is also free to add their own
0014 parameters. Each driver must document the specific parameters they support,
0015 whether generic or not.
0016
0017 Configuration modes
0018 ===================
0019
0020 Parameters may be set in different configuration modes.
0021
0022 .. list-table:: Possible configuration modes
0023 :widths: 5 90
0024
0025 * - Name
0026 - Description
0027 * - ``runtime``
0028 - set while the driver is running, and takes effect immediately. No
0029 reset is required.
0030 * - ``driverinit``
0031 - applied while the driver initializes. Requires the user to restart
0032 the driver using the ``devlink`` reload command.
0033 * - ``permanent``
0034 - written to the device's non-volatile memory. A hard reset is required
0035 for it to take effect.
0036
0037 Reloading
0038 ---------
0039
0040 In order for ``driverinit`` parameters to take effect, the driver must
0041 support reloading via the ``devlink-reload`` command. This command will
0042 request a reload of the device driver.
0043
0044 .. _devlink_params_generic:
0045
0046 Generic configuration parameters
0047 ================================
0048 The following is a list of generic configuration parameters that drivers may
0049 add. Use of generic parameters is preferred over each driver creating their
0050 own name.
0051
0052 .. list-table:: List of generic parameters
0053 :widths: 5 5 90
0054
0055 * - Name
0056 - Type
0057 - Description
0058 * - ``enable_sriov``
0059 - Boolean
0060 - Enable Single Root I/O Virtualization (SRIOV) in the device.
0061 * - ``ignore_ari``
0062 - Boolean
0063 - Ignore Alternative Routing-ID Interpretation (ARI) capability. If
0064 enabled, the adapter will ignore ARI capability even when the
0065 platform has support enabled. The device will create the same number
0066 of partitions as when the platform does not support ARI.
0067 * - ``msix_vec_per_pf_max``
0068 - u32
0069 - Provides the maximum number of MSI-X interrupts that a device can
0070 create. Value is the same across all physical functions (PFs) in the
0071 device.
0072 * - ``msix_vec_per_pf_min``
0073 - u32
0074 - Provides the minimum number of MSI-X interrupts required for the
0075 device to initialize. Value is the same across all physical functions
0076 (PFs) in the device.
0077 * - ``fw_load_policy``
0078 - u8
0079 - Control the device's firmware loading policy.
0080 - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER`` (0)
0081 Load firmware version preferred by the driver.
0082 - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH`` (1)
0083 Load firmware currently stored in flash.
0084 - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK`` (2)
0085 Load firmware currently available on host's disk.
0086 * - ``reset_dev_on_drv_probe``
0087 - u8
0088 - Controls the device's reset policy on driver probe.
0089 - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_UNKNOWN`` (0)
0090 Unknown or invalid value.
0091 - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_ALWAYS`` (1)
0092 Always reset device on driver probe.
0093 - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_NEVER`` (2)
0094 Never reset device on driver probe.
0095 - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_DISK`` (3)
0096 Reset the device only if firmware can be found in the filesystem.
0097 * - ``enable_roce``
0098 - Boolean
0099 - Enable handling of RoCE traffic in the device.
0100 * - ``enable_eth``
0101 - Boolean
0102 - When enabled, the device driver will instantiate Ethernet specific
0103 auxiliary device of the devlink device.
0104 * - ``enable_rdma``
0105 - Boolean
0106 - When enabled, the device driver will instantiate RDMA specific
0107 auxiliary device of the devlink device.
0108 * - ``enable_vnet``
0109 - Boolean
0110 - When enabled, the device driver will instantiate VDPA networking
0111 specific auxiliary device of the devlink device.
0112 * - ``enable_iwarp``
0113 - Boolean
0114 - Enable handling of iWARP traffic in the device.
0115 * - ``internal_err_reset``
0116 - Boolean
0117 - When enabled, the device driver will reset the device on internal
0118 errors.
0119 * - ``max_macs``
0120 - u32
0121 - Typically macvlan, vlan net devices mac are also programmed in their
0122 parent netdevice's Function rx filter. This parameter limit the
0123 maximum number of unicast mac address filters to receive traffic from
0124 per ethernet port of this device.
0125 * - ``region_snapshot_enable``
0126 - Boolean
0127 - Enable capture of ``devlink-region`` snapshots.
0128 * - ``enable_remote_dev_reset``
0129 - Boolean
0130 - Enable device reset by remote host. When cleared, the device driver
0131 will NACK any attempt of other host to reset the device. This parameter
0132 is useful for setups where a device is shared by different hosts, such
0133 as multi-host setup.
0134 * - ``io_eq_size``
0135 - u32
0136 - Control the size of I/O completion EQs.
0137 * - ``event_eq_size``
0138 - u32
0139 - Control the size of asynchronous control events EQ.