← Documents Documentation/networking/device_drivers/ethernet/huawei/hinic.rst GitHub 원문 ↗

Linux 6.18.37 · Networking

Linux Kernel Driver for Huawei Intelligent NIC (HiNIC) family

Huawei HiNIC PF 드라이버의 지원 기능, hinic_dev와 hinic_hwdev 계층, MGMT·IO queue 구성요소와 source file 책임을 설명합니다.

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

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

1. 요약·해설

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

요약·해설

hinic.rst:1-128

HiNIC 드라이버는 장치별 hardware 표현을 `hinic_hwdev`에 가두고, network stack이 사용하는 logical Tx/Rx queue를 `hinic_dev`에 제공합니다. MGMT 경로는 API CMD와 AEQ, IO 경로는 CMDQ·CEQ·WQ·QP로 역할이 분리됩니다.

지원 기능
범주지원 항목
Link speed10GbE, 25GbE, 40GbE 등
Virtualization일부 장치의 SR-IOV, 이 드라이버는 PF 담당
InterruptTx/Rx queue별 MSI-X, adaptive moderation
Offloadchecksum, TSO, RSS, LRO
PCI ID19e5:1822

HiNIC PF 드라이버가 제공하는 link와 data-path 기능입니다.

드라이버 계층
Linux network stackhinic_dev logical Tx/Rxhinic_hwdevHW interface / MGMT / IOPCI HiNIC

logical device와 hardware-specific device 사이의 책임 경계입니다.

MGMT command와 notification
PFMGMT channelAPI CMDcard MGMT module
card MGMT moduleAEQPF notification handling
MGMT channelIO CMDQ address를 hardware에 설정

명령은 API CMD로 내려가고 알림은 AEQ로 올라옵니다.

IO command 완료
CMDQ에 IO management command 게시WQ / WQE memory 사용hardware 실행CEQ에 completion event 누적
QP address 설정hardware send/receive QPpacket TX/RX

WQ memory 위의 command와 completion 처리 관계입니다.

수명주기별 구성
시점대상
driver 초기화·해제HW interface, MGMT component
interface UP/DOWNIO component
logical device 구성·해제logical Tx/Rx queue

HW device가 component를 만들고 해제하는 시점입니다.

주요 source 책임
영역Source책임
HW interfacehinic_hw_if.*, hinic_hw_csr.hDMA, PCI BAR, CSR
MGMThinic_hw_api_cmd.*, hinic_hw_mgmt.*command와 notification channel
Eventhinic_hw_eqs.*AEQ와 CEQ
IO queuehinic_hw_wq.*, hinic_hw_cmdq.*, hinic_hw_qp.*WQ, CMDQ, QP
Logical queuehinic_tx.*, hinic_rx.*HW 형식 독립적인 Tx/Rx
Porthinic_port.*MAC, VLAN, MTU command

문서에 제시된 source file과 담당 기능을 묶었습니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ============================================================
4 Linux Kernel Driver for Huawei Intelligent NIC(HiNIC) family
5 ============================================================
6
7 Overview:
8 =========
9 HiNIC is a network interface card for the Data Center Area.
10
11 The driver supports a range of link-speed devices (10GbE, 25GbE, 40GbE, etc.).
12 The driver supports also a negotiated and extendable feature set.
13
14 Some HiNIC devices support SR-IOV. This driver is used for Physical Function
15 (PF).
16
17 HiNIC devices support MSI-X interrupt vector for each Tx/Rx queue and
18 adaptive interrupt moderation.
19
20 HiNIC devices support also various offload features such as checksum offload,
21 TCP Transmit Segmentation Offload(TSO), Receive-Side Scaling(RSS) and
22 LRO(Large Receive Offload).
23
24
25 Supported PCI vendor ID/device IDs:
26 ===================================
27
28 19e5:1822 - HiNIC PF
29
30
31 Driver Architecture and Source Code:
32 ====================================
33
34 hinic_dev - Implement a Logical Network device that is independent from
35 specific HW details about HW data structure formats.
36
37 hinic_hwdev - Implement the HW details of the device and include the components
38 for accessing the PCI NIC.
39
40 hinic_hwdev contains the following components:
41 ===============================================
42
43 HW Interface:
44 =============
45
46 The interface for accessing the pci device (DMA memory and PCI BARs).
47 (hinic_hw_if.c, hinic_hw_if.h)
48
49 Configuration Status Registers Area that describes the HW Registers on the
50 configuration and status BAR0. (hinic_hw_csr.h)
51
52 MGMT components:
53 ================
54
55 Asynchronous Event Queues(AEQs) - The event queues for receiving messages from
56 the MGMT modules on the cards. (hinic_hw_eqs.c, hinic_hw_eqs.h)
57
58 Application Programmable Interface commands(API CMD) - Interface for sending
59 MGMT commands to the card. (hinic_hw_api_cmd.c, hinic_hw_api_cmd.h)
60
61 Management (MGMT) - the PF to MGMT channel that uses API CMD for sending MGMT
62 commands to the card and receives notifications from the MGMT modules on the
63 card by AEQs. Also set the addresses of the IO CMDQs in HW.
64 (hinic_hw_mgmt.c, hinic_hw_mgmt.h)
65
66 IO components:
67 ==============
68
69 Completion Event Queues(CEQs) - The completion Event Queues that describe IO
70 tasks that are finished. (hinic_hw_eqs.c, hinic_hw_eqs.h)
71
72 Work Queues(WQ) - Contain the memory and operations for use by CMD queues and
73 the Queue Pairs. The WQ is a Memory Block in a Page. The Block contains
74 pointers to Memory Areas that are the Memory for the Work Queue Elements(WQEs).
75 (hinic_hw_wq.c, hinic_hw_wq.h)
76
77 Command Queues(CMDQ) - The queues for sending commands for IO management and is
78 used to set the QPs addresses in HW. The commands completion events are
79 accumulated on the CEQ that is configured to receive the CMDQ completion events.
80 (hinic_hw_cmdq.c, hinic_hw_cmdq.h)
81
82 Queue Pairs(QPs) - The HW Receive and Send queues for Receiving and Transmitting
83 Data. (hinic_hw_qp.c, hinic_hw_qp.h, hinic_hw_qp_ctxt.h)
84
85 IO - de/constructs all the IO components. (hinic_hw_io.c, hinic_hw_io.h)
86
87 HW device:
88 ==========
89
90 HW device - de/constructs the HW Interface, the MGMT components on the
91 initialization of the driver and the IO components on the case of Interface
92 UP/DOWN Events. (hinic_hw_dev.c, hinic_hw_dev.h)
93
94
95 hinic_dev contains the following components:
96 ===============================================
97
98 PCI ID table - Contains the supported PCI Vendor/Device IDs.
99 (hinic_pci_tbl.h)
100
101 Port Commands - Send commands to the HW device for port management
102 (MAC, Vlan, MTU, ...). (hinic_port.c, hinic_port.h)
103
104 Tx Queues - Logical Tx Queues that use the HW Send Queues for transmit.
105 The Logical Tx queue is not dependent on the format of the HW Send Queue.
106 (hinic_tx.c, hinic_tx.h)
107
108 Rx Queues - Logical Rx Queues that use the HW Receive Queues for receive.
109 The Logical Rx queue is not dependent on the format of the HW Receive Queue.
110 (hinic_rx.c, hinic_rx.h)
111
112 hinic_dev - de/constructs the Logical Tx and Rx Queues.
113 (hinic_main.c, hinic_dev.h)
114
115
116 Miscellaneous
117 =============
118
119 Common functions that are used by HW and Logical Device.
120 (hinic_common.c, hinic_common.h)
121
122
123 Support
124 =======
125
126 If an issue is identified with the released source code on the supported kernel
127 with a supported adapter, email the specific information related to the issue to
128 aviad.krawczyk@huawei.com.
129

3. 한국어 전문 번역

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

개요와 지원 PCI ID

1-29

이 문서는 `GPL-2.0` 라이선스를 따릅니다.

Huawei Intelligent NIC(HiNIC) 제품군용 Linux 커널 드라이버

개요

HiNIC은 data center 영역을 위한 network interface card입니다.

드라이버는 `10GbE`, `25GbE`, `40GbE` 등 여러 link speed의 장치를 지원하며, 협상 가능하고 확장 가능한 feature 집합도 지원합니다.

일부 HiNIC 장치는 SR-IOV를 지원합니다. 이 드라이버는 Physical Function(PF)에 사용됩니다.

HiNIC 장치는 각 Tx/Rx queue별 MSI-X interrupt vector와 adaptive interrupt moderation을 지원합니다.

또한 checksum offload, TCP Transmit Segmentation Offload(TSO), Receive-Side Scaling(RSS), LRO(Large Receive Offload) 등 여러 offload 기능을 지원합니다.

지원 PCI vendor ID/device ID

`19e5:1822` - HiNIC PF

.. SPDX-License-Identifier: GPL-2.0

============================================================
Linux Kernel Driver for Huawei Intelligent NIC(HiNIC) family
============================================================

Overview:
=========
HiNIC is a network interface card for the Data Center Area.

The driver supports a range of link-speed devices (10GbE, 25GbE, 40GbE, etc.).
The driver supports also a negotiated and extendable feature set.

Some HiNIC devices support SR-IOV. This driver is used for Physical Function
(PF).

HiNIC devices support MSI-X interrupt vector for each Tx/Rx queue and
adaptive interrupt moderation.

HiNIC devices support also various offload features such as checksum offload,
TCP Transmit Segmentation Offload(TSO), Receive-Side Scaling(RSS) and
LRO(Large Receive Offload).


Supported PCI vendor ID/device IDs:
===================================

19e5:1822 - HiNIC PF

드라이버 계층과 HW interface

30-50

드라이버 architecture와 source code

`hinic_dev`는 hardware data structure 형식의 구체적인 세부사항과 독립적인 logical network device를 구현합니다.

`hinic_hwdev`는 장치의 hardware 세부사항을 구현하고 PCI NIC에 접근하기 위한 component를 포함합니다.

`hinic_hwdev`에는 다음 component가 포함됩니다.

HW interface

PCI 장치의 DMA memory와 PCI BAR에 접근하는 interface입니다. 관련 source는 `hinic_hw_if.c`, `hinic_hw_if.h`입니다.

Configuration Status Registers 영역은 configuration 및 status용 `BAR0`의 hardware register를 설명합니다. 관련 header는 `hinic_hw_csr.h`입니다.


Driver Architecture and Source Code:
====================================

hinic_dev - Implement a Logical Network device that is independent from
specific HW details about HW data structure formats.

hinic_hwdev - Implement the HW details of the device and include the components
for accessing the PCI NIC.

hinic_hwdev contains the following components:
===============================================

HW Interface:
=============

The interface for accessing the pci device (DMA memory and PCI BARs).
(hinic_hw_if.c, hinic_hw_if.h)

Configuration Status Registers Area that describes the HW Registers on the
configuration and status BAR0. (hinic_hw_csr.h)

MGMT component

51-64

MGMT component

Asynchronous Event Queue(AEQ)는 card의 MGMT module에서 보내는 message를 수신하는 event queue입니다. 관련 source는 `hinic_hw_eqs.c`, `hinic_hw_eqs.h`입니다.

Application Programmable Interface command(API CMD)는 MGMT command를 card에 보내는 interface입니다. 관련 source는 `hinic_hw_api_cmd.c`, `hinic_hw_api_cmd.h`입니다.

Management(MGMT)는 PF와 MGMT 사이의 channel입니다. API CMD로 MGMT command를 card에 보내고, card의 MGMT module이 보내는 notification을 AEQ로 받습니다. 또한 hardware에 IO CMDQ의 address를 설정합니다. 관련 source는 `hinic_hw_mgmt.c`, `hinic_hw_mgmt.h`입니다.


MGMT components:
================

Asynchronous Event Queues(AEQs) - The event queues for receiving messages from
the MGMT modules on the cards. (hinic_hw_eqs.c, hinic_hw_eqs.h)

Application Programmable Interface commands(API CMD) - Interface for sending
MGMT commands to the card. (hinic_hw_api_cmd.c, hinic_hw_api_cmd.h)

Management (MGMT) - the PF to MGMT channel that uses API CMD for sending MGMT
commands to the card and receives notifications from the MGMT modules on the
card by AEQs. Also set the addresses of the IO CMDQs in HW.
(hinic_hw_mgmt.c, hinic_hw_mgmt.h)

IO component와 HW device 수명주기

65-92

IO component

Completion Event Queue(CEQ)는 완료된 IO task를 나타내는 completion event queue입니다. 관련 source는 `hinic_hw_eqs.c`, `hinic_hw_eqs.h`입니다.

Work Queue(WQ)는 command queue와 Queue Pair가 사용할 memory와 operation을 담습니다. WQ는 page 안의 memory block이며, block에는 Work Queue Element(WQE)의 memory가 되는 memory area를 가리키는 pointer가 들어 있습니다. 관련 source는 `hinic_hw_wq.c`, `hinic_hw_wq.h`입니다.

Command Queue(CMDQ)는 IO management command를 전송하고 hardware에 QP address를 설정하는 queue입니다. command completion event는 CMDQ completion event를 받도록 구성된 CEQ에 누적됩니다. 관련 source는 `hinic_hw_cmdq.c`, `hinic_hw_cmdq.h`입니다.

Queue Pair(QP)는 data를 수신하고 전송하는 hardware receive queue와 send queue입니다. 관련 source는 `hinic_hw_qp.c`, `hinic_hw_qp.h`, `hinic_hw_qp_ctxt.h`입니다.

IO 계층은 모든 IO component를 구성하고 해제합니다. 관련 source는 `hinic_hw_io.c`, `hinic_hw_io.h`입니다.

HW device

HW device 계층은 드라이버 초기화 때 HW interface와 MGMT component를 구성하거나 해제하고, interface UP/DOWN event 때 IO component를 구성하거나 해제합니다. 관련 source는 `hinic_hw_dev.c`, `hinic_hw_dev.h`입니다.


IO components:
==============

Completion Event Queues(CEQs) - The completion Event Queues that describe IO
tasks that are finished. (hinic_hw_eqs.c, hinic_hw_eqs.h)

Work Queues(WQ) - Contain the memory and operations for use by CMD queues and
the Queue Pairs. The WQ is a Memory Block in a Page. The Block contains
pointers to Memory Areas that are the Memory for the Work Queue Elements(WQEs).
(hinic_hw_wq.c, hinic_hw_wq.h)

Command Queues(CMDQ) - The queues for sending commands for IO management and is
used to set the QPs addresses in HW. The commands completion events are
accumulated on the CEQ that is configured to receive the CMDQ completion events.
(hinic_hw_cmdq.c, hinic_hw_cmdq.h)

Queue Pairs(QPs) - The HW Receive and Send queues for Receiving and Transmitting
Data. (hinic_hw_qp.c, hinic_hw_qp.h, hinic_hw_qp_ctxt.h)

IO - de/constructs all the IO components. (hinic_hw_io.c, hinic_hw_io.h)

HW device:
==========

HW device - de/constructs the HW Interface, the MGMT components on the
initialization of the driver and the IO components on the case of Interface
UP/DOWN Events. (hinic_hw_dev.c, hinic_hw_dev.h)

hinic_dev logical device component

93-113

`hinic_dev`에는 다음 component가 포함됩니다.

PCI ID table은 지원하는 PCI vendor/device ID를 담습니다. 관련 header는 `hinic_pci_tbl.h`입니다.

Port Command는 MAC, VLAN, MTU 등의 port management를 위해 HW device에 command를 보냅니다. 관련 source는 `hinic_port.c`, `hinic_port.h`입니다.

Tx Queue는 hardware send queue를 사용해 전송하는 logical Tx queue입니다. 이 logical queue는 hardware send queue의 형식에 의존하지 않습니다. 관련 source는 `hinic_tx.c`, `hinic_tx.h`입니다.

Rx Queue는 hardware receive queue를 사용해 수신하는 logical Rx queue입니다. 이 logical queue는 hardware receive queue의 형식에 의존하지 않습니다. 관련 source는 `hinic_rx.c`, `hinic_rx.h`입니다.

`hinic_dev`는 logical Tx/Rx queue를 구성하고 해제합니다. 관련 source는 `hinic_main.c`, `hinic_dev.h`입니다.



hinic_dev contains the following components:
===============================================

PCI ID table - Contains the supported PCI Vendor/Device IDs.
(hinic_pci_tbl.h)

Port Commands - Send commands to the HW device for port management
(MAC, Vlan, MTU, ...). (hinic_port.c, hinic_port.h)

Tx Queues - Logical Tx Queues that use the HW Send Queues for transmit.
The Logical Tx queue is not dependent on the format of the HW Send Queue.
(hinic_tx.c, hinic_tx.h)

Rx Queues - Logical Rx Queues that use the HW Receive Queues for receive.
The Logical Rx queue is not dependent on the format of the HW Receive Queue.
(hinic_rx.c, hinic_rx.h)

hinic_dev - de/constructs the Logical Tx and Rx Queues.
(hinic_main.c, hinic_dev.h)

공통 함수와 지원 문의

114-128

기타

HW device와 logical device가 함께 사용하는 공통 함수는 `hinic_common.c`, `hinic_common.h`에 있습니다.

지원

지원되는 adapter와 kernel에서 공개된 source code의 문제가 확인되면 해당 문제의 구체적인 정보를 `aviad.krawczyk@huawei.com`으로 보내십시오.



Miscellaneous
=============

Common functions that are used by HW and Logical Device.
(hinic_common.c, hinic_common.h)


Support
=======

If an issue is identified with the released source code on the supported kernel
with a supported adapter, email the specific information related to the issue to
aviad.krawczyk@huawei.com.