91 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3==============4Devlink Reload5==============6 7``devlink-reload`` provides mechanism to reinit driver entities, applying8``devlink-params`` and ``devlink-resources`` new values. It also provides9mechanism to activate firmware.10 11Reload Actions12==============13 14User may select a reload action.15By default ``driver_reinit`` action is selected.16 17.. list-table:: Possible reload actions18 :widths: 5 9019 20 * - Name21 - Description22 * - ``driver-reinit``23 - Devlink driver entities re-initialization, including applying24 new values to devlink entities which are used during driver25 load which are:26 27 * ``devlink-params`` in configuration mode ``driverinit``28 * ``devlink-resources``29 30 Other devlink entities may stay over the re-initialization:31 32 * ``devlink-health-reporter``33 * ``devlink-region``34 35 The rest of the devlink entities have to be removed and readded.36 * - ``fw_activate``37 - Firmware activate. Activates new firmware if such image is stored and38 pending activation. If no limitation specified this action may involve39 firmware reset. If no new image pending this action will reload current40 firmware image.41 42Note that even though user asks for a specific action, the driver43implementation might require to perform another action alongside with44it. For example, some driver do not support driver reinitialization45being performed without fw activation. Therefore, the devlink reload46command returns the list of actions which were actrually performed.47 48Reload Limits49=============50 51By default reload actions are not limited and driver implementation may52include reset or downtime as needed to perform the actions.53 54However, some drivers support action limits, which limit the action55implementation to specific constraints.56 57.. list-table:: Possible reload limits58 :widths: 5 9059 60 * - Name61 - Description62 * - ``no_reset``63 - No reset allowed, no down time allowed, no link flap and no64 configuration is lost.65 66Change Namespace67================68 69The netns option allows user to be able to move devlink instances into70namespaces during devlink reload operation.71By default all devlink instances are created in init_net and stay there.72 73example usage74-------------75 76.. code:: shell77 78 $ devlink dev reload help79 $ devlink dev reload DEV [ netns { PID | NAME | ID } ] [ action { driver_reinit | fw_activate } ] [ limit no_reset ]80 81 # Run reload command for devlink driver entities re-initialization:82 $ devlink dev reload pci/0000:82:00.0 action driver_reinit83 reload_actions_performed:84 driver_reinit85 86 # Run reload command to activate firmware:87 # Note that mlx5 driver reloads the driver while activating firmware88 $ devlink dev reload pci/0000:82:00.0 action fw_activate89 reload_actions_performed:90 driver_reinit fw_activate91