devlink-params.rst 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ==============
  3. Devlink Params
  4. ==============
  5. ``devlink`` provides capability for a driver to expose device parameters for low
  6. level device functionality. Since devlink can operate at the device-wide
  7. level, it can be used to provide configuration that may affect multiple
  8. ports on a single device.
  9. This document describes a number of generic parameters that are supported
  10. across multiple drivers. Each driver is also free to add their own
  11. parameters. Each driver must document the specific parameters they support,
  12. whether generic or not.
  13. Configuration modes
  14. ===================
  15. Parameters may be set in different configuration modes.
  16. .. list-table:: Possible configuration modes
  17. :widths: 5 90
  18. * - Name
  19. - Description
  20. * - ``runtime``
  21. - set while the driver is running, and takes effect immediately. No
  22. reset is required.
  23. * - ``driverinit``
  24. - applied while the driver initializes. Requires the user to restart
  25. the driver using the ``devlink`` reload command.
  26. * - ``permanent``
  27. - written to the device's non-volatile memory. A hard reset is required
  28. for it to take effect.
  29. Reloading
  30. ---------
  31. In order for ``driverinit`` parameters to take effect, the driver must
  32. support reloading via the ``devlink-reload`` command. This command will
  33. request a reload of the device driver.
  34. .. _devlink_params_generic:
  35. Generic configuration parameters
  36. ================================
  37. The following is a list of generic configuration parameters that drivers may
  38. add. Use of generic parameters is preferred over each driver creating their
  39. own name.
  40. .. list-table:: List of generic parameters
  41. :widths: 5 5 90
  42. * - Name
  43. - Type
  44. - Description
  45. * - ``enable_sriov``
  46. - Boolean
  47. - Enable Single Root I/O Virtualization (SRIOV) in the device.
  48. * - ``ignore_ari``
  49. - Boolean
  50. - Ignore Alternative Routing-ID Interpretation (ARI) capability. If
  51. enabled, the adapter will ignore ARI capability even when the
  52. platform has support enabled. The device will create the same number
  53. of partitions as when the platform does not support ARI.
  54. * - ``msix_vec_per_pf_max``
  55. - u32
  56. - Provides the maximum number of MSI-X interrupts that a device can
  57. create. Value is the same across all physical functions (PFs) in the
  58. device.
  59. * - ``msix_vec_per_pf_min``
  60. - u32
  61. - Provides the minimum number of MSI-X interrupts required for the
  62. device to initialize. Value is the same across all physical functions
  63. (PFs) in the device.
  64. * - ``fw_load_policy``
  65. - u8
  66. - Control the device's firmware loading policy.
  67. - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER`` (0)
  68. Load firmware version preferred by the driver.
  69. - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH`` (1)
  70. Load firmware currently stored in flash.
  71. - ``DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK`` (2)
  72. Load firmware currently available on host's disk.
  73. * - ``reset_dev_on_drv_probe``
  74. - u8
  75. - Controls the device's reset policy on driver probe.
  76. - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_UNKNOWN`` (0)
  77. Unknown or invalid value.
  78. - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_ALWAYS`` (1)
  79. Always reset device on driver probe.
  80. - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_NEVER`` (2)
  81. Never reset device on driver probe.
  82. - ``DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_DISK`` (3)
  83. Reset the device only if firmware can be found in the filesystem.
  84. * - ``enable_roce``
  85. - Boolean
  86. - Enable handling of RoCE traffic in the device.
  87. * - ``internal_err_reset``
  88. - Boolean
  89. - When enabled, the device driver will reset the device on internal
  90. errors.
  91. * - ``max_macs``
  92. - u32
  93. - Specifies the maximum number of MAC addresses per ethernet port of
  94. this device.
  95. * - ``region_snapshot_enable``
  96. - Boolean
  97. - Enable capture of ``devlink-region`` snapshots.
  98. * - ``enable_remote_dev_reset``
  99. - Boolean
  100. - Enable device reset by remote host. When cleared, the device driver
  101. will NACK any attempt of other host to reset the device. This parameter
  102. is useful for setups where a device is shared by different hosts, such
  103. as multi-host setup.