18559dc33SJacob Keller.. SPDX-License-Identifier: GPL-2.0 28559dc33SJacob Keller 38559dc33SJacob Keller============== 48559dc33SJacob KellerDevlink Params 58559dc33SJacob Keller============== 68559dc33SJacob Keller 78559dc33SJacob Keller``devlink`` provides capability for a driver to expose device parameters for low 88559dc33SJacob Kellerlevel device functionality. Since devlink can operate at the device-wide 98559dc33SJacob Kellerlevel, it can be used to provide configuration that may affect multiple 108559dc33SJacob Kellerports on a single device. 118559dc33SJacob Keller 128559dc33SJacob KellerThis document describes a number of generic parameters that are supported 138559dc33SJacob Kelleracross multiple drivers. Each driver is also free to add their own 148559dc33SJacob Kellerparameters. Each driver must document the specific parameters they support, 158559dc33SJacob Kellerwhether generic or not. 168559dc33SJacob Keller 178559dc33SJacob KellerConfiguration modes 188559dc33SJacob Keller=================== 198559dc33SJacob Keller 208559dc33SJacob KellerParameters may be set in different configuration modes. 218559dc33SJacob Keller 228559dc33SJacob Keller.. list-table:: Possible configuration modes 238559dc33SJacob Keller :widths: 5 90 248559dc33SJacob Keller 258559dc33SJacob Keller * - Name 268559dc33SJacob Keller - Description 278559dc33SJacob Keller * - ``runtime`` 288559dc33SJacob Keller - set while the driver is running, and takes effect immediately. No 298559dc33SJacob Keller reset is required. 308559dc33SJacob Keller * - ``driverinit`` 318559dc33SJacob Keller - applied while the driver initializes. Requires the user to restart 328559dc33SJacob Keller the driver using the ``devlink`` reload command. 338559dc33SJacob Keller * - ``permanent`` 348559dc33SJacob Keller - written to the device's non-volatile memory. A hard reset is required 358559dc33SJacob Keller for it to take effect. 368559dc33SJacob Keller 375948f85bSJacob KellerReloading 385948f85bSJacob Keller--------- 395948f85bSJacob Keller 405948f85bSJacob KellerIn order for ``driverinit`` parameters to take effect, the driver must 415948f85bSJacob Kellersupport reloading via the ``devlink-reload`` command. This command will 425948f85bSJacob Kellerrequest a reload of the device driver. 435948f85bSJacob Keller 44*cd556e40SJakub Kicinski.. _devlink_params_generic: 45*cd556e40SJakub Kicinski 468559dc33SJacob KellerGeneric configuration parameters 478559dc33SJacob Keller================================ 488559dc33SJacob KellerThe following is a list of generic configuration parameters that drivers may 498559dc33SJacob Kelleradd. Use of generic parameters is preferred over each driver creating their 508559dc33SJacob Kellerown name. 518559dc33SJacob Keller 528559dc33SJacob Keller.. list-table:: List of generic parameters 538559dc33SJacob Keller :widths: 5 5 90 548559dc33SJacob Keller 558559dc33SJacob Keller * - Name 568559dc33SJacob Keller - Type 578559dc33SJacob Keller - Description 588559dc33SJacob Keller * - ``enable_sriov`` 598559dc33SJacob Keller - Boolean 608559dc33SJacob Keller - Enable Single Root I/O Virtualization (SRIOV) in the device. 618559dc33SJacob Keller * - ``ignore_ari`` 628559dc33SJacob Keller - Boolean 638559dc33SJacob Keller - Ignore Alternative Routing-ID Interpretation (ARI) capability. If 648559dc33SJacob Keller enabled, the adapter will ignore ARI capability even when the 658559dc33SJacob Keller platform has support enabled. The device will create the same number 668559dc33SJacob Keller of partitions as when the platform does not support ARI. 678559dc33SJacob Keller * - ``msix_vec_per_pf_max`` 688559dc33SJacob Keller - u32 698559dc33SJacob Keller - Provides the maximum number of MSI-X interrupts that a device can 708559dc33SJacob Keller create. Value is the same across all physical functions (PFs) in the 718559dc33SJacob Keller device. 728559dc33SJacob Keller * - ``msix_vec_per_pf_min`` 738559dc33SJacob Keller - u32 748559dc33SJacob Keller - Provides the minimum number of MSI-X interrupts required for the 758559dc33SJacob Keller device to initialize. Value is the same across all physical functions 768559dc33SJacob Keller (PFs) in the device. 778559dc33SJacob Keller * - ``fw_load_policy`` 788559dc33SJacob Keller - u8 798559dc33SJacob Keller - Control the device's firmware loading policy. 808559dc33SJacob Keller - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER`` (0) 818559dc33SJacob Keller Load firmware version preferred by the driver. 828559dc33SJacob Keller - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH`` (1) 838559dc33SJacob Keller Load firmware currently stored in flash. 848559dc33SJacob Keller - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK`` (2) 858559dc33SJacob Keller Load firmware currently available on host's disk. 868559dc33SJacob Keller * - ``reset_dev_on_drv_probe`` 878559dc33SJacob Keller - u8 888559dc33SJacob Keller - Controls the device's reset policy on driver probe. 898559dc33SJacob Keller - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_UNKNOWN`` (0) 908559dc33SJacob Keller Unknown or invalid value. 918559dc33SJacob Keller - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_ALWAYS`` (1) 928559dc33SJacob Keller Always reset device on driver probe. 938559dc33SJacob Keller - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_NEVER`` (2) 948559dc33SJacob Keller Never reset device on driver probe. 958559dc33SJacob Keller - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_DISK`` (3) 968559dc33SJacob Keller Reset the device only if firmware can be found in the filesystem. 978559dc33SJacob Keller * - ``enable_roce`` 988559dc33SJacob Keller - Boolean 998559dc33SJacob Keller - Enable handling of RoCE traffic in the device. 100d56a0c47SJacob Keller * - ``internal_err_reset`` 101d56a0c47SJacob Keller - Boolean 102d56a0c47SJacob Keller - When enabled, the device driver will reset the device on internal 103d56a0c47SJacob Keller errors. 104d56a0c47SJacob Keller * - ``max_macs`` 105d56a0c47SJacob Keller - u32 106d56a0c47SJacob Keller - Specifies the maximum number of MAC addresses per ethernet port of 107d56a0c47SJacob Keller this device. 108d56a0c47SJacob Keller * - ``region_snapshot_enable`` 109d56a0c47SJacob Keller - Boolean 110d56a0c47SJacob Keller - Enable capture of ``devlink-region`` snapshots. 111