요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0+
.. note: can be edited and viewed with /usr/bin/formiko-vim
==========================================================
PCI vDPA driver for the AMD/Pensando(R) DSC adapter family
==========================================================
AMD/Pensando vDPA VF Device Driver
Copyright(c) 2023 Advanced Micro Devices, Inc
Overview
========
The ``pds_vdpa`` driver is an auxiliary bus driver that supplies
a vDPA device for use by the virtio network stack. It is used with
the Pensando Virtual Function devices that offer vDPA and virtio queue
services. It depends on the ``pds_core`` driver and hardware for the PF
and VF PCI handling as well as for device configuration services.
Using the device
================
The ``pds_vdpa`` device is enabled via multiple configuration steps and
depends on the ``pds_core`` driver to create and enable SR-IOV Virtual
Function devices. After the VFs are enabled, we enable the vDPA service
in the ``pds_core`` device to create the auxiliary devices used by pds_vdpa.
Example steps:
.. code-block:: bash
#!/bin/bash
modprobe pds_core
modprobe vdpa
modprobe pds_vdpa
PF_BDF=`ls /sys/module/pds_core/drivers/pci\:pds_core/*/sriov_numvfs | awk -F / '{print $7}'`
# Enable vDPA VF auxiliary device(s) in the PF
devlink dev param set pci/$PF_BDF name enable_vnet cmode runtime value true
# Create a VF for vDPA use
echo 1 > /sys/bus/pci/drivers/pds_core/$PF_BDF/sriov_numvfs
# Find the vDPA services/devices available
PDS_VDPA_MGMT=`vdpa mgmtdev show | grep vDPA | head -1 | cut -d: -f1`
# Create a vDPA device for use in virtio network configurations
vdpa dev add name vdpa1 mgmtdev $PDS_VDPA_MGMT mac 00:11:22:33:44:55
# Set up an ethernet interface on the vdpa device
modprobe virtio_vdpa
Enabling the driver
===================
The driver is enabled via the standard kernel configuration system,
using the make command::
make oldconfig/menuconfig/etc.
The driver is located in the menu structure at:
-> Device Drivers
-> Network device support (NETDEVICES [=y])
-> Ethernet driver support
-> Pensando devices
-> Pensando Ethernet PDS_VDPA Support
Support
=======
For general Linux networking support, please use the netdev mailing
list, which is monitored by Pensando personnel::
netdev@vger.kernel.org
For more specific support needs, please use the Pensando driver support
email::
drivers@pensando.io
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
pds_vdpa driver 개요
1-20AMD/Pensando(R) DSC adapter family용 PCI vDPA driver
AMD/Pensando vDPA VF Device Driver
Copyright(c) 2023 Advanced Micro Devices, Inc
개요
`pds_vdpa` driver는 virtio network stack에서 사용할 vDPA device를 제공하는 auxiliary bus driver입니다. vDPA와 virtio queue service를 제공하는 Pensando Virtual Function device에서 사용합니다. PF 및 VF PCI 처리와 device configuration service는 `pds_core` driver와 hardware에 의존합니다.
.. SPDX-License-Identifier: GPL-2.0+
.. note: can be edited and viewed with /usr/bin/formiko-vim
==========================================================
PCI vDPA driver for the AMD/Pensando(R) DSC adapter family
==========================================================
AMD/Pensando vDPA VF Device Driver
Copyright(c) 2023 Advanced Micro Devices, Inc
Overview
========
The ``pds_vdpa`` driver is an auxiliary bus driver that supplies
a vDPA device for use by the virtio network stack. It is used with
the Pensando Virtual Function devices that offer vDPA and virtio queue
services. It depends on the ``pds_core`` driver and hardware for the PF
and VF PCI handling as well as for device configuration services.
Device 구성과 vDPA 생성
21-57Device 사용
`pds_vdpa` device는 여러 configuration 단계를 거쳐 활성화합니다. 먼저 `pds_core` driver가 SR-IOV Virtual Function device를 생성하고 활성화해야 합니다. VF를 활성화한 뒤 `pds_core` device에서 vDPA service를 켜면 `pds_vdpa`가 사용할 auxiliary device가 생성됩니다.
예시 단계는 다음과 같습니다.
#!/bin/bash
modprobe pds_core
modprobe vdpa
modprobe pds_vdpa
PF_BDF=`ls /sys/module/pds_core/drivers/pci\:pds_core/*/sriov_numvfs | awk -F / '{print $7}'`
# PF에서 vDPA VF auxiliary device 활성화
devlink dev param set pci/$PF_BDF name enable_vnet cmode runtime value true
# vDPA용 VF 하나 생성
echo 1 > /sys/bus/pci/drivers/pds_core/$PF_BDF/sriov_numvfs
# 사용 가능한 vDPA service/device 탐색
PDS_VDPA_MGMT=`vdpa mgmtdev show | grep vDPA | head -1 | cut -d: -f1`
# virtio network 구성에서 사용할 vDPA device 생성
vdpa dev add name vdpa1 mgmtdev $PDS_VDPA_MGMT mac 00:11:22:33:44:55
# vDPA device에 Ethernet interface 설정
modprobe virtio_vdpa
- `modprobe pds_core`, `modprobe vdpa`, `modprobe pds_vdpa`로 필요한 driver와 subsystem을 load합니다.
- `sriov_numvfs` 경로에서 PF의 BDF를 찾아 `PF_BDF`에 저장합니다.
- Devlink runtime parameter `enable_vnet=true`로 PF의 vDPA VF auxiliary device를 활성화합니다.
- `sriov_numvfs`에 `1`을 써 vDPA용 VF 하나를 생성합니다.
- `vdpa mgmtdev show`에서 사용 가능한 management device를 찾아 `PDS_VDPA_MGMT`에 저장합니다.
- `vdpa dev add`로 MAC address가 `00:11:22:33:44:55`인 `vdpa1`을 생성합니다.
- `virtio_vdpa`를 load하여 vDPA device 위에 Ethernet interface를 설정합니다.
Using the device
================
The ``pds_vdpa`` device is enabled via multiple configuration steps and
depends on the ``pds_core`` driver to create and enable SR-IOV Virtual
Function devices. After the VFs are enabled, we enable the vDPA service
in the ``pds_core`` device to create the auxiliary devices used by pds_vdpa.
Example steps:
.. code-block:: bash
#!/bin/bash
modprobe pds_core
modprobe vdpa
modprobe pds_vdpa
PF_BDF=`ls /sys/module/pds_core/drivers/pci\:pds_core/*/sriov_numvfs | awk -F / '{print $7}'`
# Enable vDPA VF auxiliary device(s) in the PF
devlink dev param set pci/$PF_BDF name enable_vnet cmode runtime value true
# Create a VF for vDPA use
echo 1 > /sys/bus/pci/drivers/pds_core/$PF_BDF/sriov_numvfs
# Find the vDPA services/devices available
PDS_VDPA_MGMT=`vdpa mgmtdev show | grep vDPA | head -1 | cut -d: -f1`
# Create a vDPA device for use in virtio network configurations
vdpa dev add name vdpa1 mgmtdev $PDS_VDPA_MGMT mac 00:11:22:33:44:55
# Set up an ethernet interface on the vdpa device
modprobe virtio_vdpa
Driver 활성화와 지원
58-85Driver 활성화
Driver는 표준 kernel configuration system을 통해 활성화하며 다음과 같은 make command를 사용합니다.
make oldconfig/menuconfig/etc.
Driver의 menu 위치는 다음과 같습니다.
-> Device Drivers
-> Network device support (NETDEVICES [=y])
-> Ethernet driver support
-> Pensando devices
-> Pensando Ethernet PDS_VDPA Support
지원
일반 Linux networking 지원은 Pensando 담당자가 확인하는 netdev mailing list를 이용하십시오.
netdev@vger.kernel.org
더 구체적인 지원이 필요하면 Pensando driver support email을 이용하십시오.
drivers@pensando.io
Enabling the driver
===================
The driver is enabled via the standard kernel configuration system,
using the make command::
make oldconfig/menuconfig/etc.
The driver is located in the menu structure at:
-> Device Drivers
-> Network device support (NETDEVICES [=y])
-> Ethernet driver support
-> Pensando devices
-> Pensando Ethernet PDS_VDPA Support
Support
=======
For general Linux networking support, please use the netdev mailing
list, which is monitored by Pensando personnel::
netdev@vger.kernel.org
For more specific support needs, please use the Pensando driver support
email::
drivers@pensando.io
요약·해설
pds_vdpa.rst:1-85`pds_vdpa`는 독립적인 PCI PF driver가 아니라 `pds_core`가 만든 auxiliary device를 virtio network stack에 연결하는 driver입니다. 따라서 module load, PF parameter, SR-IOV VF, vDPA device, virtio interface 순서를 지켜야 합니다.
PF와 VF configuration은 pds_core가, virtio 연결은 pds_vdpa가 담당합니다.
사용 예제의 dependency 순서입니다.
pds_core의 sriov_numvfs sysfs path에서 PCI BDF를 추출합니다.
각 command가 생성하거나 활성화하는 대상을 정리했습니다.
PF runtime parameter에서 최종 network interface까지의 전체 흐름입니다.
Script에서 이어지는 변수와 device 이름입니다.
문의 성격에 따라 연락처를 구분합니다.