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