Method and device for connection establishment, equipment and medium

Through the user-state RDMA communication manager (UCM), the thread configuration information and traffic optimization technology are used to solve the problems of high resource consumption and low efficiency during the establishment of RDMA connections, and efficient and flexible connection management is achieved.

CN120336225APending Publication Date: 2025-07-18DOUYIN VISION CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510397819.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

There are problems of high resource consumption and low efficiency during the establishment of existing RDMA connections, especially in high concurrent multi-connection scenarios, and the troubleshooting time is long.

Method used

User-state RDMA communication manager (UCM) is used to determine the threads associated with the data through thread configuration information, and directly process the connection establishment request and response without locking and memory copying. The connection path is optimized using traffic guidance and receiver scaling technology.

Benefits of technology

Improves the efficiency and flexibility of RDMA connection establishment, reduces resource consumption, simplifies the troubleshooting process, and improves system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336225A_ABST
    Figure CN120336225A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method, a device, equipment and a medium for connection establishment. According to the method, a connection establishment request is first received at a first device from a second device. The connection establishment request comprises first data used for establishing the remote direct memory access connection. Then, based on the thread configuration information for the first device, a thread in the first device associated with the first data is determined. The thread configuration information indicates an association between the thread and the data. A thread associated with the first data is used to determine whether to establish a remote direct memory access connection. And if it is determined that the remote direct memory access connection is established, sending a connection establishment response from the first device to the second device. The connection establishment response includes second data for establishing the remote direct memory access connection. The second data is associated with the first data. By using the method, the connection establishment efficiency can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Example embodiments of the present disclosure generally relate to the field of computers, and particularly to methods, apparatuses, devices, and computer-readable storage media for connection establishment. Background Art

[0002] Remote Direct Memory Access (RDMA) technology can reconstruct the network data transmission mode through mechanisms such as hardware offloading and kernel bypass, providing communication capabilities with ultra-low latency, high throughput, and low CPU consumption for scenarios such as high-performance computing, AI training, and distributed storage.

[0003] As RDMA technology becomes increasingly mature and is widely deployed in data centers (DCs), it has become the preferred technical solution for various high-performance (e.g., storage, recommendation search, large model training / inference, etc.) business scenarios in the industry. The more and more complex business scenarios supported by RDMA will also bring more challenges and iterative evolutions to its various technical links. In RDMA technology, the initial information exchange can be completed through "connection establishment (also known as connection building)". Summary of the Invention

[0004] In a first aspect of the present disclosure, a method for establishing a connection is provided. In this method, at a first device, a connection establishment request is received from a second device, where the connection establishment request includes first data for establishing a remote direct memory access connection; based on thread configuration information for the first device, a thread in the first device associated with the first data is determined, where the thread configuration information indicates the association between the thread and the data, and the thread associated with the first data is used to determine whether to establish a remote direct memory access connection; and if it is determined to establish a remote direct memory access connection, a connection establishment response is sent from the first device to the second device, where the connection establishment response includes second data for establishing a remote direct memory access connection, and the second data is associated with the first data.

[0005] In a second aspect of the present disclosure, a method for establishing a connection is provided. In this method, at a second device, first data for establishing a remote direct memory access connection is determined; based on thread configuration information for the second device, a thread in the second device associated with the first data is determined, where the thread configuration information indicates the association between the thread and the data; and a connection establishment request is sent from the second device to the first device through the thread associated with the first data, where the connection establishment request includes the first data.

[0006] In a third aspect of the present disclosure, there is provided an apparatus for establishing a connection. The apparatus includes: a request receiving module configured to receive a connection establishment request from a second device at a first device, where the connection establishment request includes first data for establishing a remote direct memory access connection; a thread determination module configured to determine, based on thread configuration information for the first device, a thread in the first device associated with the first data, where the thread configuration information indicates the association between a thread and data, and the thread associated with the first data is used to determine whether to establish a remote direct memory access connection; and a response sending module configured to, if it is determined to establish a remote direct memory access connection, send a connection establishment response from the first device to the second device, where the connection establishment response includes second data for establishing a remote direct memory access connection, and the second data is associated with the first data.

[0007] In a fourth aspect of the present disclosure, there is provided an apparatus for establishing a connection. The apparatus includes: a data determination module configured to determine first data for establishing a remote direct memory access connection at a second device; a thread determination module configured to determine, based on thread configuration information for the second device, a thread in the second device associated with the first data, where the thread configuration information indicates the association between a thread and data; and a request sending module configured to send a connection establishment request from the second device to the first device through the thread associated with the first data, where the connection establishment request includes the first data.

[0008] In a fifth aspect of the present disclosure, there is provided an electronic device. The device includes at least one processor; and at least one memory coupled to the at least one processor and storing instructions for execution by the at least one processor. The instructions, when executed by the at least one processor, cause the device to perform the method of the first aspect or the second aspect of the present disclosure.

[0009] In a sixth aspect of the present disclosure, there is provided a computer-readable storage medium. A computer program is stored on the computer-readable storage medium and can be executed by a processor to implement the method of the first aspect or the second aspect of the present disclosure.

[0010] It should be understood that the content described in this part is not intended to limit the key features or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. Description of the Drawings

[0011] In combination with the drawings and with reference to the following detailed description, the above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent. In the drawings, the same or similar reference numerals denote the same or similar elements, where:

[0012] Figure 1 A schematic diagram showing an example environment in which embodiments according to the present disclosure can be implemented;

[0013] Figure 2 A schematic diagram showing a kernel-mode RDMA communication manager;

[0014] Figure 3A A schematic diagram showing a user-mode RDMA communication manager according to some embodiments of the present disclosure;

[0015] Figure 3B A schematic diagram showing a signaling flow for connection establishment according to some embodiments of the present disclosure;

[0016] Figure 4 A schematic diagram showing a process of connection establishment according to some embodiments of the present disclosure;

[0017] Figure 5 A schematic diagram showing a process of connection disconnection according to some embodiments of the present disclosure;

[0018] Figure 6 A flowchart showing a method for connection establishment according to some embodiments of the present disclosure;

[0019] Figure 7 A flowchart showing a method for connection establishment according to some embodiments of the present disclosure;

[0020] Figure 8 A schematic structural block diagram showing an apparatus for connection establishment according to certain embodiments of the present disclosure;

[0021] Figure 9 A schematic structural block diagram showing an apparatus for connection establishment according to certain embodiments of the present disclosure; and

[0022] Figure 10 A block diagram showing a device capable of implementing multiple embodiments of the present disclosure. Detailed Description of the Embodiments

[0023] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0024] Note that the titles of any sections / subsections provided in this document are not restrictive. Various embodiments are described throughout this document, and any type of embodiment can be included under any section / subsection. Additionally, the embodiments described in any section / subsection can be combined with any other embodiments described in the same section / subsection and / or different sections / subsections in any manner.

[0025] In the description of the embodiments of the present disclosure, the term "comprising" and its like should be understood as an open inclusion, that is, "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "an embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". There may also be other explicit and implicit definitions hereinafter. The terms "first", "second", etc. may refer to different or the same objects. There may also be other explicit and implicit definitions hereinafter.

[0026] The embodiments of the present disclosure may involve the user's data, data acquisition, and / or use, etc. These aspects all comply with the corresponding laws, regulations, and related provisions. In the embodiments of the present disclosure, all data collection, acquisition, processing, processing, forwarding, use, etc. are carried out on the premise that the user is aware and confirms. Accordingly, when implementing the embodiments of the present disclosure, the type, scope of use, usage scenarios, etc. of the data or information that may be involved should be informed to the user and the user's authorization should be obtained through appropriate means in accordance with relevant laws and regulations. The specific notification and / or authorization methods may vary according to the actual situation and application scenarios, and the scope of the present disclosure is not limited in this regard.

[0027] The solutions in the embodiments of the present disclosure, if involving personal information processing, will be processed on the premise of having a legal basis (such as obtaining the consent of the personal information subject, or being necessary for performing a contract, etc.), and will only be processed within the specified or agreed scope. The user's refusal to process personal information other than the necessary information required for basic functions will not affect the user's use of basic functions.

[0028] For the convenience of description, the following takes Figure 1 the network environment 100 in Figure 1 as an example for discussion. Specifically,

[0029] The first device 110 may include one or more processes, and each process may include one or more threads, such as thread 111. Thread 111 may process data 112, for example, and thus thread 111 may be considered to be associated with data 112. Similarly, the second device 120 may also include one or more processes, and each process may include one or more threads, such as thread 121. Thread 121 may process data 122, for example, and thus thread 121 may be considered to be associated with data 122.

[0030] The first device 110 may communicate with the second device 120. For example, the first device 110 may send data 112 to the second device 120 through thread 111, and the second device 120 may receive data 112 through thread 121. The second device 120 may send data 122 to the first device 110 through thread 121, and the first device 110 may receive the data 122 sent by the second device 120 through thread 111.

[0031] In some embodiments, the first device 110 and the second device 120 may be in a server-client structure. For example, the first device 110 is a server and the second device 120 is a client. Or, the first device 110 is a client and the second device 120 is a server.

[0032] It should be understood that the example network environment 100 described in this disclosure is only for the purpose of description, and is not intended to impose any limitation on the embodiments of this disclosure. The environment in the embodiments of this disclosure may include any suitable number of devices and / or have any suitable topology structure, and the embodiments of this disclosure do not impose any limitation on this. Additionally, the first device 110 or the second device 120 may include any suitable number of processes and / or threads.

[0033] In the example network environment 100 as Figure 1 shown, the first device 110 may establish an RDMA connection based on the data 122 of the second device 120, and the second device 120 may establish an RDMA connection based on the data 112 in the first device 110.

[0034] The RDMA transmission process is mainly divided into a control path and a data path. The control path includes the process of establishing an RDMA connection. The data path includes the data transmission process after the RDMA connection is established.

[0035] In RDMA transmission, the initial information exchange (required for RC, UC, RD, and UD) can be completed through "establishing a connection (also known as connection establishment)". During the connection establishment process, two devices can master each other's information through negotiation and preparation work, enabling them to send and receive information from each other. The connection establishment process is different from connection-oriented. There are two ways to establish a connection. One is based on the socket application programming interface (API). For example, the user implements the transmission details and uses the Transmission Control Protocol (TCP) / Internet Protocol (IP) protocol to transmit connection establishment information.

[0036] The other way is to establish a connection based on the Communication Manager (CM) API. For example, use the interface provided by the librdmacm library and use the Remote Direct Memory Access over Converged Ethernet (RoCE) and InfiniBand (IB) protocols to transmit connection establishment information. The librdmacm library is a user-space library for connection management and communication abstraction in RDMA technology. It encapsulates the complexity of the underlying interface through high-level APIs and provides cross-protocol communication management capabilities. RoCE and IB are two high-performance network protocols based on RDMA, designed specifically for low-latency, high-throughput data transmission scenarios.

[0037] Compared with the socket API, the CM API has a complete and unified programming interface, eliminating the need for users to concern themselves with the transfer of connection information. In addition, for the connection establishment method based on the CM API, by using the same path as the data traffic to exchange connection information, path failures can be detected during the connection establishment phase. In the method based on the socket API, the connection establishment path is different from the data path, and it is possible for the connection to be established successfully, but the data cannot be transmitted successfully.

[0038] In addition, RDMACM requires hardware support for the unreliable datagram queue pair (UD QP) function. In some hardware, the UD QP function may not be supported.

[0039] For the sake of convenience in explanation, the following takes Figure 2 the kernel-mode CM as an example for discussion. Specifically, Figure 2A schematic diagram of the kernel-mode CM 200 is shown. The kernel-mode CM 200 may include an application 201 in the user mode and a librdmacm library 202, where the application 201 may be associated with the librdmacm library 202. Additionally, the kernel-mode CM 200 may further include a kernel 210 and a network interface card (NIC) 205. The kernel 210 may include a CM_ID management 203 and a circular buffer 204.

[0040] In the kernel-mode CM 200, the application 201 may pass API calls to the kernel 210 through a system call based on the librdmacm library 202, which may require multiple memory copies. For example, the kernel 210 may perform multiple memory copies through interfaces such as copy_to_user and copy_from_user to ensure that the parameters received from the user and the values returned to the user are correct, but the efficiency is low. In addition, when processing the resources of the kernel-mode CM 200, the kernel 210 may need to frequently lock to ensure that the reading and writing of resources do not conflict. If the scope of the lock is too large, performance problems may occur.

[0041] During the process of establishing or disconnecting an RDMA connection, the kernel-mode CM 200 may execute API calls. Since it is impossible to ensure that the associated resources are not accessed by other threads, the kernel-mode CM 200 may need to lock the associated context.

[0042] When receiving a packet for establishing or disconnecting an RDMA connection, the application distribution thread may process the packet. For example, the application distribution thread may generate a task for each data packet and put the task into a work queue. Any thread in the kernel-mode CM200 may process the task, so a lock is needed to prevent the task being processed from being accessed by other threads.

[0043] When establishing or disconnecting an RDMA connection based on the kernel-mode CM 200, the system call context overhead, multiple memory copies, multiple task distributions by the application distribution thread, and the locking process will cause an increase in resource consumption and a decrease in efficiency during the connection establishment process.

[0044] Therefore, the performance of the RDMA control path process needs to be improved. For example, the performance deficiency problem of the conventional RDMACM connection establishment method in high-concurrency multi-connections needs to be solved. Additionally, the CM may need to support the hardware RDMA protocol, and also need to quickly customize and adjust the packet format according to requirements while keeping the upper-layer connection interface unchanged. In addition, the kernel-mode CM 200 can only provide the error code of the AIP call and some connection states. If a failure occurs during the connection establishment process, the process of troubleshooting based on the kernel-mode CM 200 may take a lot of time.

[0045] To at least partially address the above problems and other potential problems, embodiments of the present disclosure propose a solution for connection establishment. In this solution, a connection establishment request is received at a first device from a second device. The connection establishment request includes first data for establishing an RDMA connection. The first device determines, based on thread configuration information for the first device, a thread in the first device that is associated with the first data. The thread configuration information indicates the association between the thread and the data. The thread associated with the first data is used to determine whether to establish a remote direct memory access connection. If it is determined to establish a remote direct memory access connection, the first device sends a connection establishment response to the second device. The connection establishment response includes second data for establishing the remote direct memory access connection. The second data is associated with the first data. In this way, an RDMA connection can be established between the first device and the second device flexibly and effectively.

[0046] The following will be combined with Figure 3A - Figure 10 Describe a solution for connection establishment according to some embodiments of the present disclosure. For ease of explanation, the following uses Figure 1 as an example of the network environment 100 for discussion. In the network environment 100, the first device 110 may include or be implemented as a switch, a router, a virtual machine, a computing node, a storage node, and / or a similar device, and any one of the first device 110 and the second device 120 may execute the method for connection establishment of the embodiments of the present disclosure.

[0047] Figure 3A Shows a schematic diagram of a userspace CM (UCM) 300A according to some embodiments of the present disclosure. As Figure 3A shown, the UCM 300A may include Thread 1, Thread 2, Thread 3, Thread 4, and NIC 306. The UCM 300A may communicate with an application distribution thread 301, and the application distribution thread 301 may support a multiplexing mechanism EPOLL. EPOLL is used to manage read and write events of a large number of file descriptors (such as network sockets), and is especially suitable for high-concurrency scenarios. The application distribution thread 301 may be used to monitor events through EPOLL. For example, after the UCM 300A receives a connection establishment request, the application distribution thread 301 may allocate work to the corresponding UCM thread according to the event type and related information, and perform function calls without using memory copying and context switching.

[0048] The NIC 306 in the UCM 300A is used to perform traffic steering or receive-side scaling (such as receive-side scaling hash) on the data processed by Thread 1, Thread 2, Thread 3, and Thread 4. In addition, the UCM 300A may be included or implemented in Figure 1 the first device 110 and / or the second device 120 in.

[0049] A thread in UCM 300A (e.g., thread 1) may include a UCM pipeline 302, UCM management 303, a data packet processor 304, and a circular buffer 305. UCM 300A may implement a user-space RDMA protocol stack based on the data plane development kit (DPDK). UCM 300A may be used to manage connection states, send or receive connection establishment messages or disconnection messages. In UCM 300A, a UCM thread (e.g., thread 1) may construct a connection establishment message according to an application request and a protocol type and place it in the circular buffer (e.g., circular buffer 305) in this UCM thread for queued transmission.

[0050] UCM 300A may, while ensuring data correctness, pass parameters and return values through shared memory and notify the simulation system call return through semaphores, thereby improving the communication efficiency of API calls. A user may directly link UCM 300A to an application in the form of a library.

[0051] UCM 300A may utilize drainage characteristics such as traffic steering or receive-side scaling of NIC 306 to ensure that the relevant information of each connection in a multi-threaded scenario is only accessed and processed by one thread. In this way, when creating and destroying global resources, UCM 300A may reduce the scope of lock influence, thereby improving the performance of accessing link resources.

[0052] For example, UCM 300A may create a specified number of threads according to user requirements. Each thread may use DPDK drainage rules to drain the corresponding data packets received by the network card to this thread. After the UCM thread receives a connection establishment message, UCM 300A may notify the application of the corresponding event through the pipeline.

[0053] UCM 300A may also adapt the connection establishment API based on the open-source Librdmacm library. The connection establishment API may be used to provide users with a standard connection management API and is used for software to perform process communication.

[0054] In some exemplary embodiments, a user may directly call the API using Unix Domain Socket / or shared memory according to the scenario to notify the thread of a connection establishment request.

[0055] In addition, based on UCM 300A, a data structure required for managing connection information may be created when a user actively establishes a connection or receives a connection establishment request.

[0056] It should be understood that the examples of the UCM 300A described in this disclosure are only for the purpose of description and are not intended to impose any limitation on the embodiments of this disclosure. The embodiments of this disclosure may include any suitable number or processes having any suitable structure, and this disclosure does not impose any limitation thereon.

[0057] Figure 3B FIG. 300B is a schematic diagram of a signaling flow for connection establishment according to some embodiments of the present disclosure. For ease of discussion and without loss of generality, reference will be made to Figure 1 describe the signaling flow 300B. The signaling flow 300B includes Figure 1 a first device 110 and a second device 120 in Figure 3A the UCM 300A. As described above, the first device 110 may include or be implemented as a switch, a router, a virtual machine, a computing node, a storage node, and / or similar devices. In addition, the first device 110 and / or the second device 120 may include

[0058] Hereinafter, an example in which the first device 110 and the second device 120 execute a method for connection establishment according to the present disclosure will be described. Specifically, the second device 120 will be described as the initiator of the connection establishment process, for example, a client, and the first device 110 will be described as the recipient of the connection establishment process, for example, a server.

[0059] First, the second device 120 determines (3010) first data for establishing an RDMA connection. The first data may include an identifier of the RDMA connection and an address of the second device 120, for example, an IP address. Next, based on the thread configuration information for the second device 120, the second device 120 determines (3020) a thread in the second device 120 that is associated with the first data. The thread configuration information indicates the association between the thread and the data. In some exemplary embodiments, the thread configuration information is received from a user or is pre-determined. For example, the user may indicate the number of threads in the UCM, and the UCM may set the threads based on the user's indication.

[0060] In some exemplary implementations, the thread configuration information for the second device 120 may be determined based on a traffic control steering rule for the second device 120. The traffic steering rule is used to allocate data to at least one thread in the second device 120. For example, the traffic steering rule may include traffic steering or receive-side scaling, for example, RSS hashing.

[0061] Then, the second device 120 sends (3030) a connection establishment request to the first device 110 via the thread associated with the first data. The connection establishment request includes the first data. Correspondingly, the first device 110 receives (3040) the connection establishment request from the second device 120.

[0062] Next, based on the thread configuration information for the first device 110, the first device 110 determines (3050) the thread in the first device 110 that is associated with the first data. The thread configuration information indicates the association between the thread and the data. The thread associated with the first data is used to determine whether to establish an RDMA connection. Specifically, the first device 110 can determine whether to establish an RDMA connection based on the first data via the thread associated with the first data. For example, the first device 110 can process the first data via the thread associated with the first data and determine whether the connection establishment request received from the second device 120 meets the requirements of the first device 110 based on the first data.

[0063] In some exemplary implementations, the thread configuration information for the first device 110 can be determined based on the traffic control steering rules for the first device 110. The traffic steering rules are used to allocate data to at least one thread in the first device 110. For example, the traffic steering rules can include traffic directing or receive-side scaling, such as, RSS hash.

[0064] In some exemplary embodiments, if it is determined not to establish the RDMA connection, the first device 110 can send a connection rejection response to the second device 120. The connection rejection response can include the reason for rejection, such as, insufficient resources or non-compliance with the requirements of the first device 110, etc.

[0065] If it is determined to establish an RDMA connection, the first device 110 sends (3060) a connection establishment response to the second device 120. The connection establishment response includes the second data for establishing the RDMA connection. The second data is associated with the first data. For example, the second data can include the identifier of the same RDMA connection as in the first data. In some exemplary embodiments, the second data can include the identifier of the RDMA connection, the address of the first device 110, and / or similar data.

[0066] Specifically, the first device 110 can determine the second data. Then, the first device 110 can determine the thread in the first device 110 that is associated with the second data based on the thread configuration information for the first device 110.

[0067] The first device 110 can send the connection establishment response to the second device 120 via the thread associated with the second data.

[0068] Correspondingly, the second device 120 may receive a connection establishment response including second data from the first device 110. Then, based on the thread configuration information, the second device 120 may determine the thread in the second device 120 that is associated with the second data. This thread may be used to determine whether to establish an RDMA connection. Specifically, the second device 120 may determine whether to establish an RDMA connection based on the second data through the thread associated with the second data. For example, the second device 120 may process the second data through the thread associated with the second data and determine whether the received connection establishment response from the first device 110 meets the requirements of the second device 120 based on the second data.

[0069] In some exemplary embodiments, if it is determined not to establish the RDMA connection, the second device 120 may send a connection rejection response to the first device 110. The connection rejection response may include a rejection reason, for example, insufficient resources or non-compliance with the requirements of the second device 120, etc.

[0070] If it is determined to establish an RDMA connection, the second device 120 may establish an RDMA connection between the first device 110 and the second device 120 based on the second data through the thread associated with the second data. In this case, the second device 120 may send a ready message to the first device 110. After receiving the ready message, the first device 110 may establish an RDMA connection between the first device 110 and the second device 120 based on the first data.

[0071] In addition, the first device 110 and the second device 120 may also disconnect the RDMA connection. This connection disconnection process may be initiated by the first device 110 or the second device 120. The following will describe the connection disconnection process with the first device 110 and the second device 120 as the initiators respectively.

[0072] First, the first device 110 may determine third data for disconnecting the RDMA connection. The third data may include an identifier of the RDMA connection, the address of the first device 110, and / or similar data. Next, based on the thread configuration information for the first device 110, the first device 110 may determine the thread in the first device 110 that is associated with the third data. Then, the first device 110 may send a connection disconnection request from the first device 110 to the second device 120 through the thread associated with the third data. The connection disconnection request may include the third data.

[0073] Correspondingly, the second device 120 may receive a connection disconnection request including the third data from the first device 110. Then, based on the thread configuration information for the second device 120, the second device 120 may determine a thread in the second device 120 associated with the third data, which thread may be used to disconnect the RDMA connection between the first device 110 and the second device 120.

[0074] Then, the second device 120 may send a connection disconnection response to the first device 110. The connection disconnection response includes fourth data for disconnecting the RDMA connection. The fourth data may be associated with the third data. For example, the fourth data may include an identifier of the same RDMA connection as in the third data. The fourth data may also include the address of the second device 120 and / or similar data.

[0075] Specifically, the second device 120 may determine the fourth data. Then, based on the thread configuration information for the second device 120, the second device 120 may determine a thread in the second device 120 associated with the fourth data. Next, the second device 120 may send the connection disconnection response to the first device 110 through the thread associated with the fourth data.

[0076] Correspondingly, the first device 110 may receive a connection disconnection response including the fourth data from the second device 120. Then, based on the thread configuration information for the first device 110, the first device 110 may determine a thread in the first device 110 associated with the fourth data. Based on the fourth data, the first device 110 may disconnect the RDMA connection between the first device 110 and the second device 120 through the thread associated with the fourth data. For example, the first device 110 may release the resources for the RDMA connection associated with the fourth data through this thread. In this case, the first device 110 may send a ready message to the second device 120. After receiving the ready message, the second device 120 may disconnect the RDMA connection between the first device 110 and the second device 120 based on the third data.

[0077] In some exemplary embodiments, the second device 120 may determine fifth data for disconnecting the RDMA connection. The fifth data may include an identifier of the RDMA connection, the address of the second device 120, and / or similar data. Next, based on the thread configuration information for the second device 120, the second device 120 may determine a thread in the second device 120 associated with the fifth data. Through the thread associated with the fifth data, the second device 120 may send a connection disconnection request to the first device 110. The connection disconnection request may include the fifth data.

[0078] Correspondingly, the first device 110 may receive a connection disconnection request including fifth data from the second device 120. Then, based on the thread configuration information for the first device 110, the first device 110 may determine a thread in the first device 110 that is associated with the fifth data, and this thread may be used to disconnect the RDMA connection between the first device 110 and the second device 120. Specifically, the first device 110 may disconnect the RDMA connection between the first device 110 and the second device 120 based on the fifth data through the thread associated with the fifth data.

[0079] Next, the first device 110 may send a connection disconnection response to the second device 120. The connection disconnection response includes sixth data for disconnecting the RDMA connection. The sixth data may be associated with the fifth data. For example, the sixth data may include an identifier of the same RDMA connection as in the fifth data. The sixth data may also include the address of the first device 110 and / or similar data.

[0080] Correspondingly, the second device 120 may receive a connection disconnection response including the sixth data from the first device 110. Then, based on the thread configuration information for the second device 120, the second device 120 may determine a thread in the second device 120 that is associated with the sixth data. Based on the sixth data, through the thread associated with the sixth data, the second device 120 may disconnect the RDMA connection between the first device 110 and the second device 120. For example, the second device 120 may release the resources associated with the sixth data and used for this RDMA connection through this thread. In this case, the second device 120 may send a ready message to the first device 110. After receiving this ready message, the first device 110 may disconnect the RDMA connection between the first device 110 and the second device 120 based on the fifth data.

[0081] It should be understood that the example connection establishment process described in this disclosure is only for the purpose of description and is not intended to impose any limitation on the embodiments of this disclosure. The environment in the embodiments of this disclosure may include any suitable number of devices and / or have any suitable data, and the embodiments of this disclosure do not impose any limitation on this.

[0082] In this way, the first device 110 and / or the second device 120 can process the data associated with the data for RDMA connection establishment or disconnection through the thread without locking the data. Therefore, the RDMA connection between the first device 110 and the second device 120 can be established or disconnected flexibly and effectively.

[0083] The following will be combined with Figure 4 Describe the process for connection establishment according to some embodiments of this disclosure. Figure 4FIG. 400 shows a schematic diagram of a process for connection establishment according to some embodiments of the present disclosure. Figure 4 The illustrated exemplary embodiments may be an implementation of the exemplary embodiments referred to Figure 3B in the discussion.

[0084] As Figure 4 shown, the server process 401 may include an application distribution thread 405, a server application 406, and a server UCM (UCM-S) 407. The application distribution thread 405 may be associated with UCM threads 402, 403, and 404. The client process 451 may include an application distribution thread 455, a client application 456, and a client UCM (UCM-C) 457. The application distribution thread 455 may be associated with UCM threads 452, 453, and 454. The UCM-S 457 and UCM-C 407 may be implemented as the UCM300A shown Figure 3A in the discussion.

[0085] At 4010, the server application 406 may initiate an RDMACM control operation to the UCM-S 407. For example, the server application 406 may use the librdmacm API (e.g., rdma_bind_addr or rdma_listen, etc.) to perform operations such as address binding and listening for connection establishment requests. At 4020, the UCM-S 407 may return an operation response to the server application 406. For example, the UCM-S 407 may return the application call result through shared memory. For example, the server application 406 may create a data structure required to manage connection information.

[0086] At 4030, the client application 456 may initiate an RDMACM control operation to the UCM-C 457. For example, the client application 456 may use the librdmacm API (e.g., rdma_bind_addr or rdma_resolve_route, etc.) to perform operations such as address binding and resolving the peer address route. At 4040, the UCM-C 457 may return an operation response to the client application 456, for example, by returning the application call result through shared memory. For example, the client application 456 may create a data structure required to manage connection information.

[0087] Next, at 4050, when the result in the operation response returned at 4040 is successfully parsed, the application distribution thread 465 can initiate a connection establishment request through a thread in UCM-C 457 (e.g., UCM thread 449). For example, at 4070, according to the thread configuration information, since the data packet 408 for sending the connection establishment request is associated with UCM thread 449, the client application 456 can use the rdma_connect API to call UCM thread 449 to send the connection establishment request without using a system call. UCM-C 457 can assemble a connection establishment request message ConnectRequest (e.g., using the format of standard RDMA or a protocol-customized format). At 4080, UCM-C 457 can send the connection establishment request message ConnectRequest to UCM-S 407.

[0088] In some exemplary embodiments, the thread configuration information can be received from a user or pre-determined. For example, the thread configuration information can be determined based on traffic control steering rules. The traffic steering rules are used to allocate data to each thread. For example, the traffic steering rules can include traffic directing or receive-side scaling, e.g., RSS hashing. In some exemplary implementations, the thread configuration information for the first device 110 and the second device 120 can be the same or different.

[0089] At 4060, through UCM thread 449, the data packet 408 can be sent to UCM-S 407 in the server process 431. UCM-S 407 can determine the UCM thread 432 associated with the data packet 408 based on the data packet 408 and the thread configuration information. In this case, UCM-S 407 can send the data packet 408 to thread 432 for processing. Similarly, for the data packet 409, UCM-S 407 can determine the UCM thread 433 associated with the data packet 409 based on the data packet 409 and the thread configuration information. In this case, UCM-S 407 can send the data packet 409 to thread 433 for processing. For the data packet 410, UCM-S 407 can determine the UCM thread 434 associated with the data packet 410 based on the data packet 410 and the thread configuration information. In this case, UCM-S 407 can send the data packet 410 to thread 434 for processing.

[0090] For example, UCM-S 407 can use the application distribution thread 415 to send a message to the thread associated with the message for processing based on traffic directing or receive-side scaling (e.g., RSS hashing). Since the message (or data packet) will be sent to the corresponding thread and will not be accessed by other threads, UCM-S 407 does not need to lock the message (or data packet).

[0091] Next, after UCM-S 407 receives the ConnectRequest message, it can verify the connection establishment request. At 4090, if the connection establishment request meets the requirements (for example, the resources indicated in the connection establishment request can be allocated to establish the RDMA connection), then UCM-S 407 can send the CONNECT_REQUEST event to the server application 406. If the connection establishment request does not meet the requirements (for example, the resources indicated in the connection establishment request cannot be allocated to establish the RDMA connection), then UCM-S 407 can send a ConnectReject message to UCM-C 457. The ConnectReject message can include error reporting information.

[0092] After receiving the CONNECT_REQUEST event, the server application 406 can process the event. At 4110, the server application 406 can use the rdma_accept API to accept the connection establishment request. The server application 406 can assemble the connection establishment reply message ConnectReply (for example, using the standard RDMA format or protocol customization format). At 4100, according to the thread configuration information, since the data packet used to send the connection establishment response (for example, data packet 459) is associated with the UCM thread 433, the server application 406 can use the application distribution thread 425 to send the message to the UCM thread 433 in UCM-S407.

[0093] At 4130, UCM-S 407 can send a connection response to UCM-C 457. For example, at 4120, UCM-S 407 can send a data packet (for example, data packet 459) including the connection establishment reply message ConnectReply to UCM-C 457 through the UCM thread 433. Then, UCM-C 457 can determine the UCM thread 473 associated with the data packet 459 based on the data packet 459 and the thread configuration information. In this case, UCM-S 457 can send the data packet 459 to the thread 473 for processing. Similarly, for the data packet 458, UCM-S 457 can determine the UCM thread 472 associated with the data packet 458 based on the data packet 458 and the thread configuration information. In this case, UCM-S 457 can send the data packet 458 to the thread 472 for processing. For the data packet 474, UCM-S 457 can determine the UCM thread 474 associated with the data packet 460 based on the data packet 460 and the thread configuration information. In this case, UCM-S 457 can send the data packet 460 to the thread 474 for processing.

[0094] For example, UCM-S 457 can use the application distribution thread 475 to send packets to the thread associated with the packet for processing based on traffic steering or receive-side scaling (e.g., RSS hashing). Since the packets (or data packets) will be sent to the corresponding thread and will not be accessed by other threads, UCM-S 457 does not need to lock the packets (or data packets).

[0095] Next, after receiving the ConnectReply packet, UCM-S 457 can verify the connection establishment response. At 4090, if the connection establishment response meets the requirements (e.g., the resources indicated in the connection establishment response can be allocated to establish the RDMA connection), then at 4140, UCM-C 457 can send the CONNECT_REPLY event to the client application 456. If the connection establishment response does not meet the requirements (e.g., the resources indicated in the connection establishment response cannot be allocated to establish the RDMA connection), then UCM-C 457 can send a ConnectReject packet to UCM-S 407. The ConnectReject packet can include error information.

[0096] Then, after receiving the CONNECT_REPLY event, the client application 456 can process the event. At 4150, the client application 456 can use the rdma_establish API to call UCM-C 457 to complete the connection establishment request. UCM-C 457 can assemble the connection establishment completion packet ReadyToUse (e.g., in a standard RDMA format or a protocol-customized format). At 4160, UCM-C 457 can send the connection establishment completion packet ReadyToUse to UCM-S 407.

[0097] After receiving the connection establishment completion packet ReadyToUse, at 4170, UCM-S 407 can report the ESTABLISHED event to the server application 406 to notify the server application 406 that the connection establishment process is completed. Then, the server application 406 can start sending data.

[0098] In this way, UCM-S 407 and UCM-C 457 can process the data associated with the RDMA connection establishment or disconnection through the thread associated with the data without locking the data. Additionally, UCM-S 407 and UCM-C 457 can complete the connection establishment process without using system calls, without memory copying, and only by distributing tasks once based on the application distribution thread. Therefore, an RDMA connection can be flexibly and efficiently established between the server application 406 and the client application 456 based on UCM-S 407 and UCM-C 457.

[0099] The following will be combined with Figure 5 Describe the process for connection disconnection according to some embodiments of the present disclosure. Figure 5 FIG. 500 shows a schematic diagram of the process for connection disconnection according to some embodiments of the present disclosure. Figure 5 The illustrated example embodiments may be an implementation manner of the example embodiments discussed with reference to Figure 3B The example embodiments discussed.

[0100] As Figure 5 shown, the client process 501 may include an application distribution thread 505, a client application 506, and a client UCM (UCM-C) 507. The application distribution thread 505 may be associated with UCM threads 502, 503, and 504. The server process 551 may include an application distribution thread 555, a server application 556, and a server UCM (UCM-S) 557. The application distribution thread 555 may be associated with UCM threads 552, 553, and 554. The UCM-S 557 and the UCM-C 507 may be implemented as the UCM 300A as Figure 3A shown. The client process 501 may be included in or implemented in the second device 120, and the server process 551 may be included in or implemented in the first device 110. The UCM-C 507 and the UCM-S 557 may be implemented according to the UCM 300A as Figure 3A shown.

[0101] The client application 506 may assemble a disconnection (also referred to as disconnection) request message DisconnectRequest (for example, using a standard RDMA format or a protocol-customized format). Then, at 5010, the client application 506 may call the UCM thread 513 through the application distribution thread 515. At 5030, the client application 506 may use the rdma_disconnect API or directly exit to trigger a disconnection request.

[0102] At 5040, the UCM-C 507 may send a connection disconnection request to the UCM-S 557. For example, at 5020, the UCM-C 507 may send a data packet (for example, data packet 569) including the disconnection request message DisconnectRequest to the UCM-S 557. In the server process 561, according to the thread configuration information, since the data packet 569 for sending the connection disconnection request is associated with the UCM thread 563, the UCM-S 557 may determine to use the UCM thread 563 to process the data packet 569 based on the data packet 569 and the thread configuration information.

[0103] Similarly, for data packet 568, UCM-S 557 can determine the UCM thread 562 associated with data packet 568 based on data packet 568 and thread configuration information. In this case, UCM-S 557 can send data packet 568 to thread 562 for processing. For data packet 570, UCM-S 557 can determine the UCM thread 564 associated with data packet 570 based on data packet 570 and thread configuration information. In this case, UCM-S 557 can send data packet 570 to thread 564 for processing.

[0104] For example, UCM-S 557 can use the application distribution thread 565 to send a message to the thread associated with the message for processing based on traffic steering or receive-side scaling (e.g., RSS hash). Since the message (or data packet) will be sent to the corresponding thread and will not be accessed by other threads, UCM-S 557 does not need to lock the message (or data packet).

[0105] At 5050, after UCM-S 557 receives the disconnection request message DisconnectRequest, UCM-S 557 can report the DISCONNECT_REQUEST event to the server application 556. After receiving the DISCONNECT_REQUEST event, the server application 556 can process the event. For example, the server application 556 can stop sending data and destroy the resources used for this RDMA connection.

[0106] At 5080, the server application 556 can receive the disconnection request using the rdma_disconnect API. UCM-S 557 can assemble the disconnection reply message DisconnectReply (e.g., using the format of standard RDMA or a protocol-customized format). At 5060, according to the thread configuration information, since the data packet (e.g., data packet 518) used to send the disconnection reply message is associated with the UCM thread 582, the server application 556 can use the application distribution thread 585 to send the message to the UCM thread 582 in UCM-S 557.

[0107] At 5080, UCM-S 557 can send a disconnection response to UCM-C 507. For example, at 5070, UCM-S 557 can send a data packet (e.g., data packet 518) including the disconnection reply message DisconnectReply to UCM-C 507.

[0108] Then, in the client process 521, the UCM-C 507 can determine a UCM thread 522 associated with the data packet 518 based on the data packet 518 and the thread configuration information. In this case, the UCM-C 507 can send the data packet 518 to the thread 522 for processing. Similarly, for the data packet 519, the UCM-C 507 can determine a UCM thread 523 associated with the data packet 519 based on the data packet 519 and the thread configuration information. In this case, the UCM-C 507 can send the data packet 519 to the thread 523 for processing. For the data packet 520, the UCM-C 507 can determine a UCM thread 524 associated with the data packet 520 based on the data packet 520 and the thread configuration information. In this case, the UCM-C 507 can send the data packet 520 to the thread 524 for processing.

[0109] After receiving the disconnection reply message DisconnectReply, the UCM-C 507 can destroy the resources used for the RDMA connection.

[0110] In this way, the UCM-S 557 and the UCM-C 507 can process the data through the threads associated with the data for the disconnection of the RDMA connection without locking the data. Additionally, the UCM-S 557 and the UCM-C 507 can complete the connection establishment process without using system calls, without memory copying, and only by distributing tasks based on the application distribution thread once. Therefore, the RDMA connection between the server application 556 and the client application 506 can be disconnected flexibly and efficiently based on the UCM-S 557 and the UCM-C 507.

[0111] In addition, the solution according to the embodiments of the present disclosure further includes a method for operation and maintenance troubleshooting. The UCM (e.g., the UCM 300A in Figure 3A ) according to the embodiments of the present disclosure can include a log. The log can include control plane call information and connection status change information. The log can be included in the log platform and can be viewed by logging in to the physical machine.

[0112] The embodiments according to the present disclosure can further include a command line tool counter for obtaining counter information from the UCM. The counter can record the status of all current connections and can count the sending and receiving of connection establishment or disconnection messages. The counter can be viewed through the monitoring dashboard or by logging in to the physical machine.

[0113] For example, in the method according to an embodiment of the present disclosure, a user can log in to the monitoring dashboard to view the increase or decrease in the number of connections and the message sending and receiving situation. If the data does not meet the expectations, the user can check the application call parameters. In addition, if the data meets the expectations, the user can log in to the log platform to check whether there are connection establishment alarms or abnormal situations. If there are alarms or abnormal situations, the user can perform repairs.

[0114] Additionally, the UCM according to an embodiment of the present disclosure can also be used to pre-set tracepoints. The tracepoints can include function call stacks and parameters. The tracepoints can be viewed through a log aggregation platform (e.g., extended berkeley packet filter, eBPF). The tracepoints can be logged in and viewed using the bpftrace tool as needed. Bpftrace is an advanced dynamic tracing tool based on eBPF technology, used for real-time monitoring and analysis of the behavior of the kernel and applications. The tracepoints can be used to capture function call information and latency and obtain abnormal or bottleneck points in connection establishment without stopping the application.

[0115] Embodiments of the present disclosure may also include the command-line network packet capture tool tcpdump. The command-line network packet capture tool tcpdump can be used to obtain the specific content of connection establishment packets. The command-line network packet capture tool tcpdump can be viewed based on a network packet analysis tool after packet capture.

[0116] It should be understood that the example visualization operation and maintenance mechanism described in the present disclosure is only for the purpose of description, and is not intended to impose any limitations on the embodiments of the present disclosure. The connection establishment method in the embodiments of the present disclosure may include any suitable operation and maintenance mechanism, and the embodiments of the present disclosure do not impose any limitations on this.

[0117] In this way, the connection establishment method based on the UCM of the embodiments of the present disclosure can provide a visualization operation and maintenance mechanism. Abnormalities or failures occurring during the connection establishment process can be solved flexibly and efficiently. Therefore, the efficiency of the RDMA connection establishment process can be improved.

[0118] Figure 6 A flowchart of a method 600 for connection establishment according to some embodiments of the present disclosure is shown. It should be understood that the method 600 can be executed, for example, by Figure 1 the first device 110, the second device 120, or other suitable devices in. The following will describe the case where the first device 110 executes the method 600 as an example.

[0119] At 610, the first device 110 receives a connection establishment request from the second device. The connection establishment request includes first data for establishing a remote direct memory access connection. At 620, based on the thread configuration information for the first device 110, the first device 110 determines a thread in the first device 110 that is associated with the first data. The thread configuration information indicates the association between the thread and the data. The thread associated with the first data is used to determine whether to establish a remote direct memory access connection. At 630, if it is determined to establish a remote direct memory access connection, the first device 110 sends a connection establishment response from the first device to the second device. The connection establishment response includes second data for establishing a remote direct memory access connection. The second data is associated with the first data.

[0120] In some exemplary embodiments, the first device 110 may determine the second data. Then, the first device 110 may, based on the thread configuration information, determine a thread in the first device 110 that is associated with the second data. The first device 110 may send the connection establishment response to the second device through the thread associated with the second data.

[0121] In some exemplary embodiments, the first device 110 may determine whether to establish an RDMA connection based on the first data through the thread associated with the first data.

[0122] In some exemplary embodiments, if it is determined not to establish an RDMA connection, the first device 110 may send a connection rejection response from the first device 110 to the second device 120.

[0123] In some exemplary embodiments, the first device 110 may establish an RDMA connection between the first device 110 and the second device based on the first data.

[0124] In some exemplary embodiments, the first data may include an identifier of the RDMA connection and / or an address of the second device.

[0125] In some exemplary embodiments, the second data may include an identifier of the RDMA connection and / or an address of the first device 110.

[0126] In some exemplary embodiments, the first device 110 may determine third data for disconnecting the RDMA connection. The first device 110 may, based on the thread configuration information, determine a thread in the first device 110 that is associated with the third data. The first device 110 may send a connection disconnection request from the first device 110 to the second device through the thread associated with the third data. The connection disconnection request may include the third data.

[0127] In some exemplary embodiments, the third data may include an identifier of the RDMA connection and the address of the first device 110.

[0128] In some exemplary embodiments, the first device 110 may receive a connection disconnection response from the second device. The connection disconnection response may include fourth data for disconnecting the RDMA connection. The first device 110 may determine, based on the thread configuration information, the thread in the first device 110 associated with the fourth data. The first device 110 may disconnect the RDMA connection between the first device 110 and the second device through the thread associated with the fourth data based on the fourth data.

[0129] In some exemplary embodiments, the fourth data may include an identifier of the RDMA connection and / or an address of the second device.

[0130] In some exemplary embodiments, the first device 110 may receive a connection disconnection request from the second device at the first device 110. The connection disconnection request includes fifth data for disconnecting the RDMA connection. The first device 110 may determine, based on the thread configuration information, the thread in the first device 110 associated with the fifth data. The thread associated with the fifth data is used to disconnect the RDMA connection between the first device 110 and the second device 120. The first device 110 may send a connection disconnection response to the second device 120. The connection disconnection response includes sixth data for disconnecting the RDMA connection. The sixth data is associated with the fifth data.

[0131] In some exemplary embodiments, the first device 110 may determine the sixth data. The first device 110 may determine, based on the thread configuration information, the thread in the first device 110 associated with the sixth data. The first device 110 may send a connection disconnection response to the second device through the thread associated with the sixth data.

[0132] In some exemplary embodiments, the first device 110 may disconnect the RDMA connection between the first device 110 and the second device based on the fifth data through the thread associated with the fifth data.

[0133] In some exemplary embodiments, the fifth data may include an identifier of the RDMA connection and / or an address of the second device.

[0134] In some exemplary embodiments, the sixth data may include an identifier of the RDMA connection and / or an address of the first device 110.

[0135] In some exemplary embodiments, the thread configuration information may be received from a user or may be pre-determined.

[0136] In some exemplary embodiments, the thread configuration information may be determined based on a traffic control steering rule for the first device 110. The traffic steering rule may be used to allocate data to at least one thread in the first device 110.

[0137] Figure 7 FIG. 700 is a flowchart of a method for connection establishment according to some embodiments of the present disclosure. It should be understood that the method 700 can be executed, for example, by Figure 1 the first device 110, the second device 120, or other suitable devices in

[0138] At 710, the second device 120 determines first data for establishing an RDMA connection. At 720, the second device 120 determines a thread in the second device 120 that is associated with the first data based on the thread configuration information for the second device 120. The thread configuration information indicates the association between the thread and the data. At 730, the second device 120 sends a connection establishment request from the second device 120 to the first device through the thread associated with the first data. The connection establishment request may include the first data.

[0139] In some exemplary embodiments, the second device 120 may receive a connection establishment response from the first device at the second device 120. The connection establishment response includes second data for establishing an RDMA connection. The second device 120 may determine a thread in the second device 120 that is associated with the second data based on the thread configuration information. The thread associated with the second data may be used to determine whether to establish an RDMA connection. If it is determined to establish an RDMA connection, the second device 120 may establish an RDMA connection between the first device and the second device 120 based on the second data through the thread associated with the second data.

[0140] In some exemplary embodiments, the second device 120 may determine whether to establish an RDMA connection based on the second data through the thread associated with the second data.

[0141] In some exemplary embodiments, if it is determined not to establish an RDMA connection, the second device 120 may send a connection rejection response to the first device.

[0142] In some exemplary embodiments, the second data may include an identifier of the RDMA connection and / or an address of the first device.

[0143] In some exemplary embodiments, the first data may include an identifier of the RDMA connection and / or an address of the second device 120.

[0144] In some exemplary embodiments, the second device 120 may receive a connection disconnection request from the first device at the second device 120. The connection disconnection request may include third data for disconnecting the RDMA connection. The second device 120 may determine, based on the thread configuration information, a thread in the second device 120 that is associated with the third data. The thread associated with the third data may be used to disconnect the RDMA connection between the first device and the second device 120. The second device 120 may send a connection disconnection response from the second device 120 to the first device. The connection disconnection response may include fourth data for disconnecting the RDMA connection. The fourth data may be associated with the third data.

[0145] In some exemplary embodiments, the second device 120 may determine the fourth data. The second device 120 may determine, based on the thread configuration information, a thread in the second device 120 that is associated with the fourth data. The second device 120 may send the connection disconnection response to the first device through the thread associated with the fourth data.

[0146] In some exemplary embodiments, the second device 120 may disconnect the RDMA connection between the first device and the second device 120 based on the third data through the thread associated with the third data.

[0147] In some exemplary embodiments, the third data may include an identifier of the RDMA connection and / or an address of the first device.

[0148] In some exemplary embodiments, the fourth data may include an identifier of the RDMA connection and / or an address of the second device 120.

[0149] In some exemplary embodiments, the second device 120 may determine fifth data for disconnecting the RDMA connection. The second device 120 may determine, based on the thread configuration information, a thread in the second device 120 that is associated with the fifth data. The second device 120 may send the connection disconnection request from the second device 120 to the first device through the thread associated with the fifth data. The connection disconnection request may include the fifth data.

[0150] In some exemplary embodiments, the fifth data may include an identifier of the RDMA connection and / or an address of the second device 120.

[0151] In some exemplary embodiments, the second device 120 may receive a connection disconnection response from the first device. The connection disconnection response may include sixth data for disconnecting the RDMA connection. The second device 120 may determine, based on the thread configuration information, a thread in the second device 120 that is associated with the sixth data. The second device 120 may disconnect the RDMA connection between the first device and the second device 120 based on the sixth data through the thread associated with the sixth data.

[0152] In some exemplary embodiments, the sixth data may include an identifier of an RDMA connection and an address of the first device.

[0153] In some exemplary embodiments, the thread configuration information may be received from a user or pre-determined.

[0154] In some exemplary embodiments, the thread configuration information may be determined based on a traffic control steering rule for the second device 120. The traffic steering rule may be used to allocate data to at least one thread in the second device 120.

[0155] Embodiments of the present disclosure also provide corresponding apparatuses for implementing the above methods or processes. Figure 8 FIG. shows a schematic structural block diagram of an apparatus 800 for establishing a connection according to certain embodiments of the present disclosure. The apparatus 800 may be implemented as or included in the first device 110 or the second device 120. Each module / component in the apparatus 800 may be implemented by hardware, software, firmware, or any combination thereof.

[0156] As Figure 8 shown, the apparatus 800 includes: a request receiving module 810, configured to receive a connection establishment request from a second device at a first device, where the connection establishment request includes first data for establishing an RDMA connection; a thread determination module 820, configured to determine, based on the thread configuration information for the first device, a thread in the first device associated with the first data, where the thread configuration information indicates the association between the thread and the data, and the thread associated with the first data is used to determine whether to establish an RDMA connection; and a response sending module 830, configured to, if it is determined to establish an RDMA connection, send a connection establishment response from the first device to the second device, where the connection establishment response includes second data for establishing an RDMA connection, and the second data is associated with the first data.

[0157] In some exemplary embodiments, the response sending module 830 may determine the second data. The response sending module 830 may determine, based on the thread configuration information, a thread in the first device associated with the second data. The response sending module 830 may send the connection establishment response to the second device through the thread associated with the second data.

[0158] In some exemplary embodiments, the apparatus 800 may further include a connection establishment decision module, configured to determine whether to establish an RDMA connection based on the first data through the thread associated with the first data.

[0159] In some exemplary embodiments, the apparatus 800 may further include a rejection response sending module configured to send a connection rejection response from the first device to the second device if it is determined that an RDMA connection is not to be established.

[0160] In some exemplary embodiments, the apparatus 800 may further include a connection establishment module configured to establish an RDMA connection between the first device and the second device based on first data.

[0161] In some exemplary embodiments, the first data may include an identifier of the RDMA connection and / or an address of the second device.

[0162] In some exemplary embodiments, the second data may include an identifier of the RDMA connection and / or an address of the first device.

[0163] In some exemplary embodiments, the apparatus 800 may further include a disconnection module configured to determine third data for disconnecting the RDMA connection at the first device; determine a thread in the first device associated with the third data based on thread configuration information; and send a connection disconnection request from the first device to the second device through the thread associated with the third data, the connection disconnection request including the third data.

[0164] In some exemplary embodiments, the third data may include an identifier of the RDMA connection and / or an address of the first device.

[0165] In some exemplary embodiments, the apparatus 800 may further include a disconnection response module configured to receive a connection disconnection response from the second device at the first device, where the connection disconnection response includes fourth data for disconnecting the RDMA connection; determine a thread in the first device associated with the fourth data based on thread configuration information; and disconnect the RDMA connection between the first device and the second device based on the fourth data through the thread associated with the fourth data.

[0166] In some exemplary embodiments, the fourth data may include an identifier of the RDMA connection and / or an address of the second device.

[0167] In some exemplary embodiments, the apparatus 800 may further include a disconnection request receiving module configured to receive a connection disconnection request from the second device at the first device, where the connection disconnection request includes fifth data for disconnecting the RDMA connection; determine a thread in the first device associated with the fifth data, the thread associated with the fifth data being used to disconnect the RDMA connection between the first device and the second device; and send a connection disconnection response from the first device to the second device, where the connection disconnection response includes sixth data for disconnecting the RDMA connection, and the sixth data is associated with the fifth data.

[0168] In some exemplary embodiments, the disconnection request receiving module may determine sixth data. The disconnection request receiving module may determine a thread in the first device associated with the sixth data based on thread configuration information. The disconnection request receiving module may send a connection disconnection response to the second device through the thread associated with the sixth data.

[0169] In some exemplary embodiments, the apparatus 800 may further include a connection disconnection module configured to disconnect an RDMA connection between the first device and the second device based on fifth data through a thread associated with the fifth data.

[0170] In some exemplary embodiments, the fifth data may include an identifier of the RDMA connection and / or an address of the second device.

[0171] In some exemplary embodiments, the sixth data may include an identifier of the RDMA connection and / or an address of the first device.

[0172] In some exemplary embodiments, the thread configuration information may be received from a user or may be pre-determined.

[0173] In some exemplary embodiments, the thread configuration information may be determined based on a traffic control guidance rule for the first device. The traffic guidance rule may be used to allocate data to at least one thread in the first device.

[0174] Embodiments of the present disclosure also provide corresponding apparatuses for implementing the above methods or processes. Figure 9 A schematic structural block diagram of an apparatus 900 for establishing a connection according to certain embodiments of the present disclosure is shown. The apparatus 900 may be implemented as or included in the first device 110 or the second device 120. Each module / component in the apparatus 900 may be implemented by hardware, software, firmware, or any combination thereof.

[0175] As Figure 9 shown, the apparatus 900 includes: a data determination module 910 configured to determine first data for establishing an RDMA connection at the second device; a thread determination module 920 configured to determine a thread in the second device associated with the first data based on thread configuration information for the second device, where the thread configuration information indicates the association between the thread and the data; and a request sending module 930 configured to send a connection establishment request including the first data from the second device to the first device through the thread associated with the first data.

[0176] In some exemplary embodiments, the apparatus 900 may further include a connection establishment response receiving module, configured to receive, at a second device, a connection establishment response from a first device, where the connection establishment response includes second data for establishing an RDMA connection; determine, based on thread configuration information, a thread in the second device that is associated with the second data, where the thread associated with the second data is used to determine whether to establish an RDMA connection; and if it is determined to establish an RDMA connection, establish an RDMA connection between the first device and the second device based on the second data through the thread associated with the second data.

[0177] In some exemplary embodiments, the apparatus 900 may further include a connection establishment determination module, configured to determine whether to establish an RDMA connection based on the second data through the thread associated with the second data.

[0178] In some exemplary embodiments, the apparatus 900 may further include a connection rejection response sending module, configured to send a connection rejection response from the second device to the first device if it is determined not to establish an RDMA connection.

[0179] In some exemplary embodiments, the second data may include an identifier of the RDMA connection and / or an address of the first device.

[0180] In some exemplary embodiments, the first data may include an identifier of the RDMA connection and / or an address of the second device.

[0181] In some exemplary embodiments, the apparatus 900 may further include a connection disconnection request receiving module, configured to receive, at the second device, a connection disconnection request from the first device, where the connection disconnection request includes third data for disconnecting the RDMA connection; determine, based on thread configuration information, a thread in the second device that is associated with the third data, where the thread associated with the third data is used to disconnect the RDMA connection between the first device and the second device; and send a connection disconnection response from the second device to the first device, where the connection disconnection response includes fourth data for disconnecting the RDMA connection, and the fourth data is associated with the third data.

[0182] In some exemplary embodiments, the connection disconnection request receiving module may determine the fourth data. The connection disconnection request receiving module may determine, based on thread configuration information, a thread in the second device that is associated with the fourth data. The connection disconnection request receiving module may send a connection disconnection response to the first device through the thread associated with the fourth data.

[0183] In some exemplary embodiments, the apparatus 900 may further include a connection disconnection module, configured to disconnect the RDMA connection between the first device and the second device based on the third data through the thread associated with the third data.

[0184] In some exemplary embodiments, the third data may include an identifier of an RDMA connection and / or an address of the first device.

[0185] In some exemplary embodiments, the fourth data may include an identifier of an RDMA connection and / or an address of the second device.

[0186] In some exemplary embodiments, the apparatus 900 may further include a disconnection request sending module, configured to determine, at the second device, fifth data for disconnecting an RDMA connection; determine, based on thread configuration information, a thread in the second device associated with the fifth data; and send a connection disconnection request from the second device to the first device through the thread associated with the fifth data, the connection disconnection request including the fifth data.

[0187] In some exemplary embodiments, the fifth data may include an identifier of an RDMA connection and / or an address of the second device.

[0188] In some exemplary embodiments, the apparatus 900 may further include a connection disconnection response receiving module, configured to receive, at the second device, a connection disconnection response from the first device, where the connection disconnection response includes sixth data for disconnecting an RDMA connection; determine, based on thread configuration information, a thread in the second device associated with the sixth data; and disconnect the RDMA connection between the first device and the second device based on the sixth data through the thread associated with the sixth data.

[0189] In some exemplary embodiments, the sixth data may include an identifier of an RDMA connection and / or an address of the first device.

[0190] In some exemplary embodiments, the thread configuration information may be received from a user or may be pre-determined.

[0191] In some exemplary embodiments, the thread configuration information may be determined based on a traffic control steering rule for the second device. The traffic steering rule may be used to allocate data to at least one thread in the second device.

[0192] As Figure 10 shown, the electronic device 1000 is in the form of a general-purpose electronic device. The components of the electronic device 1000 may include, but are not limited to, at least one processor 1010 or processing unit, a memory 1020, a storage device 1030, one or more communication units 1040, one or more input devices 1050, and one or more output devices 1060. The processor 1010 may be an actual or virtual processor and be capable of performing various processes according to a program stored in the memory 1020. In a multi-processor system, multiple processors execute computer-executable instructions in parallel to improve the parallel processing ability of the electronic device 1000.

[0193] The electronic device 1000 generally includes multiple computer storage media. Such media can be any accessible media that the electronic device 1000 can access, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 1020 can be a volatile memory (such as registers, caches, random access memory (RAM)), a non-volatile memory (such as read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 1030 can be a removable or non-removable medium and can include machine-readable media, such as a flash drive, a magnetic disk, or any other medium that can be capable of storing information and / or data and can be accessed within the electronic device 1000.

[0194] The electronic device 1000 can further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in Figure 10 it, a disk drive for reading from or writing to a removable, non-volatile magnetic disk (such as a "floppy disk") and an optical disk drive for reading from or writing to a removable, non-volatile optical disk can be provided. In these cases, each drive can be connected to a bus (not shown) by one or more data media interfaces. The memory 1020 can include a computer program product 1025 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.

[0195] The communication unit 1040 enables communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 1000 can be implemented by a single computing cluster or multiple computer machines that can communicate through a communication connection. Thus, the electronic device 1000 can operate in a networked environment using a logical connection with one or more other servers, network personal computers (PCs), or another network node.

[0196] The input device 1050 can be one or more input devices, such as a mouse, a keyboard, a trackball, etc. The output device 1060 can be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 1000 can also communicate with one or more external devices (not shown) as needed through the communication unit 1040, such as storage devices, display devices, etc., communicate with one or more devices that enable a user to interact with the electronic device 1000, or communicate with any device that enables the electronic device 1000 to communicate with one or more other electronic devices (such as a network card, a modem, etc.). Such communication can be performed via an input / output (I / O) interface (not shown).

[0197] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, and the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is further provided, the computer program product being tangibly stored on a non-transitory computer-readable medium and including computer-executable instructions, and the computer-executable instructions being executed by a processor to implement the method described above.

[0198] Aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and the combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0199] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, when executed by the processor of the computer or other programmable data processing apparatus, generate an apparatus for implementing the functions / acts specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, which instructions cause a computer, a programmable data processing apparatus, and / or other devices to operate in a particular manner, so that the computer-readable medium storing the instructions includes a manufacture including instructions for implementing various aspects of the functions / acts specified in one or more blocks of the flowchart and / or block diagram.

[0200] The computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device, such that a series of operation steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in one or more blocks of the flowchart and / or block diagram.

[0201] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various implementations of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of code, or a portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or by a combination of dedicated hardware and computer instructions.

[0202] The various implementations of the present disclosure have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The choice of terms used herein is intended to best explain the principles of the implementations, the practical application, or the improvement of the technology in the market, or to enable other ordinary skilled persons in the art to understand the various implementation manners disclosed herein.

Claims

1. A method for connection establishment, comprising: Receiving, at a first device, a connection establishment request from a second device, wherein the connection establishment request includes first data for establishing a Remote Direct Memory Access (RDMA) connection; Determining, based on thread configuration information for the first device, a thread in the first device that is associated with the first data, wherein the thread configuration information indicates the association between threads and data, and the thread associated with the first data is used to determine whether to establish the RDMA connection; and If it is determined to establish the RDMA connection, sending a connection establishment response from the first device to the second device, wherein the connection establishment response includes second data for establishing the RDMA connection, and the second data is associated with the first data.

2. The method according to claim 1, wherein sending the connection establishment response from the first device to the second device comprises: Determining the second data; Determining, based on the thread configuration information, a thread in the first device that is associated with the second data; and And Sending the connection establishment response to the second device through the thread associated with the second data.

3. The method according to claim 1, further comprising: If it is determined not to establish the RDMA connection, sending a connection rejection response from the first device to the second device; and / or And / or If it is determined to establish the RDMA connection, establishing the RDMA connection between the first device and the second device based on the first data.

4. The method according to claim 1, wherein the first data includes at least one of the following: an identifier of the RDMA connection, and an address of the second device, and / or wherein the second data includes at least one of the following: an identifier of the RDMA connection, and an address of the first device.

5. The method according to claim 1, further comprising: Determining, at the first device, third data for disconnecting the RDMA connection; Determining, based on the thread configuration information, a thread in the first device that is associated with the third data; and And Sending a connection disconnection request including the third data from the first device to the second device through the thread associated with the third data.

6. The method according to claim 5, wherein the third data includes at least one of the following: an identifier of the RDMA connection, and an address of the first device.

7. The method according to claim 5, further comprising: Receiving, at the first device, a connection disconnection response from the second device, wherein the connection disconnection response includes fourth data for disconnecting the RDMA connection; Determining, based on the thread configuration information, a thread in the first device that is associated with the fourth data; and And Disconnect a remote direct memory access connection between the first device and the second device based on the fourth data through the thread associated with the fourth data.

8. The method according to claim 1, further comprising: Receiving, at the first device, a connection disconnection request from the second device, wherein the connection disconnection request includes fifth data for disconnecting the remote direct memory access connection; Based on the thread configuration information, determining a thread in the first device associated with the fifth data, the thread associated with the fifth data being for disconnecting the remote direct memory access connection between the first device and the second device; And Sending a connection disconnection response from the first device to the second device, wherein the connection disconnection response includes sixth data for disconnecting the remote direct memory access connection, and the sixth data is associated with the fifth data.

9. Sending a connection disconnection response from the first device to the second device according to claim 8 includes: Determining the sixth data; Based on the thread configuration information, determining a thread in the first device associated with the sixth data; And Sending the connection disconnection response to the second device through the thread associated with the sixth data.

10. The method according to claim 8, further comprising: Disconnecting the remote direct memory access connection between the first device and the second device based on the fifth data through the thread associated with the fifth data.

11. The method according to claim 8, wherein the fifth data includes at least one of the following: an identifier of the remote direct memory access connection, and an address of the second device, and / or wherein the sixth data includes at least one of the following: an identifier of the remote direct memory access connection, and an address of the first device.

12. A method for establishing a connection, comprising: Determining, at the second device, first data for establishing a remote direct memory access connection; Based on the thread configuration information for the second device, determining a thread in the second device associated with the first data, wherein the thread configuration information indicates the association between threads and data; And Sending a connection establishment request from the second device to the first device through the thread associated with the first data, wherein the connection establishment request includes the first data.

13. The method according to claim 12, further comprising: Receiving, at the second device, a connection establishment response from the first device, wherein the connection establishment response includes second data for establishing the remote direct memory access connection; Based on the thread configuration information, determining a thread in the second device associated with the second data, wherein the thread associated with the second data is for determining whether to establish the remote direct memory access connection; And If it is determined to establish the remote direct memory access connection, based on the second data, establish the remote direct memory access connection between the first device and the second device through the thread associated with the second data.

14. The method according to claim 13, further comprising: Determining whether to establish the remote direct memory access connection based on the second data through the thread associated with the second data; and / or If it is determined not to establish the remote direct memory access connection, send a connection rejection response from the second device to the first device.

15. The method according to claim 12, further comprising: Receiving, at the second device, a connection disconnection request from the first device, where the connection disconnection request includes third data for disconnecting the remote direct memory access connection; Based on the thread configuration information, determining a thread in the second device associated with the third data, and the thread associated with the third data is used to disconnect the remote direct memory access connection between the first device and the second device; and Sending a connection disconnection response from the second device to the first device, where the connection disconnection response includes fourth data for disconnecting the remote direct memory access connection, and the fourth data is associated with the third data.

16. The method according to claim 12, further comprising: Determining, at the second device, fifth data for disconnecting the remote direct memory access connection; Based on the thread configuration information, determining a thread in the second device associated with the fifth data; and Sending a connection disconnection request including the fifth data from the second device to the first device through the thread associated with the fifth data.

17. A device for establishing a connection, comprising: A request receiving module, configured to receive, at a first device, a connection establishment request from a second device, where the connection establishment request includes first data for establishing a remote direct memory access connection; A thread determining module, configured to determine, based on thread configuration information for the first device, a thread in the first device associated with the first data, where the thread configuration information indicates the association between threads and data, and the thread associated with the first data is used to determine whether to establish the remote direct memory access connection; and A response sending module, configured to send a connection establishment response from the first device to the second device if it is determined to establish the remote direct memory access connection, where the connection establishment response includes second data for establishing the remote direct memory access connection, and the second data is associated with the first data.

18. A device for establishing a connection, comprising: A data determining module, configured to determine, at a second device, first data for establishing a remote direct memory access connection; A thread determination module, configured to determine, based on thread configuration information for the second device, a thread in the second device that is associated with the first data, where the thread configuration information indicates an association between a thread and data; and A request sending module, configured to send a connection establishment request from the second device to the first device through the thread associated with the first data, where the connection establishment request includes the first data.

19. An electronic device, comprising: At least one processing unit; and At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the device to perform the method according to any one of claims 1 to 11 or the method according to any one of claims 12 to 16.

20. A computer-readable storage medium, having stored thereon a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 11 or the method according to any one of claims 12 to 16.

Citation Information

Cited By

  • Communication method and device, communication equipment, storage medium and program product

    CN121151449A