devlink-reload.rst 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ==============
  3. Devlink Reload
  4. ==============
  5. ``devlink-reload`` provides mechanism to reinit driver entities, applying
  6. ``devlink-params`` and ``devlink-resources`` new values. It also provides
  7. mechanism to activate firmware.
  8. Reload Actions
  9. ==============
  10. User may select a reload action.
  11. By default ``driver_reinit`` action is selected.
  12. .. list-table:: Possible reload actions
  13. :widths: 5 90
  14. * - Name
  15. - Description
  16. * - ``driver-reinit``
  17. - Devlink driver entities re-initialization, including applying
  18. new values to devlink entities which are used during driver
  19. load which are:
  20. * ``devlink-params`` in configuration mode ``driverinit``
  21. * ``devlink-resources``
  22. Other devlink entities may stay over the re-initialization:
  23. * ``devlink-health-reporter``
  24. * ``devlink-region``
  25. The rest of the devlink entities have to be removed and readded.
  26. * - ``fw_activate``
  27. - Firmware activate. Activates new firmware if such image is stored and
  28. pending activation. If no limitation specified this action may involve
  29. firmware reset. If no new image pending this action will reload current
  30. firmware image.
  31. Note that even though user asks for a specific action, the driver
  32. implementation might require to perform another action alongside with
  33. it. For example, some driver do not support driver reinitialization
  34. being performed without fw activation. Therefore, the devlink reload
  35. command returns the list of actions which were actrually performed.
  36. Reload Limits
  37. =============
  38. By default reload actions are not limited and driver implementation may
  39. include reset or downtime as needed to perform the actions.
  40. However, some drivers support action limits, which limit the action
  41. implementation to specific constraints.
  42. .. list-table:: Possible reload limits
  43. :widths: 5 90
  44. * - Name
  45. - Description
  46. * - ``no_reset``
  47. - No reset allowed, no down time allowed, no link flap and no
  48. configuration is lost.
  49. Change Namespace
  50. ================
  51. The netns option allows user to be able to move devlink instances into
  52. namespaces during devlink reload operation.
  53. By default all devlink instances are created in init_net and stay there.
  54. example usage
  55. -------------
  56. .. code:: shell
  57. $ devlink dev reload help
  58. $ devlink dev reload DEV [ netns { PID | NAME | ID } ] [ action { driver_reinit | fw_activate } ] [ limit no_reset ]
  59. # Run reload command for devlink driver entities re-initialization:
  60. $ devlink dev reload pci/0000:82:00.0 action driver_reinit
  61. reload_actions_performed:
  62. driver_reinit
  63. # Run reload command to activate firmware:
  64. # Note that mlx5 driver reloads the driver while activating firmware
  65. $ devlink dev reload pci/0000:82:00.0 action fw_activate
  66. reload_actions_performed:
  67. driver_reinit fw_activate