Low-delay sending system for RDMA (Remote Direct Memory Access) network card
By using a combination of driver software module and FPGA hardware module in the RDMA network card, the SWQE delivery strategy is dynamically selected, the data packet sending process is optimized, the problem of high sending delay of the RDMA network card is solved, and lower delay and more efficiency are achieved. network transmission.
Patent Information
- Application Number
- CN202410838401.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-06-26
AI Technical Summary
Existing RDMA network cards have high delays when sending data and need to be further optimized to improve network transmission performance.
Using a combination of driver software modules and FPGA hardware modules, the SWQE delivery strategy is dynamically selected through the task analysis unit, task decision-making unit, DMA sending unit and MMIO sending unit, optimizing the data packet sending process and reducing the number of times the hardware reads the host memory. Improve data packet sending efficiency.
It significantly reduces the time from the software issuing SWQE to the hardware actually sending the data packet, enhances the high-speed transmission performance of the network card, and reduces network transmission delay.
Smart Images

Figure CN118869477A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of network technology, and in particular relates to a low-latency sending system for an RDMA network card. Background Art
[0002] With the rapid development of communication and electronic technology, data is growing explosively, and large-scale real-time data acquisition systems have increasingly higher requirements for high-speed network transmission. RDMA (Remote Direct Memory Access) networks have become the mainstream of data center networks in recent years due to their excellent characteristics of low latency, low CPU overhead, and high bandwidth. Their types mainly include Infiniband networks and RoCE networks. RDMA technology eliminates the overhead of copying and context switching of data packets in user space and kernel space, thereby freeing up memory bandwidth and CPU cycles to improve application system performance.
[0003] RDMA provides a set of software transmission interfaces. Applications can use the interfaces to call the driver to issue a work queue element (WQE). The WQE describes the address, length, and key of the data to be sent / received. Taking the send operation (Send) request as an example, the sender driver writes the address, length, and key of the data to be sent into the SWQE (Send WQE), and the sender network card parses the SWQE and completes the message transmission.
[0004] The process of sending SWQE by most drivers is as follows: the driver fills SWQE into memory and notifies the hardware through registers. After receiving the register instruction, the hardware reads SWQE from memory and parses it. Then the hardware network card reads the data to be sent from memory according to SWQE and completes the packet sending. In order to further reduce the sending delay of RDMA network cards, the above process needs to be further studied and optimized. Summary of the invention
[0005] The present invention provides a low-latency transmission system for an RDMA network card to solve the above-mentioned technical problems, and specifically adopts the following technical solutions:
[0006] A low-latency transmission system for an RDMA network card, comprising: a driver software module and an FPGA hardware module;
[0007] The driver software module is set in the host RDMA network card driver, and is used to receive the Send WR sent by the upper layer interface, parse it into the SWQE required by the hardware, and is also responsible for dynamically selecting a strategy to send the parsed SWQE to the FPGA hardware module;
[0008] The FPGA hardware module is arranged in the RDMA network card, and is used to obtain information of sending data packets through the SWQE sent by the driver software module, and then read the sent data from the memory or SWQE to complete the actual sending of the RDMA network card.
[0009] Furthermore, the driver software module includes:
[0010] The task parsing unit is used to receive the Send WR sent by the upper layer interface, read the address, length and key of the sent data, and fill them into the SWQE. At the same time, if the length of the sent data is less than or equal to 16 bytes, the sent data is directly filled into the SWQE, thereby obtaining the SWQE required by the hardware;
[0011] A task decision unit, if the length of the sent data is greater than 16 bytes, the task decision unit is used to dynamically select a SWQE delivery strategy, and then deliver the SWQE to a subsequent unit;
[0012] A DMA sending unit, when the task decision unit selects the DMA sending mode, the task decision unit sends the SWQE to the DMA sending unit, and the DMA sending unit sends the SWQE to the hardware through DMA, first fills the SWQE into the DMA ring buffer allocated by the driver software module, and then notifies the hardware to read the SWQE from the DMA ring buffer by writing the Doorbell register;
[0013] The MMIO sending unit, when the task decision unit selects the MMIO sending mode, sends the SWQE to the MMIO sending unit, which is used to write the 64-byte SWQE into the MMIO_512 register once and pass it to the hardware through the MMIO mode by using the avx512 instruction.
[0014] Furthermore, the FPGA hardware module includes:
[0015] The hardware sending unit is used to obtain the information of sending data packet according to the content of the SWQE after receiving the SWQE sent by the driver software module, and then read the sent data from the memory or SWQE to complete the corresponding packet sending task.
[0016] Furthermore, the task decision unit selects the following rules for the SWQE delivery strategy:
[0017] Initially, the MMIO send mode is preferred. The queue depth of the MMIO send mode is limited. After the MMIO queue is full, it switches to the DMA send mode.
[0018] When the DMA transmission mode is in DMA transmission mode, and both the MMIO transmission queue and the DMA transmission queue are empty and all transmission tasks are completed, switch back to MMIO mode.
[0019] Furthermore, the DMA sending unit manages a DMA ring buffer, which is a continuous memory space whose length is an integer multiple of the length of a single SWQE. Each access will offset the length of a SWQE based on the previous access. If the access reaches the end, the next access will start from the beginning, and the DMA sending unit will write the SWQE, and the hardware sending unit will read the SWQE.
[0020] Furthermore, the hardware sending unit includes a Doorbell register, an MMIO_512 register, a DMA sending queue and an MMIO sending queue.
[0021] Further, the DoorBell register is an FPGA hardware register, which can be directly accessed by the DMA sending unit after address mapping, and is used for the DMA sending unit to notify the FPGA hardware module to read the SWQE after writing the DMA buffer;
[0022] The MMIO_512 register is an FPGA hardware register, which has a length of 512 bits and is directly accessed by the MMIO sending unit after address mapping, and is used for the MMIO sending unit to write SWQE.
[0023] Further, the DMA sending queue is a queue managed by the FPGA hardware. When the DMA sending unit writes the Doorbell register, the DMA sending queue is queued, and when the data packet through the DMA sending mode is completed, the DMA sending queue is dequeued;
[0024] The MMIO sending queue is a queue managed by FPGA hardware. When the MMIO sending unit writes the MMIO_512 register, the MMIO sending queue is queued. When the data packet in the MMIO sending mode is completed, the MMIO sending queue is dequeued.
[0025] Furthermore, the low-latency sending system for an RDMA network card is applicable to an RDMA network card device based on an Infiniband network or a RoCE network.
[0026] The benefit of the present invention lies in that the low-latency sending system for RDMA network cards provided can reduce the number of times the FPGA hardware reads the host memory when using the RDMA network, thereby reducing the time from the software sending the SWQE to the hardware actually sending the data packet, which helps to give full play to the high-speed transmission performance of the network card and greatly reduce the network transmission delay. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0028] Figure 1 It is an overall schematic diagram of a low-latency transmission system for an RDMA network card of the present invention;
[0029] Figure 2 It is a schematic diagram of the internal structure of the low-latency sending system for RDMA network card of the present invention;
[0030] Figure 3 It is a flow chart of the SWQE issuing strategy of the task decision unit of the present invention;
[0031] Figure 4 The overall flow diagram of the driver software module of the present invention issuing SWQE;
[0032] Figure 5 The figure is a schematic diagram of the overall process of the FPGA hardware module of the present invention completing the packet sending through SWQE. DETAILED DESCRIPTION
[0033] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0034] like Figure 1 The figure shows a low-latency transmission system 100 for an RDMA network card of the present application, which includes a driver software module 10 and an FPGA hardware module 20.
[0035] The driver software module 10 is set in the host RDMA network card driver, and is used to receive the Send WR (Work Request) sent by the upper layer interface, and parse it into the SWQE (Send Work Queue Element, abbreviated as SWQE) required by the hardware. It is also responsible for dynamically selecting the SWQE sending strategy to send the parsed SWQE to the FPGA hardware module 20.
[0036] The FPGA hardware module 20 is set in the RDMA network card, and is used to obtain the information of the sent data packet through the SWQE issued by the driver software module 10, and then read the sent data from the memory or SWQE to complete the actual sending of the RDMA network card.
[0037] like Figure 2 Shown is a schematic diagram of the internal structure of the low-latency sending system for RDMA network card of the present application.
[0038] In the implementation manner of the present application, the driver software module 10 includes a task parsing unit 11 , a task decision unit 12 , a DMA sending unit 13 and an MMIO sending unit 14 .
[0039] The task parsing unit 11 is used to receive the Send WR sent by the upper layer interface, read the address, length, key and other information of the sent data, and fill it into the SWQE. At the same time, if the length of the sent data is less than or equal to 16 bytes, the sent data is directly filled into the SWQE, thereby obtaining the SWQE required by the hardware.
[0040] The task decision unit 12 is used to dynamically select the SWQE sending strategy. If the length of the sent data is greater than 16 bytes, the task decision unit is used to dynamically select the SWQE sending strategy and then send the SWQE to the subsequent unit, that is, the DMA sending unit 13 or the MMIO sending unit 14.
[0041] When the task decision unit 12 selects the DMA sending mode, the task decision unit 12 sends the SWQE to the DMA sending unit 13, and the DMA sending unit 13 sends the SWQE to the hardware via DMA, that is, first fills the SWQE into the DMA ring buffer allocated by the driver software module 10, and then notifies the hardware to read the SWQE from the DMA ring buffer by writing the Doorbell register.
[0042] When the task decision unit 12 selects the MMIO sending mode, the task decision unit 12 sends the SWQE to the MMIO sending unit 14. The MMIO sending unit 14 writes the 64-byte SWQE into the MMIO_512 register at one time and passes it to the hardware through the MMIO method by using the avx512 instruction.
[0043] In an implementation of the present application, the FPGA hardware module 20 includes a hardware sending unit 21 .
[0044] After receiving the SWQE sent by the driver software module 10, the hardware sending unit 21 obtains the information of the sent data packet according to its content, and then reads the sent data from the memory or SWQE to complete the corresponding packet sending task.
[0045] In the implementation of the present application, the DMA sending unit 13 manages a DMA ring buffer. The DMA ring buffer is a continuous memory space, and its length is an integer multiple of the length of a single SWQE. Each access will offset the length of a SWQE based on the previous access. If the access reaches the end, the next access will start from the beginning, and the DMA sending unit 13 will write the SWQE, and the hardware sending unit 21 will read the SWQE.
[0046] Furthermore, the hardware sending unit 21 includes a Doorbell register, an MMIO_512 register, a DMA sending queue and an MMIO sending queue.
[0047] The DoorBell register is essentially an FPGA hardware register, which can be directly accessed by the DMA sending unit 13 after address mapping, and is used for the DMA sending unit 13 to notify the FPGA hardware module 20 to read the SWQE after writing the DMA buffer.
[0048] The MMIO_512 register is an FPGA hardware register, which has a length of 512 bits and can be directly accessed by the MMIO sending unit 14 after address mapping, and is used for the MMIO sending unit 14 to write SWQE.
[0049] The DMA sending queue is a queue managed by the FPGA hardware. When the DMA sending unit 13 writes the Doorbell register, the DMA sending queue is queued. When the data packet passing through the DMA sending mode is completed, the DMA sending queue is dequeued.
[0050] The MMIO sending queue is a queue managed by FPGA hardware. When the MMIO sending unit 14 writes the MMIO_512 register, the MMIO sending queue is queued. When the data packet in the MMIO sending mode is completed, the MMIO sending queue is dequeued.
[0051] like Figure 3 As shown, in the implementation of the present application, the task decision unit 12 dynamically selects the rules for the SWQE delivery strategy as follows:
[0052] Initially, the MMIO send mode is preferred. Since the queue depth of the MMIO send mode is limited, it will switch to the DMA send mode after the MMIO queue is full.
[0053] When the DMA sending mode is in this case and both the MMIO sending queue and the DMA sending queue are empty, that is, when all sending tasks are completed, the MMIO mode is switched back to the MMIO mode.
[0054] In the implementation manner of the present application, the elements in the MMIO send queue and the DMA send queue are both sent into the queue by the driver software through SWQE, and the packets are sent out of the queue through the FPGA hardware.
[0055] like Figure 4 The figure shows the overall process diagram of the driver software module 10 sending SWQE according to the present invention, and the process is as follows:
[0056] S11: The IB_Verbs interface calls Post_send to send Send WR to the driver software module 10.
[0057] S12: After the driver software module 10 receives Send WR, the task parsing unit 11 parses it and fills the length, address, key and other information of the sent data into SWQE.
[0058] S13: The task analysis unit 11 determines the length of the transmitted data. If it is greater than 16 bytes, step S15 is implemented; if it is less than or equal to 16 bytes, step S14 is implemented.
[0059] S14: The task analysis unit 11 fills the sending data into the SWQE.
[0060] S15: The task decision unit 12 dynamically selects a SWQE sending strategy. If the MMIO sending mode is adopted, the SWQE is sent to the MMIO sending unit 14 and step S18 is implemented. If the DMA sending mode is adopted, the SWQE is sent to the DMA sending unit 13 and step S16 is implemented.
[0061] S16: The DMA sending unit 13 fills the SWQE into the DMA buffer.
[0062] S17: The DMA sending unit 13 notifies the hardware to read the SWQE from the DMA buffer by writing the Doorbell register.
[0063] S18: The MMIO sending unit 14 uses the avx512 instruction to write the 64-byte SWQE into the MMIO_512 register at one time and pass it to the hardware.
[0064] S19: The hardware sending unit 21 of the FPGA hardware module 20 receives the SWQE sent by the driver software module 10 and completes the packet sending task.
[0065] like Figure 5 The figure shows the overall process diagram of the FPGA hardware module 20 of the present invention completing the packet sending through SWQE, and the process is as follows:
[0066] S21: The FPGA hardware module 20 receives the SWQE sent by the driver software module 10.
[0067] S22: Determine the MMIO send queue. If the queue is empty, implement step S23. If the queue is not empty, implement step S24.
[0068] S23: The hardware sending unit 21 reads the SWQE from the corresponding position of the DMA buffer.
[0069] S24: The hardware sending unit 21 directly obtains the register from the MMIO sending queue.
[0070] S25: The hardware sending unit 21 determines the length of the sent data. If it is greater than 16 bytes, step S26 is implemented; if it is less than or equal to 16 bytes, step S27 is implemented.
[0071] S26: The hardware sending unit 21 reads the sending data from the memory according to the address, length, key and other information of the sending data in the SWQE.
[0072] S27: The hardware sending unit 21 directly obtains the sending data from the SWQE.
[0073] S28: The hardware sending unit 21 packages the sending data and sends it out.
[0074] The present invention belongs to the field of network technology, and in particular relates to a low-latency sending system for an RDMA network card.
[0075] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any form, and any technical solution obtained by equivalent replacement or equivalent transformation falls within the protection scope of the present invention.
Claims
1. A low-latency transmission system for an RDMA network card, characterized in that: Contains: driver software module and FPGA hardware module; The driver software module is set in the host RDMA network card driver, and is used to receive the SendWR sent by the upper layer interface, parse it into the SWQE required by the hardware, and is also responsible for dynamically selecting a strategy to send the parsed SWQE to the FPGA hardware module; The FPGA hardware module is arranged in the RDMA network card, and is used to obtain information of sending data packets through the SWQE sent by the driver software module, and then read the sent data from the memory or SWQE to complete the actual sending of the RDMA network card.
2. The low-latency transmission system for RDMA network card according to claim 1, characterized in that: The driver software module includes: The task parsing unit is used to receive the Send WR sent by the upper layer interface, read the address, length and key of the sent data, and fill them into the SWQE. At the same time, if the length of the sent data is less than or equal to 16 bytes, the sent data is directly filled into the SWQE, thereby obtaining the SWQE required by the hardware; A task decision unit, if the length of the sent data is greater than 16 bytes, the task decision unit is used to dynamically select a SWQE delivery strategy, and then deliver the SWQE to a subsequent unit; A DMA sending unit, when the task decision unit selects the DMA sending mode, the task decision unit sends the SWQE to the DMA sending unit, and the DMA sending unit sends the SWQE to the hardware through DMA, first fills the SWQE into the DMA ring buffer allocated by the driver software module, and then notifies the hardware to read the SWQE from the DMA ring buffer by writing the Doorbell register; The MMIO sending unit, when the task decision unit selects the MMIO sending mode, sends the SWQE to the MMIO sending unit, which is used to write the 64-byte SWQE into the MMIO_512 register once and pass it to the hardware through the MMIO mode by using the avx512 instruction.
3. The low-latency transmission system for RDMA network card according to claim 2, characterized in that: The FPGA hardware module includes: The hardware sending unit is used to obtain the information of sending data packet according to the content of the SWQE after receiving the SWQE sent by the driver software module, and then read the sent data from the memory or SWQE to complete the corresponding packet sending task.
4. The low-latency transmission system for RDMA network card according to claim 3, characterized in that: The rules for the task decision unit to select the SWQE delivery strategy are as follows: Initially, the MMIO send mode is preferred. The queue depth of the MMIO send mode is limited. After the MMIO queue is full, it switches to the DMA send mode. When the DMA transmission mode is in DMA transmission mode, and both the MMIO transmission queue and the DMA transmission queue are empty and all transmission tasks are completed, switch back to MMIO mode.
5. The low-latency transmission system for RDMA network card according to claim 4, characterized in that: The DMA sending unit manages a DMA ring buffer, which is a continuous memory space whose length is an integer multiple of the length of a single SWQE. Each access will offset the length of a SWQE based on the previous access. If the access reaches the end, the next access will start from the beginning. The DMA sending unit writes the SWQE, and the hardware sending unit reads the SWQE.
6. The low-latency transmission system for RDMA network card according to claim 5, characterized in that: The hardware sending unit includes a Doorbell register, an MMIO_512 register, a DMA sending queue and an MMIO sending queue.
7. The low-latency transmission system for RDMA network card according to claim 6, characterized in that: The DoorBell register is an FPGA hardware register, which can be directly accessed by the DMA sending unit after address mapping, and is used by the DMA sending unit to notify the FPGA hardware module to read SWQE after writing the DMA buffer; The MMIO_512 register is an FPGA hardware register, which has a length of 512 bits and is directly accessed by the MMIO sending unit after address mapping, and is used for the MMIO sending unit to write SWQE.
8. The low-latency transmission system for RDMA network card according to claim 6, characterized in that: The DMA sending queue is a queue managed by the FPGA hardware. When the DMA sending unit writes the Doorbell register, the DMA sending queue is queued. When the data packet through the DMA sending mode is completed, the DMA sending queue is dequeued. The MMIO sending queue is a queue managed by FPGA hardware. When the MMIO sending unit writes the MMIO_512 register, the MMIO sending queue is queued. When the data packet in the MMIO sending mode is completed, the MMIO sending queue is dequeued.
9. The low-latency transmission system for RDMA network card according to claim 1, characterized in that: The low-latency sending system for an RDMA network card is applicable to an RDMA network card device based on an Infiniband network or a RoCE network.
Citation Information
Patent Citations
Method, system and hardware used for transmitting data packet in network structure
CN101222428A
Data transmission method and related equipment
CN113076280A
TTE network communication method based on RDMA
CN116089331A
RDMA-based sending end, receiving end, data transmission system and method
CN116471242A
Control layer data kernel bypass system for RDMA network card
CN118158088A
