요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. 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 <gustavo.pimentel@synopsys.com>
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.
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
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
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
지원 hardware
1-15이 문서는 xData라고도 하는 Synopsys DesignWare PCIe traffic generator driver를 설명합니다. Synopsys DesignWare PCIe prototype solution을 지원하고 datasheet는 자유롭게 제공되지 않으며 저자는 Gustavo Pimentel <gustavo.pimentel@synopsys.com>입니다.
.. 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 <gustavo.pimentel@synopsys.com>
동작
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
요약·해설
dw-xdata-pcie.rst:1-64Root Complex host driver가 write 또는 read TLP traffic 한 방향만 활성화하고 같은 sysfs attribute를 읽어 MB/s throughput을 얻습니다.
두 generator는 상호 배타적이며 0을 쓰면 현재 traffic을 중지합니다.