A method for establishing a connection using RDMA based on the QUIC protocol

By kernelizing the QUIC protocol in the RDMA network card driver and using the QUIC API for connection establishment, the problem of excessively long connection establishment time of RDMA network cards is solved, achieving an efficient connection establishment method and improving network communication performance.

CN119922000BActive Publication Date: 2025-10-31BEIJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510091669.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-10-31
Estimated Expiration
2045-01-21

AI Technical Summary

Technical Problem

In scenarios such as distributed training of large models across multiple machines and multiple GPUs, the excessively long connection establishment time of RDMA network cards leads to network congestion, and existing technologies struggle to achieve efficient connection establishment methods.

Method used

By modifying the RDMA network card driver source code and using the QUIC protocol for connection establishment, the QUIC protocol is kernelized and embedded in the RDMA network card driver. The QUIC API is then used to establish the connection, thus enabling the establishment of a 0-RTT encrypted channel.

Benefits of technology

It significantly reduces chain establishment time and improves network communication performance, especially in scenarios with frequent chain establishment, thereby enhancing overall network communication efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119922000B_ABST
    Figure CN119922000B_ABST
Patent Text Reader

Abstract

A method for establishing a connection in RDMA based on the QUIC protocol includes the following steps: (1) modifying the open-source msquic into kernel-mode code to implement the kernelization of the user-mode protocol QUIC; (2) embedding the kernelized QUIC protocol code into the source code of the RDMA network card driver; (3) establishing a connection by calling the QUIC API and using the connection establishment logic of the QUIC protocol, and achieving 0-RTT. The method of the present invention greatly reduces the connection establishment time and improves the overall network communication performance in scenarios such as large-scale multi-machine multi-card distributed training that require frequent connection establishment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an RDMA connection establishment method based on the QUIC protocol, belonging to the field of information technology, and particularly to the field of RDMA network interface card technology. Background Technology

[0002] Although RDMA network interface card (NIC) technology can provide an efficient and low-latency data transmission method, it still has some problems in practical applications. For example, in scenarios that require large-scale and frequent link establishment, such as distributed training of large models across multiple machines and multiple NICs, the excessively long link establishment time of RDMA NICs often causes network congestion.

[0003] Designing a more efficient chain establishment method and achieving more efficient chain establishment has become a pressing technical challenge in the field of RDMA network card technology. Summary of the Invention

[0004] In view of this, the purpose of this invention is to modify the RDMA network card communication connection establishment method by modifying the RDMA network card driver source code protocol stack, thereby achieving more efficient connection establishment.

[0005] To achieve the above objectives, this invention proposes an RDMA connection establishment method based on the QUIC protocol, the method comprising the following steps:

[0006] (1) By modifying the open-source msquic into kernel-mode code, the user-mode protocol QUIC is kernelized;

[0007] (2) Embed the kernelized QUIC protocol code into the source code of the RDMA network card driver;

[0008] (3) By calling the QUIC API, the chain can be established using the chain establishment logic of the QUIC protocol, and 0-RTT can be achieved; the 0-RTT refers to the formation of an encrypted channel after the first connection is established, and the first data packet can carry valid transmission data when the connection is established again.

[0009] The specific method for kernelizing the user-space protocol QUIC by modifying the open-source msquic (msquic is the Microsoft implementation of the IETF QUIC protocol) into kernel-mode code is as follows: modify the code of the library functions in the user library to the Linux kernel library or redesign the relevant library functions, including but not limited to memory allocation functions, memory release functions, data type conversion functions, etc.

[0010] The specific method for embedding the kernel-based QUIC protocol code into the RDMA network card driver source code is as follows: First, download the network card driver source code from the official website, and then embed the kernel-based QUIC code, specifically including:

[0011] (1) Adapt the RDMA network card driver code to the QUIC protocol;

[0012] (2) Modify the connection establishment part of the RDMA network card so that the connection establishment part is changed from the original TCP protocol connection establishment to the QUIC protocol connection establishment.

[0013] The specific method for establishing a connection using the QUIC protocol's connection-building logic by calling the QUIC API and achieving 0-RTT is as follows: The connection is established using the open-source GnuTLS (GNU Transport Layer Security library) and a QUIC API similar to SocketAPI, achieving 0-RTT. After modifying the connection-building method, compared with the original method, each connection establishment reduces the round-trip interaction time by 2.

[0014] The beneficial effects of this invention are that by embedding the user-space protocol QUIC kernel into the RDMA network card driver code, the RDMA network card can use the user-space QUIC protocol stack; by changing the RDMA network card connection establishment process from Socket connection establishment to QUIC connection establishment, the connection establishment time is greatly reduced, and the overall network communication performance is improved in scenarios such as large-scale multi-machine multi-card distributed training that require frequent connection establishment. Attached Figure Description

[0015] Figure 1 This is a flowchart illustrating an RDMA connection establishment method based on the QUIC protocol proposed in this invention. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings.

[0017] See Figure 1 This invention introduces an RDMA connection establishment method based on the QUIC protocol, which includes the following steps:

[0018] (1) By modifying the open-source msquic into kernel-mode code, the user-mode protocol QUIC is kernelized;

[0019] (2) Embed the kernelized QUIC protocol code into the source code of the RDMA network card driver;

[0020] (3) By calling the QUIC API, the chain can be established using the chain establishment logic of the QUIC protocol, and 0-RTT can be achieved; the 0-RTT refers to the formation of an encrypted channel after the first connection is established, and the first data packet can carry valid transmission data when the connection is established again.

[0021] The specific method for implementing the kernelization of the user-space protocol QUIC by modifying the open-source msquic into kernel-space code is as follows: modify the code of the library functions in the user library to the Linux kernel library or redesign the relevant library functions, including but not limited to memory allocation functions, memory release functions, data type conversion functions, etc.

[0022] For example: In this embodiment, the malloc function cannot be used in kernel mode; the kmalloc and vmalloc functions provided by the kernel must be used when allocating memory. The printf function provided by the standard library cannot be used in kernel mode to output information; instead, the printk function provided by the kernel must be used.

[0023] The specific method for embedding the kernel-based QUIC protocol code into the RDMA network card driver source code is as follows: First, download the network card driver source code from the official website, and then embed the kernel-based QUIC code, specifically including:

[0024] (1) Adapt the RDMA network card driver code to the QUIC protocol; In the embodiment, the adaptation method is mainly to integrate code with the same function. For example, the QUIC protocol uses GnuTLS and the driver itself also uses TLS. Integrate and adapt similar code with the same function.

[0025] (2) Modify the connection establishment part of the RDMA network card so that the connection establishment part is changed from the original TCP protocol connection establishment to the QUIC protocol connection establishment.

[0026] The specific method for establishing a connection using the QUIC protocol's connection-building logic by calling the QUIC API and achieving 0-RTT is as follows: The connection is established using the open-source GnuTLS (GNU Transport Layer Security library) and a QUIC API similar to SocketAPI, achieving 0-RTT. After modifying the connection-building method, compared with the previous method, each connection establishment reduces the round-trip interaction time by 2.

[0027] In this embodiment, during the initial connection establishment of the TCP protocol, the client sends a SYN request, the server replies with SYN-ACK, and the client then sends an ACK confirmation, completing one RTT and entering the ESTABLISHED state. Subsequently, the TLS handshake begins: the client sends a ClientHello message, the server replies with a ServerHello message and its certificate, the client verifies the certificate and sends a Pre-master Secret, the server and client negotiate and generate a session key, and both parties send Finished messages to ensure the encrypted channel is established. This process requires two additional RTTs, so the entire process takes three RTTs. In contrast, during the initial connection establishment of the QUIC protocol, the client sends an initial data packet containing encrypted handshake data to the server, including a ClientHello message. Upon receiving this, the server immediately returns a ServerHello message and encryption settings, while simultaneously transmitting the certificate. The client verifies the server certificate, completes the key exchange, and generates a session key. QUIC combines the encrypted handshake and data transmission within one RTT. After the encrypted channel is established, TCP requires two RTTs, while QUIC achieves 0-RTT transmission.

[0028] The inventors conducted numerous experiments on the system proposed in this invention, and the experimental results are as follows:

[0029] Perftest (an open-source tool for testing the performance of RDMA network cards) was used to test between two servers equipped with Mellanox Connectx-5100G network cards, simulating a frequent connection establishment environment. 1000 connection establishments were set, and the bandwidth and average connection establishment time were compared under different throughput environments by changing the total throughput. The experimental results are shown in Table 1.

[0030] Table 1

[0031]

[0032] In Table 1, QUIC represents the method of the present invention, and the experimental results prove that the method proposed in this invention is feasible and effective.

Claims

1. A method for establishing a connection using RDMA based on the QUIC protocol, characterized in that: The method includes the following steps: (1) By modifying the open-source msquic into kernel-mode code, the user-mode protocol QUIC is kernelized; (2) Embed the kernelized QUIC protocol code into the RDMA network card driver source code. The specific method is as follows: First, download the network card driver source code from the official website, and then embed the kernelized QUIC code. This includes: (21) Adapt the RDMA network card driver code to the QUIC protocol; (22) Modify the connection establishment part of the RDMA network card so that the connection establishment part is changed from the original TCP protocol connection establishment to the QUIC protocol connection establishment; (3) By calling the QUIC API, the chain establishment logic of the QUIC protocol is used to establish the chain and 0-RTT can be achieved. The specific method is to use the open source GnuTLS (GNU Transport Layer Security library) and write a QUIC API similar to SocketAPI to establish the chain and achieve 0-RTT. After modifying the chain establishment method, compared with the chain establishment method before the modification, each connection establishment will reduce the round-trip interaction time by 2. The 0-RTT mentioned above refers to the formation of an encrypted channel after the initial connection is established. When a connection is established again, the first data packet can carry valid transmission data.

2. The RDMA connection establishment method based on the QUIC protocol according to claim 1, characterized in that: The specific method for kernelizing the user-space protocol QUIC by modifying the open-source msquic into kernel-mode code is as follows: modify the code of the library functions in the user library to the Linux kernel library or redesign the relevant library functions, specifically including memory allocation functions, memory release functions, and data type conversion functions.

Citation Information

Patent Citations

  • Multi-mode file transmission method based on full-user-state QUIC protocol

    CN118540322A

  • Distribution of private session key to a network communication device for secured RDMA communications

    US20240048373A1