1 .. SPDX-License-Identifier: GPL-2.0 1 .. SPDX-License-Identifier: GPL-2.0 2 2 3 ============== 3 ============== 4 Devlink Params 4 Devlink Params 5 ============== 5 ============== 6 6 7 ``devlink`` provides capability for a driver t 7 ``devlink`` provides capability for a driver to expose device parameters for low 8 level device functionality. Since devlink can 8 level device functionality. Since devlink can operate at the device-wide 9 level, it can be used to provide configuration 9 level, it can be used to provide configuration that may affect multiple 10 ports on a single device. 10 ports on a single device. 11 11 12 This document describes a number of generic pa 12 This document describes a number of generic parameters that are supported 13 across multiple drivers. Each driver is also f 13 across multiple drivers. Each driver is also free to add their own 14 parameters. Each driver must document the spec 14 parameters. Each driver must document the specific parameters they support, 15 whether generic or not. 15 whether generic or not. 16 16 17 Configuration modes 17 Configuration modes 18 =================== 18 =================== 19 19 20 Parameters may be set in different configurati 20 Parameters may be set in different configuration modes. 21 21 22 .. list-table:: Possible configuration modes 22 .. list-table:: Possible configuration modes 23 :widths: 5 90 23 :widths: 5 90 24 24 25 * - Name 25 * - Name 26 - Description 26 - Description 27 * - ``runtime`` 27 * - ``runtime`` 28 - set while the driver is running, and ta 28 - set while the driver is running, and takes effect immediately. No 29 reset is required. 29 reset is required. 30 * - ``driverinit`` 30 * - ``driverinit`` 31 - applied while the driver initializes. R 31 - applied while the driver initializes. Requires the user to restart 32 the driver using the ``devlink`` reload 32 the driver using the ``devlink`` reload command. 33 * - ``permanent`` 33 * - ``permanent`` 34 - written to the device's non-volatile me 34 - written to the device's non-volatile memory. A hard reset is required 35 for it to take effect. 35 for it to take effect. 36 36 37 Reloading 37 Reloading 38 --------- 38 --------- 39 39 40 In order for ``driverinit`` parameters to take 40 In order for ``driverinit`` parameters to take effect, the driver must 41 support reloading via the ``devlink-reload`` c 41 support reloading via the ``devlink-reload`` command. This command will 42 request a reload of the device driver. 42 request a reload of the device driver. 43 43 44 .. _devlink_params_generic: 44 .. _devlink_params_generic: 45 45 46 Generic configuration parameters 46 Generic configuration parameters 47 ================================ 47 ================================ 48 The following is a list of generic configurati 48 The following is a list of generic configuration parameters that drivers may 49 add. Use of generic parameters is preferred ov 49 add. Use of generic parameters is preferred over each driver creating their 50 own name. 50 own name. 51 51 52 .. list-table:: List of generic parameters 52 .. list-table:: List of generic parameters 53 :widths: 5 5 90 53 :widths: 5 5 90 54 54 55 * - Name 55 * - Name 56 - Type 56 - Type 57 - Description 57 - Description 58 * - ``enable_sriov`` 58 * - ``enable_sriov`` 59 - Boolean 59 - Boolean 60 - Enable Single Root I/O Virtualization ( 60 - Enable Single Root I/O Virtualization (SRIOV) in the device. 61 * - ``ignore_ari`` 61 * - ``ignore_ari`` 62 - Boolean 62 - Boolean 63 - Ignore Alternative Routing-ID Interpret 63 - Ignore Alternative Routing-ID Interpretation (ARI) capability. If 64 enabled, the adapter will ignore ARI ca 64 enabled, the adapter will ignore ARI capability even when the 65 platform has support enabled. The devic 65 platform has support enabled. The device will create the same number 66 of partitions as when the platform does 66 of partitions as when the platform does not support ARI. 67 * - ``msix_vec_per_pf_max`` 67 * - ``msix_vec_per_pf_max`` 68 - u32 68 - u32 69 - Provides the maximum number of MSI-X in 69 - Provides the maximum number of MSI-X interrupts that a device can 70 create. Value is the same across all ph 70 create. Value is the same across all physical functions (PFs) in the 71 device. 71 device. 72 * - ``msix_vec_per_pf_min`` 72 * - ``msix_vec_per_pf_min`` 73 - u32 73 - u32 74 - Provides the minimum number of MSI-X in 74 - Provides the minimum number of MSI-X interrupts required for the 75 device to initialize. Value is the same 75 device to initialize. Value is the same across all physical functions 76 (PFs) in the device. 76 (PFs) in the device. 77 * - ``fw_load_policy`` 77 * - ``fw_load_policy`` 78 - u8 78 - u8 79 - Control the device's firmware loading p 79 - Control the device's firmware loading policy. 80 - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE 80 - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER`` (0) 81 Load firmware version preferred by t 81 Load firmware version preferred by the driver. 82 - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE 82 - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH`` (1) 83 Load firmware currently stored in fl 83 Load firmware currently stored in flash. 84 - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE 84 - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK`` (2) 85 Load firmware currently available on 85 Load firmware currently available on host's disk. 86 * - ``reset_dev_on_drv_probe`` 86 * - ``reset_dev_on_drv_probe`` 87 - u8 87 - u8 88 - Controls the device's reset policy on d 88 - Controls the device's reset policy on driver probe. 89 - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PRO 89 - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_UNKNOWN`` (0) 90 Unknown or invalid value. 90 Unknown or invalid value. 91 - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PRO 91 - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_ALWAYS`` (1) 92 Always reset device on driver probe. 92 Always reset device on driver probe. 93 - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PRO 93 - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_NEVER`` (2) 94 Never reset device on driver probe. 94 Never reset device on driver probe. 95 - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PRO 95 - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_DISK`` (3) 96 Reset the device only if firmware ca 96 Reset the device only if firmware can be found in the filesystem. 97 * - ``enable_roce`` 97 * - ``enable_roce`` 98 - Boolean 98 - Boolean 99 - Enable handling of RoCE traffic in the 99 - Enable handling of RoCE traffic in the device. 100 * - ``enable_eth`` 100 * - ``enable_eth`` 101 - Boolean 101 - Boolean 102 - When enabled, the device driver will in 102 - When enabled, the device driver will instantiate Ethernet specific 103 auxiliary device of the devlink device. 103 auxiliary device of the devlink device. 104 * - ``enable_rdma`` 104 * - ``enable_rdma`` 105 - Boolean 105 - Boolean 106 - When enabled, the device driver will in 106 - When enabled, the device driver will instantiate RDMA specific 107 auxiliary device of the devlink device. 107 auxiliary device of the devlink device. 108 * - ``enable_vnet`` 108 * - ``enable_vnet`` 109 - Boolean 109 - Boolean 110 - When enabled, the device driver will in 110 - When enabled, the device driver will instantiate VDPA networking 111 specific auxiliary device of the devlin 111 specific auxiliary device of the devlink device. 112 * - ``enable_iwarp`` 112 * - ``enable_iwarp`` 113 - Boolean 113 - Boolean 114 - Enable handling of iWARP traffic in the 114 - Enable handling of iWARP traffic in the device. 115 * - ``internal_err_reset`` 115 * - ``internal_err_reset`` 116 - Boolean 116 - Boolean 117 - When enabled, the device driver will re 117 - When enabled, the device driver will reset the device on internal 118 errors. 118 errors. 119 * - ``max_macs`` 119 * - ``max_macs`` 120 - u32 120 - u32 121 - Typically macvlan, vlan net devices mac 121 - Typically macvlan, vlan net devices mac are also programmed in their 122 parent netdevice's Function rx filter. 122 parent netdevice's Function rx filter. This parameter limit the 123 maximum number of unicast mac address f 123 maximum number of unicast mac address filters to receive traffic from 124 per ethernet port of this device. 124 per ethernet port of this device. 125 * - ``region_snapshot_enable`` 125 * - ``region_snapshot_enable`` 126 - Boolean 126 - Boolean 127 - Enable capture of ``devlink-region`` sn 127 - Enable capture of ``devlink-region`` snapshots. 128 * - ``enable_remote_dev_reset`` 128 * - ``enable_remote_dev_reset`` 129 - Boolean 129 - Boolean 130 - Enable device reset by remote host. Whe 130 - Enable device reset by remote host. When cleared, the device driver 131 will NACK any attempt of other host to 131 will NACK any attempt of other host to reset the device. This parameter 132 is useful for setups where a device is 132 is useful for setups where a device is shared by different hosts, such 133 as multi-host setup. 133 as multi-host setup. 134 * - ``io_eq_size`` 134 * - ``io_eq_size`` 135 - u32 135 - u32 136 - Control the size of I/O completion EQs. 136 - Control the size of I/O completion EQs. 137 * - ``event_eq_size`` 137 * - ``event_eq_size`` 138 - u32 138 - u32 139 - Control the size of asynchronous contro 139 - Control the size of asynchronous control events EQ.
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.