Protocol converter and method for network card and electronic equipment
By designing a protocol converter for data nodes, including protocol controllers, cross switches and PCIe interfaces, the problem of difficulty in realizing RDMA data transmission is solved, efficient and real-time data transmission is achieved, and the device size is reduced.
Patent Information
- Application Number
- CN202510393771.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-06-17
AI Technical Summary
Ordinary data nodes, such as high-speed data acquisition devices, are difficult to achieve real-time data transmission through RDMA technology, and the equipment is large and cannot be directly inserted into the computer node to utilize the RDMA network card.
A protocol converter for network cards is designed, including a protocol controller, a cross switch and a PCIe interface, which is used to transmit data between a data node without a processor and an RDMA network card, and to realize data transmission of data nodes through RDMA technology.
Data nodes without processors are realized to transmit data through RDMA technology, reducing latency, improving real-time and efficiency of data transmission, and reducing device volume.
Smart Images

Figure CN120166152A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer communications, and in particular, to a protocol converter, method, and electronic device for a network card. Background Art
[0002] In practical applications, a computer node inserts a Network Interface Card (NIC), and then through Remote Direct Memory Access (RDMA) technology, the local data node can directly access the memory of the remote data node. This access does not require a Central Processing Unit (CPU) cache and context switching. When the application program of the local data node executes an RDMA read or write request, the application program data is directly transmitted to the network, thereby reducing latency and enabling fast message transmission.
[0003] For ordinary data nodes, such as high-speed data acquisition devices, there is a high requirement for real-time data transmission. Using software programming for RDMA data transmission is relatively slow, and the acquisition device needs to integrate a computer, resulting in a large volume. Summary of the Invention
[0004] Embodiments of this application provide a protocol converter, method, and electronic device for a network card, which are used to enable data nodes without a processor to also achieve data transmission through RDMA technology.
[0005] In a first aspect, embodiments of this application provide a protocol converter for a network card, including: a protocol controller, a crossbar switch, and a Peripheral Component Interconnect Express (PCIe) interface; the protocol controller is provided with a transceiver interface, and the transceiver interface is connected to a data node; the data node does not have a processor; The PCIe interface is connected to a Remote Direct Memory Access (RDMA) network card for transmitting data between the data node and the RDMA network card; the protocol controller further includes a sending management unit and a receiving management unit. The sending management unit is used to receive data sent by the data node and send it to the PCIe interface through the crossbar switch in a message mechanism; the receiving management unit is used to receive data transmitted by the PCIe interface through the crossbar switch.
[0006] The above protocol converter is connected to the data node through the transceiver interface, and can send the data sent by the data node to the RDMA network card, enabling the RDMA network card to transmit the data to the remote RDMA in an RDMA mechanism, realizing that a data node without a processor can also transmit data through the RDMA mechanism.
[0007] In a possible implementation, the sending management unit includes a first data processing unit, a data storage area, a doorbell generator, and a reading unit; the first data processing unit is configured to obtain first data sent by the data node through the transceiver interface and store the first data in sequence in the data storage area; the first data processing unit is further configured to trigger the doorbell generator; the doorbell generator is configured to send a notification message to the RDMA network card through the crossbar switch and the PCIe interface; the reading unit is configured to read the first data from the data storage area to the RDMA network card according to a reading request; the reading request is generated by the RDMA network card according to the notification message and sent to the reading unit through the PCIe interface and the crossbar switch.
[0008] The above protocol converter receives the first data and stores the first data in sequence in the data storage area, triggers the doorbell, so that the first data is sent to the RDMA in sequence, ensuring the sequentiality of data transmission.
[0009] In a possible implementation, the first data processing unit includes a data unit, a descriptor unit, and a descriptor management unit, and the data storage area includes a transmission data storage area and a descriptor queue; the data unit is configured to store the first data in sequence in the transmission data storage area; the descriptor unit is configured to generate a descriptor corresponding to the first data and store it in the descriptor queue; the descriptor is used to describe the destination address of the first data transmission and the storage location of the first data in the transmission data storage area; the descriptor management unit is configured to trigger the doorbell generator to send a notification message, and the notification message includes identification information of at least one descriptor.
[0010] The above protocol converter stores the content of the first data and the descriptor of the first data in the transmission data storage area and the descriptor queue respectively. Furthermore, the notification message sent by the doorbell generator includes identification information of at least one descriptor, so that the RDMA can read the descriptor first.
[0011] In a possible implementation, the reading unit includes a first reading unit, a second reading unit, and a read controller; the read controller is configured to control the first reading unit to read the descriptor indicated by the descriptor reading request according to the descriptor reading request; and control the second reading unit to read the transmission entry according to the data reading request; the descriptor reading request is generated by the RDMA network card according to the notification message; the data reading request is generated by the RDMA network card according to the read descriptor.
[0012] The above protocol converter controls the first reading unit to read a descriptor through a read controller, enabling RDMA to generate a data reading request based on the read descriptor. Subsequently, the read controller controls the second reading unit to read a transmission entry according to the data reading request.
[0013] In a possible implementation, the descriptor unit includes a byte alignment unit and an address reading unit; the byte alignment unit is used to remove invalid bytes in the first data; the descriptor unit is used to generate a descriptor corresponding to the first data after removing the invalid bytes and store it in the descriptor queue.
[0014] The above protocol converter removes the invalid bytes in the first data sent by a data node through the byte alignment unit and sends the valid bytes to the RDMA network card.
[0015] In a possible implementation, the transmission management unit further includes a completion unit, and the data storage area further includes a completion queue; the completion unit is used to store the completion message sent by the RDMA network card in the completion queue; the completion message is used to indicate that the RDMA network card has read the first data.
[0016] The above protocol converter further includes a completion queue and a completion unit. By receiving the completion message, the transmission status of the first data can be determined, facilitating the retransmission of data that fails to be transmitted.
[0017] In a possible implementation, the transmission management unit further includes an in-order unit; the in-order unit is used to store the received completion messages in the order of the transmission entries in the transmission data storage area and manage the release of the space in the transmission data storage area.
[0018] In a possible implementation, the protocol converter further includes a static configuration unit and a dynamic configuration unit; the static configuration unit is used to configure the parameters of the RDMA network card to start the operation of the RDMA network card when the RDMA network card has not been started; the dynamic configuration unit is used to configure the relevant registers of the RDMA network card after the RDMA network card is started.
[0019] In a possible implementation, the dynamic configuration unit is used to obtain a completion message from the completion queue and perform dynamic configuration on the RDMA network card according to at least one completion message for the next data transmission.
[0020] In a possible implementation, the receiving management unit includes a second data processing unit and a received data storage area; the received data storage area is used to store the data sent by the RDMA network card received through the PCIe interface and the crossbar switch; the second processing unit is used to process the data in the received data storage area and then send it to the data node.
[0021] In a second aspect, an embodiment of the present application provides a protocol conversion method for a network card, which is applicable to a protocol converter. The protocol converter includes a crossbar switch and a PCIe interface. The method includes: receiving data sent by a data node, and sending it to the PCIe interface through the crossbar switch in a message mechanism; receiving the data transmitted by the PCIe interface through the crossbar switch; the crossbar switch and the PCIe interface are part of the protocol converter.
[0022] In a possible implementation, the protocol converter further includes a transceiver interface, a data storage area, a doorbell generator, and a reading unit; receiving data sent by a data node and sending it to the PCIe interface through the crossbar switch in a message mechanism includes: obtaining first data sent by the data node through the transceiver interface, and sequentially storing the first data in the data storage area; triggering the doorbell generator; sending a notification message to the RDMA network card through the crossbar switch and the PCIe interface; reading the first data from the data storage area to the RDMA network card according to a reading request, where the reading request is generated by the RDMA network card according to the notification message and sent to the reading unit through the PCIe interface and the crossbar switch.
[0023] In a possible implementation, the data storage area includes a transmission data storage area and a descriptor queue. Obtaining first data sent by the data node through the transceiver interface and sequentially storing the first data in the data storage area includes: sequentially storing the first data in the transmission data storage area; generating a descriptor corresponding to the first data and storing it in the descriptor queue; the descriptor is used to describe the destination address of the first data transmission and the storage location of the first data in the transmission data storage area.
[0024] In a third aspect, an embodiment of the present application provides an electronic device, including a protocol converter in any possible implementation of the first aspect.
[0025] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the computer reads and executes the instructions, the computer is caused to execute the method in any possible implementation of the second aspect above. Description of the Drawings
[0026] To more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.
[0027] Figure 1 Schematic diagram of a protocol converter system architecture provided by an embodiment of the present application; Figure 2 Schematic diagram of internal modules of a protocol converter provided by an embodiment of the present application; Figure 3 Schematic diagram of non-aligned byte address transmission provided by an embodiment of the present application; Figure 4 Schematic diagram of another internal module of the protocol converter system provided by an embodiment of the present application; Figure 5 Schematic diagram of a protocol conversion method process for a network card provided by an embodiment of the present application. Detailed implementation manners
[0028] In order to make the purpose, technical solutions and advantages of the present application clearer, the following will further describe the present application in detail with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0029] A network card is a computer hardware component used to connect a computer to a network, allowing the computer to send and receive data in the network. An RDMA network card is a network card suitable for RDMA, a high-performance network card integrating RDMA technology. RDMA is generated to solve the latency of server-side data processing in network transmission. RDMA can quickly transfer data from one data node to the memory of a remote data node without any impact on the operating system, eliminating the overhead caused by external memory copying and context switching.
[0030] At present, RDMA network cards can mainly be used in computer nodes. By inserting an RDMA network card into a computer device, the computer node can achieve fast data transmission through RDMA technology. However, for ordinary data nodes, such as industrial data acquisition devices, since such devices are not in the form of a computer, an RDMA network card cannot be directly inserted into the device. Moreover, due to the miniaturization requirements of such devices, if each channel of the device needs to use RDMA technology to achieve data transmission, it is impossible to connect each channel of the device to a computer device through a network cable, which can neither meet the requirement of real-time transmission nor the requirement of device miniaturization.
[0031] Based on this, the embodiments of the present application provide a protocol converter for a network card, which is used to enable a data node without a processor to also achieve data transmission through RDMA technology.
[0032] Figure 1 As shown in the schematic diagram of the system architecture of a protocol converter provided by the embodiments of the present application, Figure 1 as shown, the protocol converter includes a protocol controller, a crossbar switch, and a Peripheral Component Interconnect Express (PCIe) interface.
[0033] Among them, the protocol controller is provided with a transceiver interface, and the transceiver interface is connected to the data node. The data node does not have a processor, such as a data acquisition device. The PCIe interface is connected to the RDMA network card and is used to transmit data between the data node and the RDMA network card. The protocol controller further includes a sending management unit and a receiving management unit. The sending management unit is used to receive the data sent by the data node and send it to the PCIe interface through the crossbar switch in a message mechanism; the receiving management unit is used to receive the data transmitted by the PCIe interface through the crossbar switch. Specifically, the PCIe interface can be the Root interface of PCIe.
[0034] The protocol converter provided by the embodiments of the present application is a high-performance data transceiver hardware module implemented in Verilog language, which can be fabricated into a chip or implemented through a Field-Programmable Gate Array (FPGA). Compared with using general computer software programming for data transmission, the RDMA technology implemented by embedding hardware can achieve high-speed access effects.
[0035] The protocol converter provided by the embodiment of the present application is for the RDMA network card, and a domestic RDMA network card can be utilized to enable data to be transmitted between data nodes through a message mechanism. Specifically, the protocol converter includes a protocol controller, a crossbar switch, and a PCIe interface. The protocol controller has a transceiver interface and is connected to the data node through the transceiver interface. The connection between the transceiver interface and the data node complies with the Advanced eXtensible Interface (AXI) protocol. The connections between the protocol controller, the crossbar switch, and the PCIe interface also comply with the AXI protocol. The connection between the PCIe interface and the RDMA network card complies with the PCIe protocol. The data node is used to generate data and write the data to a remote data node through the protocol converter and the RDMA network card, or actively read the data in the remote data node. The crossbar switch is used to establish a direct connection between multiple input lines and multiple output lines to achieve efficient and flexible data transmission.
[0036] It can be understood that the local data node and the remote data node transmit data through the RDMA protocol. Both the local data node and the remote data node need to be connected to the protocol converter, and the protocol converter needs to be connected to the RDMA network card. That is to say, the device of the local data node is connected to the protocol converter, the protocol converter is connected to the RDMA network card, the local RDMA network card communicates with the RDMA network card of the remote data node, the remote RDMA network card is connected to the remote protocol converter, and the remote protocol converter is connected to the remote data node. Among them, the protocol converter can be installed in the data node in the form of a chip or an FPGA, and the protocol converter is then connected to the RDMA network card through an insert bar.
[0037] The data node and the protocol converter are connected through the AXI bus protocol, and the AXI address space is globally addressed for the entire machine. A specific example of the AXI address space addressing is shown in Table 1:
[0038] As can be seen from Table 1, the AXI address bus is 64 bits, where bits 51-63 are the high 13 bits, and bits 0-50 are the low 51 bits. Bits 51-63 represent the target node number, which refers to the node number of the remote node, and bits 0-50 are the address space addresses in the target node. The number of high bits and the number of low bits can be changed according to actual service requirements. Table 1 is only an example in the embodiment of the present application.
[0039] For bits 0-31 in the low bits, the protocol converter interface address allocation rules are shown in Table 2:
[0040] In a possible implementation, the sending management unit includes a first data processing unit, a data storage area, a doorbell generator, and a reading unit. Figure 2 It is a schematic diagram of an internal module of a protocol converter provided by an embodiment of this application. As Figure 2 shown, the transceiver interface in the sending management unit is used to receive the first data sent by the data node. The first data processing unit is used to obtain the first data sent by the data node through the transceiver interface and store the first data in sequence in the data storage area. After storing the first data in sequence in the data storage area, the first data processing unit is further used to trigger the doorbell generator, and the doorbell generator is used to send a notification message to the local RDMA network card through the crossbar switch and the PCIe interface. After receiving the notification message, the local RDMA network card generates a read request according to the notification message and sends the read request to the reading unit in the NIC protocol controller through the PCIe interface. After receiving the read request, the reading unit reads the first data from the data storage area to the local RDMA network card. After receiving the first data, the local RDMA network card sends the first data to the remote RDMA network card according to the RDMA protocol.
[0041] It can be understood that when the transceiver interface receives the first data sent by the data node through the AXI bus, the destination address is carried in the AXI bus, and the destination address includes the target node number and the memory address in the target node. After receiving the first data, the local RDMA network card sends the first data to the remote RDMA network card in the form of a message packet, and the remote RDMA network card writes the first data into the corresponding data storage area according to the destination address carried in the message packet.
[0042] In a possible implementation, the first data processing unit includes a data unit, a descriptor unit, and a descriptor management unit. The data storage area includes a transmission data storage area and a descriptor queue. The data unit is used to sequentially store the first data into the transmission data storage area. The length of the transmission data storage area can be set according to actual service requirements. In the embodiments of the present application, the transmission data storage area buffers at most 256 KB. If each transmission entry is set to 2 K, then 128 transmission entries are supported for buffering; if each transmission entry is set to 128 KB, then 2 transmission entries are supported for buffering. The data node transfers data to the protocol converter with a maximum length of 16 KB at a time. The descriptor unit is used to generate a descriptor corresponding to the first data and store it into the descriptor queue. The descriptor is used to describe the destination address of the first data transmission and the storage location of the first data in the transmission data storage area. While receiving the first data through the transceiver interface, the descriptor unit determines the destination address of the first data transmission according to the destination address information carried on the AXI bus. The storage location of the first data in the transmission data storage area is also pre-configured. The descriptor and the transmission entry are in one-to-one correspondence. The descriptor data content includes fields such as opcode 0, opcode 1, the storage location of the first data in the transmission data storage area, the destination address of the first data, the receiver completion queue, the flag unit address, software-defined information, and reserved information. The specific value of the opcode can be determined according to the requirements of the RDMA network card. The descriptor management unit is used to trigger the doorbell generator to send a notification message. The notification message includes the identification information of at least one descriptor. After the first data is stored in the transmission data storage area and the descriptor of the transmission entry is generated, the descriptor management unit triggers the doorbell generator to send a notification message. After determining a transmission entry and the descriptor of the transmission entry, a notification message is sent. The notification message includes the identification information of one descriptor; after determining multiple transmission entries and the descriptors of multiple transmission entries, a notification message is sent, and the notification message includes the identification information of multiple descriptors, that is, the descriptor queue.
[0043] In a possible implementation, the reading unit includes a first reading unit, a second reading unit, and a read controller. The read controller is used to control the first reading unit to read the descriptor indicated by the descriptor reading request according to the descriptor reading request; and control the second reading unit to read the transmission entry according to the data reading request. The descriptor reading request is generated by the RDMA network card according to the notification message, and the data reading request is generated by the RDMA network card according to the parsed descriptor.
[0044] That is to say, the RDMA network card generates a descriptor reading request according to the notification message sent by the doorbell generator. The read controller receives the descriptor reading request sent by the RDMA, controls the first reading unit to read the descriptor indicated by the descriptor reading request. After the RDMA network card reads the descriptor, it generates a data reading request according to the information included in the descriptor. The read controller receives the data reading request sent by the RDMA and controls the second reading unit to read the sending entry.
[0045] In a possible implementation manner, the descriptor unit includes a byte alignment unit and an address reading unit. The byte alignment unit is used to remove the invalid bytes in the first data, align the unaligned bytes, and then determine the data volume of the effective data to be sent. The low byte address signal of the unaligned needs to be consistent with the byte enable signal (Byte Strobe, STRB). The STRB signal is used to indicate which bytes on the data bus are valid. Taking the 16B data width in DW_128BIT mode as an example, Figure 3 FIG. is a schematic diagram of non-aligned byte address transmission provided by an embodiment of the present application. The STRB signal at the gray position is 0. The address reading unit is used to read the address information on the AXI bus. The descriptor unit is used to generate a descriptor corresponding to the first data after removing the invalid bytes and store it in the descriptor queue.
[0046] In a possible implementation manner, the sending management unit further includes a completion unit, and the data storage area further includes a completion queue. The completion unit is used to store the completion message sent by the RDMA network card in the completion queue. The completion message is used to indicate that the RDMA network card has read the sending entry.
[0047] That is to say, the remote RDMA receives the sending entry sent by the local RDMA, sends the sending entry to the address space in the remote data node through the protocol converter on the remote node side, and then the remote RDMA network card generates an acknowledgment packet. The acknowledgment packet corresponds to the sending entry one by one and sends the acknowledgment packet to the local RDMA network card. The local RDMA network card generates a completion message according to the acknowledgment packet, sends the completion message to the local protocol converter, and stores it in the completion queue. The completion message is a packet composed according to the acknowledgment packet, including information such as successful reading of the sending entry by the RDMA network card, failure timeout, or other information.
[0048] In a possible implementation manner, the sending management unit further includes an in-order unit. The in-order unit is used to perform corresponding release management on the space of the sending data storage area for the received completion message.
[0049] Specifically, the send entries are read into the RDMA network card in order, and the completion messages should also be stored in the completion queue in the order in which the send entries are sent. Simply put, if the send entries are sent in sequence 1234, then the completion messages should also be saved in the order of sequence 1234. If the completion message corresponding to the send entry with sequence number 2 has not been received yet, and the completion messages corresponding to the send entries with sequence numbers 1, 3, and 4 have been received, then the space of the send entry with sequence number 1 in the send data storage area can be released, and the spaces of the send entries with sequence numbers 2, 3, and 4 in the send data storage area are not released. After receiving the completion message corresponding to the send entry with sequence number 2, then release the spaces of the send entries with sequence numbers 2, 3, and 4 in the send data storage area.
[0050] In a possible implementation, the descriptor management unit also needs to manage the descriptor queue. Continuing with the above example, if the send entries with sequence numbers 1234 have been sent and the completion messages corresponding to the send entries with sequence numbers 1, 3, and 4 have been received, then the descriptor management unit will only move the tail pointer of the descriptor queue to the position of 4 after receiving the completion message with sequence number 2.
[0051] In a possible implementation, the protocol converter further includes a static configuration unit and a dynamic configuration unit. The RDMA network card needs to configure relevant registers such as the send queue, receive queue, and completion queue before sending and receiving messages. The static configuration unit is used to configure the parameters of the RDMA network card to start the work of the RDMA network card when the RDMA network card has not been started yet. The dynamic configuration unit is used to configure the registers of the RDMA network card after the RDMA network card is started. Specifically, the static configuration unit can configure the parameters required for the RDMA network card to start to complete the initialization of the RDMA network card, and the dynamic configuration unit can further complete the configuration of the relevant registers of the RDMA network card when the RDMA network card is working.
[0052] In a possible implementation, after obtaining the completion message from the completion queue, the dynamic configuration unit dynamically configures the RDMA network card according to at least one completion message to perform the next data sending operation.
[0053] In a possible implementation, the receive management unit in the protocol controller includes a second data processing unit and a receive data storage area. The receive data storage area is used to store the data sent by the RDMA network card received through the PCIe interface and the crossbar. The second processing unit is used to process the data in the receive data storage area and then send it to the data node, such as decompressing and decrypting the data in the receive data storage area. Other processing can also be performed on the data in the receive data storage area, and the processing method is set according to the service requirements.
[0054] In a possible implementation, the protocol controller may not include a receiving management unit, and the data received from the RDMA network card is directly sent to the data storage area of the data node through the PCIe interface and the crossbar switch.
[0055] It should be noted that the protocol controller writes the received data into the corresponding data storage area according to the PCIe interface and the crossbar switch. The RDMA message packet carries the destination address, and each message packet is at most 2K bytes. The PCIe Root can be configured into a suitable packet according to the Maximum Payload Size (MPS) and sent to the PCIe interface. The protocol controller can also count the destination address area, and after receiving a preset amount of data, it can determine that the data is complete and send it to the application connected to the protocol converter.
[0056] Figure 4 Another internal module schematic diagram of the protocol converter system provided by the embodiments of the present application. The protocol converter provides two types of interfaces, m_axi and s_axi. The m_axi interface represents the interface for actively sending information, and the s_axi interface represents the interface for passively receiving information. The crossbar switch and the PCIe interface also include two types of interfaces, m_axi and s_axi, Figure 4 which is not shown again. REQ_FIFO is a data caching structure, characterized by first-in-first-out. It is usually used for the first-in-first-out queue for storing request data. The completion unit is connected to two REQ_FIFOs, one for caching the completion queue address and the other for caching the completion message.
[0057] The embodiments of the present application also provide a protocol conversion method for a network card. This method is applicable to a protocol converter, and the protocol converter includes a crossbar switch and a PCIe interface. Figure 5 A schematic flow diagram of a protocol conversion method for a network card provided by the embodiments of the present application.
[0058] Step 501, the protocol converter receives the data sent by the data node and sends it to the PCIe interface through the crossbar switch in a message mechanism.
[0059] Step 502, the protocol converter receives the data transmitted by the PCIe interface through the crossbar switch.
[0060] Specifically, step 501 is the process of the local data node sending data to the remote data node, and step 502 is the process of the local data node receiving data sent by the remote data node.
[0061] The protocol converter also includes a transceiver interface, a data storage area, a doorbell generator, and a reading unit. Step 501 also includes: Step 601: Obtain the first data sent by the data node through the transceiver interface, and store the first data in the data storage area in sequence. Specifically, before storing the first data in the data storage area in sequence, invalid bytes in the first data can also be removed.
[0062] Step 602: Trigger the doorbell generator; send a notification message to the RDMA network card through the crossbar switch and the PCIe interface. Specifically, after the first data is stored in the data storage area, the doorbell generator is triggered to notify the RDMA network card of a new send entry.
[0063] Step 603: Read the first data from the data storage area to the RDMA network card according to a read request. The read request is generated by the RDMA network card according to the notification message and sent to the read unit through the PCIe interface and the crossbar switch. Specifically, after the RDMA network card receives the notification message sent by the doorbell generator, it generates a read request, sends the read request to the read unit through the PCIe interface and the crossbar switch, and the read unit reads the first data from the data storage area to the RDMA network card according to the read request.
[0064] In a possible implementation, the data storage area includes a send data storage area and a descriptor queue. Obtaining the first data sent by the data node through the transceiver interface and storing the first data in the data storage area in sequence includes: storing the first data in the send data storage area in sequence, generating a descriptor corresponding to the first data and storing it in the descriptor queue. The descriptor is used to describe the destination address of the first data transmission, the storage location of the first data in the send data storage area, etc.
[0065] Optionally, the protocol converter can not only receive the data sent by the data node and write the data into the specified space of the remote data node, but also receive the read request of the data node. Specifically, the local data node initiates a read request, sends the target node number and the memory address in the target node to the protocol converter through m_axi. The protocol converter converts the target node number and the memory address in the target node into a descriptor according to the format of the descriptor, and sends a notification message to the local RDMA network card through the doorbell generator, and then the local RDMA network card issues a read request. After the remote RDMA network card receives the read request sent by the local RDMA network card, it reads the data from the memory address in the target node and returns it to the local RDMA network card. After the local RDMA network card receives the target data, it sends it to the local protocol converter, and then the local protocol converter returns the target data to the local data node through the AXI bus.
[0066] Similarly, the protocol converter can also receive the read request sent by the RDMA, and the read request is sent by the remote data node through the remote RDMA network card.
[0067] An embodiment of the present application provides an electronic device, which includes a protocol converter. The protocol converter is connected to a data node and is also connected to an RDMA network card.
[0068] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium storing a computer program executable by a computer device. When the program runs on the computer device, it causes the computer device to execute the steps of the above-mentioned protocol conversion method for the network card.
[0069] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0070] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0071] These computer program instructions can also be stored in a computer-readable memory capable of guiding a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0072] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0073] Obviously, those skilled in the art can make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to cover these changes and modifications.
Claims
1. A protocol converter for a network card, characterized in that: The protocol converter includes a protocol controller, a cross switch and a high-speed serial computer expansion bus PCIe interface; The protocol controller is provided with a transceiver interface, and the transceiver interface is connected to a data node; the data node does not have a processor; The PCIe interface is connected to a remote direct memory access (RDMA) network card, and is used to transmit data between the data node and the RDMA network card; The protocol controller further comprises a sending management unit and a receiving management unit, wherein the sending management unit is used to receive data sent by the data node and send the data to the PCIe interface through the cross switch in a message mechanism; The receiving management unit is used to receive data transmitted by the PCIe interface through the cross switch.
2. The protocol converter according to claim 1, characterized in that: The sending management unit includes a first data processing unit, a data storage area, a doorbell generator and a reading unit; The first data processing unit is used to obtain the first data sent by the data node through the transceiver interface, and store the first data in the data storage area in sequence; The first data processing unit is also used to trigger the doorbell generator; The doorbell generator is used to send a notification message to the RDMA network card through the cross switch and the PCIe interface; The reading unit is used to read the first data from the data storage area to the RDMA network card according to a read request; the read request is generated by the RDMA network card according to the notification message and sent to the reading unit through the PCIe interface and the cross switch.
3. The protocol converter according to claim 2, characterized in that: The first data processing unit includes a data unit, a descriptor unit and a descriptor management unit, and the data storage area includes a send data storage area and a descriptor queue; The data unit is used to store the first data in the sending data storage area in sequence; The descriptor unit is used to generate a descriptor corresponding to the first data and store it in the descriptor queue; The descriptor is used to describe the destination address of the first data transmission and the storage location of the first data in the sending data storage area; The descriptor management unit is used to trigger the doorbell generator to send a notification message, where the notification message includes identification information of at least one descriptor.
4. The protocol converter according to claim 3, characterized in that: The reading unit includes a first reading unit, a second reading unit and a reading controller; The read controller is used to control the first reading unit to read the descriptor indicated by the descriptor read request according to the descriptor read request; and controlling the second reading unit to read the sending entry according to the data reading request; The descriptor read request is generated by the RDMA network card according to the notification message; The data read request is generated by the RDMA network card according to the read descriptor.
5. The protocol converter according to claim 3, characterized in that: The descriptor unit includes a byte alignment unit and an address reading unit; The byte alignment unit is used to remove invalid bytes in the first data; The descriptor unit is used to generate a descriptor corresponding to the first data after removing invalid bytes, and store it in the descriptor queue.
6. The protocol converter according to claim 2, characterized in that: The sending management unit further includes a completion unit, and the data storage area further includes a completion queue; The completion unit is used to store the completion message sent by the RDMA network card into the completion queue; the completion message is used to indicate that the RDMA network card has read the first data.
7. The protocol converter according to claim 6, characterized in that: The sending management unit also includes an order-preserving unit; The order-keeping unit is used to store the received completion messages according to the order of the sending entries in the sending data storage area and to manage the space release of the sending data storage area.
8. The protocol converter according to any one of claims 1 to 7, characterized in that: The protocol converter also includes a static configuration unit and a dynamic configuration unit; The static configuration unit is used to configure the parameters of the RDMA network card to start the RDMA network card when the RDMA network card has not been started; The dynamic configuration unit is used to configure the register of the RDMA network card after the RDMA network card is started.
9. The protocol converter according to claim 8, characterized in that: The dynamic configuration unit is used to obtain a completion message from the completion queue, and dynamically configure the RDMA network card according to at least one completion message.
10. The protocol converter according to any one of claims 1 to 7, characterized in that: The receiving management unit includes a second data processing unit and a receiving data storage area; The received data storage area is used to store data sent by the RDMA network card and received through the PCIe interface and the cross switch; The second processing unit is used to process the data in the received data storage area and then send the processed data to the data node.
11. A protocol conversion method for a network card, characterized in that: The method is applicable to a protocol converter, the protocol converter comprising a cross switch and a PCIe interface, and the method comprises: Receive data sent by the data node, and send the data to the PCIe interface through the crossbar switch using a message mechanism; The data transmitted by the PCIe interface is received through the cross switch; the cross switch and the PCIe interface are part of the protocol converter.
12. The method according to claim 11, characterized in that The protocol converter also includes a transceiver interface, a data storage area, a doorbell generator, and a reading unit; the data sent by the data node is received and sent to the PCIe interface through a cross switch using a message mechanism, including: Acquire the first data sent by the data node through the transceiver interface, and store the first data in the data storage area in order; Triggering the doorbell generator; sending a notification message to the RDMA network card through the cross switch and the PCIe interface; The first data is read from the data storage area to the RDMA network card according to a read request, wherein the read request is generated by the RDMA network card according to the notification message and sent to the reading unit through the PCIe interface and the cross switch.
13. The method according to claim 12, characterized in that The data storage area includes a sending data storage area and a descriptor queue, and obtaining the first data sent by the data node through the transceiver interface, and storing the first data in the data storage area in sequence, including: storing the first data in the sending data storage area in order; A descriptor corresponding to the first data is generated and stored in the descriptor queue; the descriptor is used to describe the destination address of the first data transmission and the storage position of the first data in the sending data storage area.
14. An electronic device, characterized in that: Comprising a protocol converter as claimed in any one of claims 1 to 10.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when a computer reads and executes the instructions, the computer executes the method according to any one of claims 11 to 13.
Citation Information
Cited By
Axiprotocol translation bridge, method and apparatus supporting transport parameter set resolution
CN122507666A
Axiprotocol translation bridge, method and apparatus supporting transport parameter set resolution
CN122507666B