요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Hisilicon Network Subsystem NIC controller
Required properties:
- compatible: "hisilicon,hns-nic-v1" or "hisilicon,hns-nic-v2".
"hisilicon,hns-nic-v1" is for hip05.
"hisilicon,hns-nic-v2" is for Hi1610 and Hi1612.
- ae-handle: accelerator engine handle for hns,
specifies a reference to the associating hardware driver node.
see Documentation/devicetree/bindings/net/hisilicon-hns-dsaf.txt
- port-id: is the index of port provided by DSAF (the accelerator). DSAF can
connect to 8 PHYs. Port 0 to 1 are both used for administration purpose. They
are called debug ports.
The remaining 6 PHYs are taken according to the mode of DSAF.
In NIC mode of DSAF, all 6 PHYs are taken as ethernet ports to the CPU. The
port-id can be 2 to 7. Here is the diagram:
+-----+---------------+
| CPU |
+-+-+-+---+-+-+-+-+-+-+
| | | | | | | |
debug service
port port
(0,1) (2-7)
In Switch mode of DSAF, all 6 PHYs are taken as physical ports connect to a
LAN Switch while the CPU side assume itself have one single NIC connect to
this switch. In this case, the port-id will be 2 only.
+-----+---------------+
| CPU |
+-+-+-+---+-+-+-+-+-+-+
| | service| port(2)
debug +------------+
port | switch |
(0,1) +-+-+-+-+-+-++
| | | | | |
external port
This attribute is remained for compatible purpose. It is not recommended to
use it in new code.
- port-idx-in-ae: is the index of port provided by AE.
In NIC mode of DSAF, all 6 PHYs of service DSAF are taken as ethernet ports
to the CPU. The port-idx-in-ae can be 0 to 5. Here is the diagram:
+-----+---------------+
| CPU |
+-+-+-+---+-+-+-+-+-+-+
| | | | | | | |
debug debug service
port port port
(0) (0) (0-5)
In Switch mode of DSAF, all 6 PHYs of service DSAF are taken as physical
ports connected to a LAN Switch while the CPU side assume itself have one
single NIC connected to this switch. In this case, the port-idx-in-ae
will be 0 only.
+-----+-----+------+------+
| CPU |
+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | service| port(0)
debug debug +------------+
port port | switch |
(0) (0) +-+-+-+-+-+-++
| | | | | |
external port
- local-mac-address: mac addr of the ethernet interface
Example:
ethernet@0{
compatible = "hisilicon,hns-nic-v1";
ae-handle = <&dsaf0>;
port-idx-in-ae = <0>;
local-mac-address = [a2 14 e4 4b 56 76];
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Hisilicon HNS NIC 기본 속성
1-15`compatible`은 HIP05용 `hisilicon,hns-nic-v1` 또는 Hi1610/Hi1612용 `hisilicon,hns-nic-v2`입니다.
`ae-handle`은 HNS accelerator engine handle이며 연결된 hardware driver node를 참조합니다. 자세한 내용은 `Documentation/devicetree/bindings/net/hisilicon-hns-dsaf.txt`를 참조하십시오.
`port-id`는 DSAF accelerator가 제공하는 port index입니다. DSAF는 PHY 8개를 연결할 수 있고 port 0과 1은 관리용 debug port이며, 나머지 PHY 6개는 DSAF mode에 따라 사용합니다.
이전 port-id의 NIC·switch mode
16-40DSAF NIC mode에서는 service PHY 6개를 모두 CPU의 Ethernet port로 사용하므로 `port-id`는 2부터 7입니다.
원문의 CPU/port ASCII 배치를 구조화했습니다.
DSAF switch mode에서는 service PHY 6개가 LAN switch의 physical port가 되고 CPU 쪽은 이 switch에 연결된 단일 NIC로 인식합니다. 이때 `port-id`는 2만 사용합니다.
CPU service port 2가 switch를 거쳐 외부 port 6개에 연결됩니다.
`port-id`는 호환성을 위해 남아 있는 속성이며 새 코드에서는 사용을 권장하지 않습니다.
port-idx-in-ae의 NIC·switch mode
41-68`port-idx-in-ae`는 AE가 제공하는 port index입니다. DSAF NIC mode에서는 service DSAF의 PHY 6개를 CPU Ethernet port로 사용하므로 값은 0부터 5입니다.
AE별 index 공간에서는 debug port와 service port가 각각 0부터 시작합니다.
DSAF switch mode에서는 service PHY 6개가 LAN switch의 physical port이고 CPU는 switch에 연결된 단일 NIC를 가집니다. 이때 `port-idx-in-ae`는 0만 사용합니다.
Service index 0이 switch의 외부 port 6개를 대표합니다.
`local-mac-address`는 Ethernet interface의 MAC address입니다.
HNS NIC v1 예제
69-76예제는 `dsaf0` accelerator engine의 port index 0에 HNS NIC v1을 연결하고 local MAC address `a2:14:e4:4b:56:76`을 지정합니다.
ethernet@0{
compatible = "hisilicon,hns-nic-v1";
ae-handle = <&dsaf0>;
port-idx-in-ae = <0>;
local-mac-address = [a2 14 e4 4b 56 76];
};
요약과 해설
hisilicon-hns-nic.txt:1-76원문의 ASCII 배치도 4개를 debug·service·external port 구조표로 다시 그립니다.