|
| 1 | +.. SPDX-License-Identifier: GPL-2.0 |
| 2 | +
|
| 3 | +============================================================ |
| 4 | +Linux Kernel Driver for Huawei Intelligent NIC(HiNIC3) family |
| 5 | +============================================================ |
| 6 | + |
| 7 | +Overview: |
| 8 | +========= |
| 9 | +HiNIC3 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 HiNIC3 devices support SR-IOV. This driver is used for Physical Function |
| 15 | +(PF). |
| 16 | + |
| 17 | +HiNIC3 devices support MSI-X interrupt vector for each Tx/Rx queue and |
| 18 | +adaptive interrupt moderation. |
| 19 | + |
| 20 | +HiNIC3 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 - HiNIC3 PF |
| 29 | + |
| 30 | + |
| 31 | +Driver Architecture and Source Code: |
| 32 | +==================================== |
| 33 | + |
| 34 | +hinic3_dev - Implement a Logical Network device that is independent from |
| 35 | +specific HW details about HW data structure formats. |
| 36 | + |
| 37 | +hinic3_hwdev - Implement the HW details of the device and include the components |
| 38 | +for accessing the PCI NIC. |
| 39 | + |
| 40 | +hinic3_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 | +(hinic3_hw_if.c, hinic3_hw_if.h) |
| 48 | + |
| 49 | +Configuration Status Registers Area that describes the HW Registers on the |
| 50 | +configuration and status BAR0. (hinic3_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. (hinic3_hw_eqs.c, hinic3_hw_eqs.h) |
| 57 | + |
| 58 | +Application Programmable Interface commands(API CMD) - Interface for sending |
| 59 | +MGMT commands to the card. (hinic3_hw_api_cmd.c, hinic3_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 | +(hinic3_hw_mgmt.c, hinic3_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. (hinic3_hw_eqs.c, hinic3_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 | +(hinic3_hw_wq.c, hinic3_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 | +(hinic3_hw_cmdq.c, hinic3_hw_cmdq.h) |
| 81 | + |
| 82 | +Queue Pairs(QPs) - The HW Receive and Send queues for Receiving and Transmitting |
| 83 | +Data. (hinic3_hw_qp.c, hinic3_hw_qp.h, hinic3_hw_qp_ctxt.h) |
| 84 | + |
| 85 | +IO - de/constructs all the IO components. (hinic3_hw_io.c, hinic3_hw_io.h) |
| 86 | + |
| 87 | +CQM components: |
| 88 | +========== |
| 89 | + |
| 90 | +The CQM module organizes the memory in the large system in a format (CLA table) |
| 91 | +and allocates the memory to the chip (BAT table). The chip can use the memory in |
| 92 | +the large system to save context information and queue information (SCQ\SRQ). |
| 93 | +(cqm_bat_cla.c, cqm_bat_cla.h, cqm_bitmap_table.c, cqm_bitmap_table.h) |
| 94 | + |
| 95 | +When a packet is transmitted from the PCIe link, the chip parses the 5-tuple |
| 96 | +such as sid, did, and hostid. Fill the parsed data in the queue |
| 97 | +(in the form of scqe). In this way, the driver can directly obtain data from the |
| 98 | +queue (through MPDK polling) and then process the data. In this way, the |
| 99 | +uninstallation is implemented. |
| 100 | +(cqm_main.c, cqm_main.h, cqm_db.c, cqm_db.h) |
| 101 | + |
| 102 | +HW device: |
| 103 | +========== |
| 104 | + |
| 105 | +HW device - de/constructs the HW Interface, the MGMT components on the |
| 106 | +initialization of the driver and the IO components on the case of Interface |
| 107 | +UP/DOWN Events. (hinic3_hw_dev.c, hinic3_hw_dev.h) |
| 108 | + |
| 109 | + |
| 110 | +hinic3_dev contains the following components: |
| 111 | +=============================================== |
| 112 | + |
| 113 | +PCI ID table - Contains the supported PCI Vendor/Device IDs. |
| 114 | +(hinic3_pci_tbl.h) |
| 115 | + |
| 116 | +Port Commands - Send commands to the HW device for port management |
| 117 | +(MAC, Vlan, MTU, ...). (hinic3_port.c, hinic3_port.h) |
| 118 | + |
| 119 | +Tx Queues - Logical Tx Queues that use the HW Send Queues for transmit. |
| 120 | +The Logical Tx queue is not dependent on the format of the HW Send Queue. |
| 121 | +(hinic3_tx.c, hinic3_tx.h) |
| 122 | + |
| 123 | +Rx Queues - Logical Rx Queues that use the HW Receive Queues for receive. |
| 124 | +The Logical Rx queue is not dependent on the format of the HW Receive Queue. |
| 125 | +(hinic3_rx.c, hinic3_rx.h) |
| 126 | + |
| 127 | +hinic_dev - de/constructs the Logical Tx and Rx Queues. |
| 128 | +(hinic3_main.c, hinic3_dev.h) |
| 129 | + |
| 130 | + |
| 131 | +Miscellaneous: |
| 132 | +============= |
| 133 | + |
| 134 | +Common functions that are used by HW and Logical Device. |
| 135 | +(hinic3_common.c, hinic3_common.h) |
| 136 | + |
| 137 | + |
| 138 | +Support |
| 139 | +======= |
| 140 | + |
| 141 | +If an issue is identified with the released source code on the supported kernel |
| 142 | +with a supported adapter, email the specific information related to the issue to |
| 143 | +wulike1@huawei.com. |
0 commit comments