← Documents Documentation/misc-devices/dw-xdata-pcie.rst GitHub 원문 ↗

Linux 6.18.37 · Misc devices

DesignWare PCIe xData Driver

Synopsys DesignWare PCIe xData traffic generator의 양방향 traffic 제어와 throughput 측정을 설명합니다.

Source pathDocumentation/misc-devices/dw-xdata-pcie.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

dw-xdata-pcie.rst:1-64

Root Complex host driver가 write 또는 read TLP traffic 한 방향만 활성화하고 같은 sysfs attribute를 읽어 MB/s throughput을 얻습니다.

xData traffic 방향
write=1Root ComplexEndpoint
read=1EndpointRoot Complex
read/write=0Traffic stop

두 generator는 상호 배타적이며 0을 쓰면 현재 traffic을 중지합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ===========================================================================
4 Driver for Synopsys DesignWare PCIe traffic generator (also known as xData)
5 ===========================================================================
6
7 Supported chips:
8 Synopsys DesignWare PCIe prototype solution
9
10 Datasheet:
11 Not freely available
12
13 Author:
14 Gustavo Pimentel <[email protected]>
15
16 Description
17 -----------
18
19 This driver should be used as a host-side (Root Complex) driver and Synopsys
20 DesignWare prototype that includes this IP.
21
22 The dw-xdata-pcie driver can be used to enable/disable PCIe traffic
23 generator in either direction (mutual exclusion) besides allowing the
24 PCIe link performance analysis.
25
26 The interaction with this driver is done through the module parameter and
27 can be changed in runtime. The driver outputs the requested command state
28 information to ``/var/log/kern.log`` or dmesg.
29
30 Example
31 -------
32
33 Write TLPs traffic generation - Root Complex to Endpoint direction
34 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35
36 Generate traffic::
37
38 # echo 1 > /sys/class/misc/dw-xdata-pcie.0/write
39
40 Get link throughput in MB/s::
41
42 # cat /sys/class/misc/dw-xdata-pcie.0/write
43 204
44
45 Stop traffic in any direction::
46
47 # echo 0 > /sys/class/misc/dw-xdata-pcie.0/write
48
49 Read TLPs traffic generation - Endpoint to Root Complex direction
50 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
51
52 Generate traffic::
53
54 # echo 1 > /sys/class/misc/dw-xdata-pcie.0/read
55
56 Get link throughput in MB/s::
57
58 # cat /sys/class/misc/dw-xdata-pcie.0/read
59 199
60
61 Stop traffic in any direction::
62
63 # echo 0 > /sys/class/misc/dw-xdata-pcie.0/read
64
65

3. 한국어 전문 번역

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

지원 hardware

1-15

이 문서는 xData라고도 하는 Synopsys DesignWare PCIe traffic generator driver를 설명합니다. Synopsys DesignWare PCIe prototype solution을 지원하고 datasheet는 자유롭게 제공되지 않으며 저자는 Gustavo Pimentel <[email protected]>입니다.

.. SPDX-License-Identifier: GPL-2.0

===========================================================================
Driver for Synopsys DesignWare PCIe traffic generator (also known as xData)
===========================================================================

Supported chips:
Synopsys DesignWare PCIe prototype solution

Datasheet:
Not freely available

Author:
Gustavo Pimentel <[email protected]>

동작

16-29

이 driver는 해당 IP를 포함한 Synopsys DesignWare prototype의 host-side, 즉 Root Complex driver로 사용해야 합니다.

`dw-xdata-pcie`는 양방향 중 한 방향에서 PCIe traffic generator를 enable/disable하고 PCIe link performance를 분석할 수 있습니다. 두 방향은 상호 배타적입니다.

Module parameter로 driver와 상호 작용하며 runtime에도 값을 바꿀 수 있습니다. 요청한 command state 정보는 `/var/log/kern.log` 또는 dmesg에 출력됩니다.

Description
-----------

This driver should be used as a host-side (Root Complex) driver and Synopsys
DesignWare prototype that includes this IP.

The dw-xdata-pcie driver can be used to enable/disable PCIe traffic
generator in either direction (mutual exclusion) besides allowing the
PCIe link performance analysis.

The interaction with this driver is done through the module parameter and
can be changed in runtime. The driver outputs the requested command state
information to ``/var/log/kern.log`` or dmesg.

Root Complex에서 Endpoint로 write TLP

30-48

`write` attribute에 1을 쓰면 Root Complex에서 Endpoint 방향의 traffic을 생성합니다. 같은 attribute를 읽으면 MB/s 단위 link throughput을 반환하며 예에서는 204입니다. 0을 쓰면 어느 방향이든 traffic을 중지합니다.

# echo 1 > /sys/class/misc/dw-xdata-pcie.0/write
# cat /sys/class/misc/dw-xdata-pcie.0/write
204
# echo 0 > /sys/class/misc/dw-xdata-pcie.0/write
Example
-------

Write TLPs traffic generation - Root Complex to Endpoint direction
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Generate traffic::

 # echo 1 > /sys/class/misc/dw-xdata-pcie.0/write

Get link throughput in MB/s::

 # cat /sys/class/misc/dw-xdata-pcie.0/write
 204

Stop traffic in any direction::

 # echo 0 > /sys/class/misc/dw-xdata-pcie.0/write

Endpoint에서 Root Complex로 read TLP

49-64

`read` attribute에 1을 쓰면 Endpoint에서 Root Complex 방향의 traffic을 생성합니다. Attribute를 읽으면 MB/s 단위 throughput을 반환하며 예에서는 199입니다. 0을 쓰면 traffic을 중지합니다.

# echo 1 > /sys/class/misc/dw-xdata-pcie.0/read
# cat /sys/class/misc/dw-xdata-pcie.0/read
199
# echo 0 > /sys/class/misc/dw-xdata-pcie.0/read
Read TLPs traffic generation - Endpoint to Root Complex direction
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Generate traffic::

 # echo 1 > /sys/class/misc/dw-xdata-pcie.0/read

Get link throughput in MB/s::

 # cat /sys/class/misc/dw-xdata-pcie.0/read
 199

Stop traffic in any direction::

 # echo 0 > /sys/class/misc/dw-xdata-pcie.0/read