요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
==============
Devlink Reload
==============
``devlink-reload`` provides mechanism to reinit driver entities, applying
``devlink-params`` and ``devlink-resources`` new values. It also provides
mechanism to activate firmware.
Reload Actions
==============
User may select a reload action.
By default ``driver_reinit`` action is selected.
.. list-table:: Possible reload actions
:widths: 5 90
* - Name
- Description
* - ``driver-reinit``
- Devlink driver entities re-initialization, including applying
new values to devlink entities which are used during driver
load which are:
* ``devlink-params`` in configuration mode ``driverinit``
* ``devlink-resources``
Other devlink entities may stay over the re-initialization:
* ``devlink-health-reporter``
* ``devlink-region``
The rest of the devlink entities have to be removed and readded.
* - ``fw_activate``
- Firmware activate. Activates new firmware if such image is stored and
pending activation. If no limitation specified this action may involve
firmware reset. If no new image pending this action will reload current
firmware image.
Note that even though user asks for a specific action, the driver
implementation might require to perform another action alongside with
it. For example, some driver do not support driver reinitialization
being performed without fw activation. Therefore, the devlink reload
command returns the list of actions which were actrually performed.
Reload Limits
=============
By default reload actions are not limited and driver implementation may
include reset or downtime as needed to perform the actions.
However, some drivers support action limits, which limit the action
implementation to specific constraints.
.. list-table:: Possible reload limits
:widths: 5 90
* - Name
- Description
* - ``no_reset``
- No reset allowed, no down time allowed, no link flap and no
configuration is lost.
Change Namespace
================
The netns option allows user to be able to move devlink instances into
namespaces during devlink reload operation.
By default all devlink instances are created in init_net and stay there.
example usage
-------------
.. code:: shell
$ devlink dev reload help
$ devlink dev reload DEV [ netns { PID | NAME | ID } ] [ action { driver_reinit | fw_activate } ] [ limit no_reset ]
# Run reload command for devlink driver entities re-initialization:
$ devlink dev reload pci/0000:82:00.0 action driver_reinit
reload_actions_performed:
driver_reinit
# Run reload command to activate firmware:
# Note that mlx5 driver reloads the driver while activating firmware
$ devlink dev reload pci/0000:82:00.0 action fw_activate
reload_actions_performed:
driver_reinit fw_activate
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Devlink Reload 소개
1-16이 문서는 `GPL-2.0` 라이선스를 따릅니다.
Devlink Reload
`devlink-reload`는 driver entity를 다시 초기화하면서 `devlink-params`와 `devlink-resources`의 새 값을 적용하는 mechanism을 제공합니다. Firmware를 활성화하는 mechanism도 제공합니다.
Reload action
사용자는 reload action을 선택할 수 있습니다. 기본으로 선택되는 action은 `driver_reinit`입니다.
.. SPDX-License-Identifier: GPL-2.0
==============
Devlink Reload
==============
``devlink-reload`` provides mechanism to reinit driver entities, applying
``devlink-params`` and ``devlink-resources`` new values. It also provides
mechanism to activate firmware.
Reload Actions
==============
User may select a reload action.
By default ``driver_reinit`` action is selected.
Reload action
17-47재초기화와 firmware 활성화가 어떤 항목에 영향을 주는지 정리합니다.
사용자가 특정 action을 요청했더라도 driver 구현은 다른 action을 함께 수행해야 할 수 있습니다. 예를 들어 일부 driver는 firmware 활성화 없이 driver 재초기화만 수행하는 것을 지원하지 않습니다. 따라서 devlink reload 명령은 실제로 수행한 action 목록을 반환합니다.
.. list-table:: Possible reload actions
:widths: 5 90
* - Name
- Description
* - ``driver-reinit``
- Devlink driver entities re-initialization, including applying
new values to devlink entities which are used during driver
load which are:
* ``devlink-params`` in configuration mode ``driverinit``
* ``devlink-resources``
Other devlink entities may stay over the re-initialization:
* ``devlink-health-reporter``
* ``devlink-region``
The rest of the devlink entities have to be removed and readded.
* - ``fw_activate``
- Firmware activate. Activates new firmware if such image is stored and
pending activation. If no limitation specified this action may involve
firmware reset. If no new image pending this action will reload current
firmware image.
Note that even though user asks for a specific action, the driver
implementation might require to perform another action alongside with
it. For example, some driver do not support driver reinitialization
being performed without fw activation. Therefore, the devlink reload
command returns the list of actions which were actrually performed.
Reload limit
48-65Reload limit
기본적으로 reload action에는 제한이 없으므로, driver 구현은 action 수행에 필요한 reset이나 downtime을 포함할 수 있습니다.
일부 driver는 action 구현을 특정 제약 조건으로 한정하는 action limit을 지원합니다.
`no_reset`은 서비스 연속성을 유지해야 하는 작업에 사용합니다.
Reload Limits
=============
By default reload actions are not limited and driver implementation may
include reset or downtime as needed to perform the actions.
However, some drivers support action limits, which limit the action
implementation to specific constraints.
.. list-table:: Possible reload limits
:widths: 5 90
* - Name
- Description
* - ``no_reset``
- No reset allowed, no down time allowed, no link flap and no
configuration is lost.
Namespace 변경
66-72Namespace 변경
`netns` option을 사용하면 devlink reload 작업 중 devlink instance를 namespace로 옮길 수 있습니다. 기본적으로 모든 devlink instance는 `init_net`에서 만들어지고 그곳에 유지됩니다.
Change Namespace
================
The netns option allows user to be able to move devlink instances into
namespaces during devlink reload operation.
By default all devlink instances are created in init_net and stay there.
사용 예
73-90사용 예
$ devlink dev reload help
$ devlink dev reload DEV [ netns { PID | NAME | ID } ] [ action { driver_reinit | fw_activate } ] [ limit no_reset ]
# devlink driver entity 재초기화
$ devlink dev reload pci/0000:82:00.0 action driver_reinit
reload_actions_performed:
driver_reinit
# firmware 활성화
# mlx5 driver는 firmware 활성화 중 driver도 reload함
$ devlink dev reload pci/0000:82:00.0 action fw_activate
reload_actions_performed:
driver_reinit fw_activate
두 번째 예에서 `fw_activate`만 요청했지만 mlx5 driver가 `driver_reinit`도 함께 수행했으므로 결과에 두 action이 모두 표시됩니다.
example usage
-------------
.. code:: shell
$ devlink dev reload help
$ devlink dev reload DEV [ netns { PID | NAME | ID } ] [ action { driver_reinit | fw_activate } ] [ limit no_reset ]
# Run reload command for devlink driver entities re-initialization:
$ devlink dev reload pci/0000:82:00.0 action driver_reinit
reload_actions_performed:
driver_reinit
# Run reload command to activate firmware:
# Note that mlx5 driver reloads the driver while activating firmware
$ devlink dev reload pci/0000:82:00.0 action fw_activate
reload_actions_performed:
driver_reinit fw_activate
요약·해설
devlink-reload.rst:1-90Devlink reload는 설정 값을 적용하거나 firmware를 활성화할 때 사용합니다. 요청한 action 외에 driver가 필요한 action을 함께 수행할 수 있으므로 `reload_actions_performed` 결과를 확인해야 합니다. 중단을 허용하지 않는 환경에서는 지원 여부를 확인한 뒤 `no_reset` limit을 지정합니다.
작업 목적과 허용 가능한 영향 범위를 함께 판단합니다.