← Documents Documentation/networking/device_drivers/ethernet/amd/pds_vdpa.rst GitHub 원문 ↗

Linux 6.18.37 · Networking

PCI vDPA driver for the AMD/Pensando DSC adapter family

pds_core PF에서 SR-IOV VF와 auxiliary device를 만들고 pds_vdpa·virtio_vdpa로 network interface를 구성하는 절차입니다.

Source pathDocumentation/networking/device_drivers/ethernet/amd/pds_vdpa.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

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 순서를 지켜야 합니다.

Driver 의존 관계
Pensando PF·VF hardware`pds_core`auxiliary device`pds_vdpa`vDPA device`virtio_vdpa`Network interface

PF와 VF configuration은 pds_core가, virtio 연결은 pds_vdpa가 담당합니다.

Module load 순서
순서Module역할
1`pds_core`PF·VF와 device configuration
2`vdpa`vDPA core subsystem
3`pds_vdpa`Pensando auxiliary bus driver
4`virtio_vdpa`Virtio network interface 연결

사용 예제의 dependency 순서입니다.

PF BDF 탐색
`/sys/module/pds_core/drivers/.../*/sriov_numvfs``ls``awk -F / '{print $7}'``PF_BDF`

pds_core의 sriov_numvfs sysfs path에서 PCI BDF를 추출합니다.

구성 단계
단계Command결과
vDPA service`devlink ... enable_vnet ... true`PF auxiliary device 활성화
SR-IOV VF`echo 1 > .../sriov_numvfs`VF 1개 생성
Mgmt device`vdpa mgmtdev show`사용 가능한 service 탐색
vDPA device`vdpa dev add name vdpa1 ...``vdpa1` 생성
Interface`modprobe virtio_vdpa`Virtio Ethernet 연결

각 command가 생성하거나 활성화하는 대상을 정리했습니다.

vDPA device 생성
`enable_vnet=true`SR-IOV VF 생성vDPA mgmtdev 발견`vdpa1` 추가`virtio_vdpa` loadEthernet interface

PF runtime parameter에서 최종 network interface까지의 전체 흐름입니다.

핵심 식별자
이름값·출처
`PF_BDF`pds_core sysfs path에서 추출
`PDS_VDPA_MGMT``vdpa mgmtdev show` 결과
Device name`vdpa1`
MAC`00:11:22:33:44:55`

Script에서 이어지는 변수와 device 이름입니다.

지원 채널
범위연락처
일반 Linux networking`netdev@vger.kernel.org`
Pensando driver 상세 지원`drivers@pensando.io`

문의 성격에 따라 연락처를 구분합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0+
2 .. note: can be edited and viewed with /usr/bin/formiko-vim
3
4 ==========================================================
5 PCI vDPA driver for the AMD/Pensando(R) DSC adapter family
6 ==========================================================
7
8 AMD/Pensando vDPA VF Device Driver
9
10 Copyright(c) 2023 Advanced Micro Devices, Inc
11
12 Overview
13 ========
14
15 The ``pds_vdpa`` driver is an auxiliary bus driver that supplies
16 a vDPA device for use by the virtio network stack. It is used with
17 the Pensando Virtual Function devices that offer vDPA and virtio queue
18 services. It depends on the ``pds_core`` driver and hardware for the PF
19 and VF PCI handling as well as for device configuration services.
20
21 Using the device
22 ================
23
24 The ``pds_vdpa`` device is enabled via multiple configuration steps and
25 depends on the ``pds_core`` driver to create and enable SR-IOV Virtual
26 Function devices. After the VFs are enabled, we enable the vDPA service
27 in the ``pds_core`` device to create the auxiliary devices used by pds_vdpa.
28
29 Example steps:
30
31 .. code-block:: bash
32
33 #!/bin/bash
34
35 modprobe pds_core
36 modprobe vdpa
37 modprobe pds_vdpa
38
39 PF_BDF=`ls /sys/module/pds_core/drivers/pci\:pds_core/*/sriov_numvfs | awk -F / '{print $7}'`
40
41 # Enable vDPA VF auxiliary device(s) in the PF
42 devlink dev param set pci/$PF_BDF name enable_vnet cmode runtime value true
43
44 # Create a VF for vDPA use
45 echo 1 > /sys/bus/pci/drivers/pds_core/$PF_BDF/sriov_numvfs
46
47 # Find the vDPA services/devices available
48 PDS_VDPA_MGMT=`vdpa mgmtdev show | grep vDPA | head -1 | cut -d: -f1`
49
50 # Create a vDPA device for use in virtio network configurations
51 vdpa dev add name vdpa1 mgmtdev $PDS_VDPA_MGMT mac 00:11:22:33:44:55
52
53 # Set up an ethernet interface on the vdpa device
54 modprobe virtio_vdpa
55
56
57
58 Enabling the driver
59 ===================
60
61 The driver is enabled via the standard kernel configuration system,
62 using the make command::
63
64 make oldconfig/menuconfig/etc.
65
66 The driver is located in the menu structure at:
67
68 -> Device Drivers
69 -> Network device support (NETDEVICES [=y])
70 -> Ethernet driver support
71 -> Pensando devices
72 -> Pensando Ethernet PDS_VDPA Support
73
74 Support
75 =======
76
77 For general Linux networking support, please use the netdev mailing
78 list, which is monitored by Pensando personnel::
79
80 netdev@vger.kernel.org
81
82 For more specific support needs, please use the Pensando driver support
83 email::
84
85 drivers@pensando.io
86

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

pds_vdpa driver 개요

1-20

AMD/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-57

Device 사용

`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-85

Driver 활성화

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