← Documents Documentation/devicetree/bindings/net/hisilicon-hns-nic.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Hisilicon HNS NIC

HNS NIC의 legacy port-id와 port-idx-in-ae, NIC/switch mode 배치입니다.

Source pathDocumentation/devicetree/bindings/net/hisilicon-hns-nic.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

hisilicon-hns-nic.txt:1-76

원문의 ASCII 배치도 4개를 debug·service·external port 구조표로 다시 그립니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Hisilicon Network Subsystem NIC controller
2
3 Required properties:
4 - compatible: "hisilicon,hns-nic-v1" or "hisilicon,hns-nic-v2".
5 "hisilicon,hns-nic-v1" is for hip05.
6 "hisilicon,hns-nic-v2" is for Hi1610 and Hi1612.
7 - ae-handle: accelerator engine handle for hns,
8 specifies a reference to the associating hardware driver node.
9 see Documentation/devicetree/bindings/net/hisilicon-hns-dsaf.txt
10 - port-id: is the index of port provided by DSAF (the accelerator). DSAF can
11 connect to 8 PHYs. Port 0 to 1 are both used for administration purpose. They
12 are called debug ports.
13
14 The remaining 6 PHYs are taken according to the mode of DSAF.
15
16 In NIC mode of DSAF, all 6 PHYs are taken as ethernet ports to the CPU. The
17 port-id can be 2 to 7. Here is the diagram:
18 +-----+---------------+
19 | CPU |
20 +-+-+-+---+-+-+-+-+-+-+
21 | | | | | | | |
22 debug service
23 port port
24 (0,1) (2-7)
25
26 In Switch mode of DSAF, all 6 PHYs are taken as physical ports connect to a
27 LAN Switch while the CPU side assume itself have one single NIC connect to
28 this switch. In this case, the port-id will be 2 only.
29 +-----+---------------+
30 | CPU |
31 +-+-+-+---+-+-+-+-+-+-+
32 | | service| port(2)
33 debug +------------+
34 port | switch |
35 (0,1) +-+-+-+-+-+-++
36 | | | | | |
37 external port
38
39 This attribute is remained for compatible purpose. It is not recommended to
40 use it in new code.
41
42 - port-idx-in-ae: is the index of port provided by AE.
43 In NIC mode of DSAF, all 6 PHYs of service DSAF are taken as ethernet ports
44 to the CPU. The port-idx-in-ae can be 0 to 5. Here is the diagram:
45 +-----+---------------+
46 | CPU |
47 +-+-+-+---+-+-+-+-+-+-+
48 | | | | | | | |
49 debug debug service
50 port port port
51 (0) (0) (0-5)
52
53 In Switch mode of DSAF, all 6 PHYs of service DSAF are taken as physical
54 ports connected to a LAN Switch while the CPU side assume itself have one
55 single NIC connected to this switch. In this case, the port-idx-in-ae
56 will be 0 only.
57 +-----+-----+------+------+
58 | CPU |
59 +-+-+-+-+-+-+-+-+-+-+-+-+-+
60 | | service| port(0)
61 debug debug +------------+
62 port port | switch |
63 (0) (0) +-+-+-+-+-+-++
64 | | | | | |
65 external port
66
67 - local-mac-address: mac addr of the ethernet interface
68
69 Example:
70
71 ethernet@0{
72 compatible = "hisilicon,hns-nic-v1";
73 ae-handle = <&dsaf0>;
74 port-idx-in-ae = <0>;
75 local-mac-address = [a2 14 e4 4b 56 76];
76 };
77

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-40

DSAF NIC mode에서는 service PHY 6개를 모두 CPU의 Ethernet port로 사용하므로 `port-id`는 2부터 7입니다.

Legacy port-id, NIC mode
CPU 연결port-id수량
Debug port0, 12
Service Ethernet port2-76

원문의 CPU/port ASCII 배치를 구조화했습니다.

DSAF switch mode에서는 service PHY 6개가 LAN switch의 physical port가 되고 CPU 쪽은 이 switch에 연결된 단일 NIC로 인식합니다. 이때 `port-id`는 2만 사용합니다.

Legacy port-id, switch mode
CPU 연결port-id대상
Debug ports0, 1관리
Service port2LAN switch
LAN switch-External ports 6개

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입니다.

port-idx-in-ae, NIC mode
종류port-idx-in-ae수량
Debug port A01
Debug port B01
Service port0-56

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만 사용합니다.

port-idx-in-ae, switch mode
종류port-idx-in-ae대상
Debug port A0관리
Debug port B0관리
Service port0LAN switch
LAN switch-External ports 6개

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];
};