0001 .. SPDX-License-Identifier: GPL-2.0
0002
0003 ==============
0004 Devlink Reload
0005 ==============
0006
0007 ``devlink-reload`` provides mechanism to reinit driver entities, applying
0008 ``devlink-params`` and ``devlink-resources`` new values. It also provides
0009 mechanism to activate firmware.
0010
0011 Reload Actions
0012 ==============
0013
0014 User may select a reload action.
0015 By default ``driver_reinit`` action is selected.
0016
0017 .. list-table:: Possible reload actions
0018 :widths: 5 90
0019
0020 * - Name
0021 - Description
0022 * - ``driver-reinit``
0023 - Devlink driver entities re-initialization, including applying
0024 new values to devlink entities which are used during driver
0025 load such as ``devlink-params`` in configuration mode
0026 ``driverinit`` or ``devlink-resources``
0027 * - ``fw_activate``
0028 - Firmware activate. Activates new firmware if such image is stored and
0029 pending activation. If no limitation specified this action may involve
0030 firmware reset. If no new image pending this action will reload current
0031 firmware image.
0032
0033 Note that even though user asks for a specific action, the driver
0034 implementation might require to perform another action alongside with
0035 it. For example, some driver do not support driver reinitialization
0036 being performed without fw activation. Therefore, the devlink reload
0037 command returns the list of actions which were actrually performed.
0038
0039 Reload Limits
0040 =============
0041
0042 By default reload actions are not limited and driver implementation may
0043 include reset or downtime as needed to perform the actions.
0044
0045 However, some drivers support action limits, which limit the action
0046 implementation to specific constraints.
0047
0048 .. list-table:: Possible reload limits
0049 :widths: 5 90
0050
0051 * - Name
0052 - Description
0053 * - ``no_reset``
0054 - No reset allowed, no down time allowed, no link flap and no
0055 configuration is lost.
0056
0057 Change Namespace
0058 ================
0059
0060 The netns option allows user to be able to move devlink instances into
0061 namespaces during devlink reload operation.
0062 By default all devlink instances are created in init_net and stay there.
0063
0064 example usage
0065 -------------
0066
0067 .. code:: shell
0068
0069 $ devlink dev reload help
0070 $ devlink dev reload DEV [ netns { PID | NAME | ID } ] [ action { driver_reinit | fw_activate } ] [ limit no_reset ]
0071
0072 # Run reload command for devlink driver entities re-initialization:
0073 $ devlink dev reload pci/0000:82:00.0 action driver_reinit
0074 reload_actions_performed:
0075 driver_reinit
0076
0077 # Run reload command to activate firmware:
0078 # Note that mlx5 driver reloads the driver while activating firmware
0079 $ devlink dev reload pci/0000:82:00.0 action fw_activate
0080 reload_actions_performed:
0081 driver_reinit fw_activate