A method and apparatus for identifying remote direct memory access sessions

CN122578684APending Publication Date: 2026-08-14NEW H3C TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610955084.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0003]然而,第二种方式在实际部署中面临显著的技术挑战

Benefits of technology

[0008]本申请的有益效果在于,优化RDMA会话建链的效率和成功率,减少ACL表项资源消耗。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122578684A_ABST
    Figure CN122578684A_ABST
Patent Text Reader

Abstract

This application provides a method and apparatus for identifying a Remote Direct Memory Access (RDMA) session. The method includes: receiving a Remote Direct Memory Access (RDMA) acknowledgment request message mirrored by a forwarding plane; buffering the RDMA acknowledgment request message if no matching RDMA session is found; receiving an RDMA acknowledgment response message mirrored by the forwarding plane; when the time difference between the reception of the RDMA acknowledgment request message and the RDMA acknowledgment response message falls within a specified time window; the RDMA acknowledgment request message and the RDMA acknowledgment response message have a pair of opposite source IP addresses and destination IP addresses, the destination QP is identical to the source QP, and the message sequence number is the same; identifying that the RDMA acknowledgment request message and the RDMA acknowledgment response message belong to an RDMA session, and recording the four-tuple information of the RDMA session.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to communication technology, specifically a method and device for identifying remote direct memory access sessions. Background Technology

[0002] Remote Direct Memory Access (RoCE) over Converged Ethernet, with its low latency and high throughput, has become a key technology for building high-performance computing networks in modern data centers. During the establishment of an RDMA session, communication devices typically employ two main analysis mechanisms: the first is based on the standard Communication Manager (CM) protocol, establishing a connection by identifying specific handshake messages; the second is based on a proprietary format of the Transmission Control Protocol (TCP) for connection establishment.

[0003] However, the second approach faces significant technical challenges in practical deployment. Because TCP-based RoCE connection establishment lacks a unified and standard parsable protocol exchange message, devices cannot directly parse the session state as they would with a standard TCP three-way handshake. Instead, a massive number of ACL (Access Control List) entries are required to accurately match specific opcodes in the BTH (Base Transport Header) header. This involves continuously uploading suspected RoCE connection establishment TCP packets from the data plane to the control plane for deep packet inspection and session state machine maintenance.

[0004] However, the ACL entry resources of communication equipment are limited. The number of ACL entries used to match opcodes consumes the storage resources of the switching chip TCAM, affecting the ACL entry configuration of other key business policies. Secondly, the high frequency of packet uploading to the control plane causes the CPU to fall into a continuous interrupt processing loop, resulting in new session establishment requests being dropped or delayed, ultimately causing a precipitous drop in the success rate of RoCE session establishment. Summary of the Invention

[0005] The purpose of this application is to provide a method and apparatus for identifying remote direct memory access sessions, thereby simplifying the identification of remote direct memory access sessions.

[0006] This application provides a method for identifying a Remote Direct Memory Access (RDMA) session. The method includes: receiving a first RDMA acknowledgment request message mirrored by a forwarding plane; caching the first RDMA acknowledgment request message based on the source IP address, destination IP address, and destination queue pair QP of the first RDMA acknowledgment request message, indicating that no matching RDMA session was found; receiving a first RDMA acknowledgment response message mirrored by the forwarding plane; calculating the reception time difference between the first RDMA acknowledgment request message and the first RDMA acknowledgment response message, and determining that the reception time difference falls within a specified time window; identifying that the first RDMA acknowledgment request message and the first RDMA acknowledgment response message have a pair of opposite source IP addresses and destination IP addresses, that the destination QP of the first RDMA acknowledgment request message is the same as the source QP of the first RDMA acknowledgment response message, and that the message sequence numbers of the RDMA acknowledgment request message and the first RDMA acknowledgment response message are the same; identifying that the first RDMA acknowledgment request message and the first RDMA acknowledgment response message belong to a first RDMA session, and recording the quadruple information of the first RDMA session.

[0007] To achieve the above objectives, this application also provides a device for identifying remote direct memory access sessions. The device includes a processor, a machine-readable storage medium, a switching chip, and a network interface. The processor executes machine-executable instructions recorded on the machine-readable storage medium to perform the following operations: receiving a first remote direct memory access (RDMA) acknowledgment request message mirrored by the forwarding plane; caching the first RDMA acknowledgment request message based on the source IP address, destination IP address, and destination queue (QP) where no matching RDMA session was found; receiving a first RDMA acknowledgment response message mirrored by the forwarding plane; and calculating the first RDMA acknowledgment response message. The system identifies the reception time difference between the request message and the first RDMA acknowledgment response message, and determines that the reception time difference falls within a specified time window; it identifies that the first RDMA acknowledgment request message and the first RDMA acknowledgment response message have a pair of opposite source IP addresses and destination IP addresses, that the destination QP of the first RDMA acknowledgment request message is consistent with the source QP of the first RDMA acknowledgment response message, and that the message sequence numbers of the first RDMA acknowledgment request message and the first RDMA acknowledgment response message are the same; it identifies that the first RDMA acknowledgment request message and the first RDMA acknowledgment response message belong to the first RDMA session, and records the quadruple information of the first RDMA session.

[0008] The beneficial effects of this application are that it optimizes the efficiency and success rate of RDMA session connection establishment and reduces the resource consumption of ACL entries. Attached Figure Description

[0009] Figure 1A flowchart illustrating an embodiment of a method for identifying remote direct memory access sessions provided in this application; Figures 2A-2C A schematic diagram illustrating the identification of remote direct memory access sessions provided in an embodiment of this application; Figures 3A-3B A schematic diagram of an embodiment of the hardware flow table entries provided in this application; Figure 4 This is a schematic diagram of an embodiment of a device for identifying remote direct memory access sessions as described in this application. Detailed Implementation

[0010] The following detailed description will be provided with reference to several examples illustrated in the accompanying figures. In this detailed description, numerous specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components, and circuits are not described in detail in the examples to avoid obscuring their meaning.

[0011] In the terminology used, the term "including" means including but not limited to; the term "containing" means including but not limited to; the terms "above," "within," and "below" include the number itself; the terms "greater than" and "less than" mean not including the number itself. The term "based on" means based on at least a portion of them.

[0012] Figure 1 The image shows a method for identifying a remote direct memory access session provided in this application. The method includes: Step 101: Receive the Remote Direct Memory Access (RDMA) acknowledgment request message mirrored by the forwarding plane; Step 102: Based on the source IP address, destination IP address, and destination queue of the RDMA acknowledgment request message, if no matching RDMA session is found for QP, cache the RDMA acknowledgment request message. Step 103: Receive the RDMA acknowledgment response message mirrored by the forwarding plane; Step 104: Determine that the reception time difference between the RDMA acknowledgment request message and the RDMA acknowledgment response message is within a specified time window; identify that the RDMA acknowledgment request message and the RDMA acknowledgment response message have a pair of opposite source IP addresses and destination IP addresses, the same destination QP and source QP, and the same message sequence number; Step 105: Identify that the RDMA acknowledgment request message and the RDMA acknowledgment response message belong to the same RDMA session, and record the quadruple information of the RDMA session.

[0013] Figure 1 The beneficial effects of this embodiment are that it optimizes the efficiency and success rate of RDMA session connection establishment and reduces ACL entry resource consumption.

[0014] Figures 2A-2CThis is a schematic diagram illustrating the identification of remote direct memory access sessions provided in an embodiment of this application.

[0015] Figure 2A In the switching chip 201, ACL table 21 is configured with ACL entry 1a, which is used to establish a high-priority RDMA acknowledgment request message hardware flow table entry.

[0016] In ACL entry 1a, the matching item is the AR (Acknowledge Request) flag set in the BTH (Base Transport Header) header; the action items include: establishing a flow entry and mirroring the matching packet to the CPU; the flow key value of the flow entry is the source IP address, destination IP address, and destination QP (Queue Pair); the flow entry status includes: mirroring period, initial n packet counters for the mirroring period, and adding a receive timestamp.

[0017] The ACL entry 1b configured in the ACL table 21 of the switching chip 201 is used to establish a high-priority hardware flow table entry for RDMA acknowledgment response messages.

[0018] In ACL entry 1b, the matching item is the value of ACK (Acknowledge) indicated by the opcode field in the BTH header; the action items include: establishing a flow entry and mirroring the matching packet to the CPU; the flow key of the flow entry is the source IP address, destination IP address, and destination QP; the flow entry status includes: mirroring period, initial n packet counters for the mirroring period, and adding a receive timestamp.

[0019] To improve the success rate of RDMA sessions and ensure that the time when RDMA acknowledgment response messages in the same session are mirrored to the CPU can be matched with the RDMA acknowledgment request mirrored to the CPU, the mirror migration time can be set in the flow table entry status when establishing the hardware flow table entry for the RDMA acknowledgment response message.

[0020] In another example, in ACL entry 1b, the matching item is the value of ACK (Acknowledge) indicated by the opcode field in the BTH header; the action items include: creating a flow entry and mirroring the matching packet to the CPU; the flow key of the flow entry is the source IP address, destination IP address, and destination QP; the flow entry status includes: mirroring period, initial n packet counters for the mirroring period, adding a receive timestamp, and mirroring migration time.

[0021] Figures 3A-3B This is a schematic diagram of the hardware flow table entries provided in this application. The hardware flow table entries generated by ACL entry 1a are as follows: Figure 3AAs shown; the flow table entry status of the action item in ACL entry 1b does not include the mirror migration time, and the format of the created hardware flow table entry is as follows. Figure 3A As shown in Figure 3B; or, if the flow table entry status of the action item in ACL entry 1b includes the mirror migration time, then the format of the created hardware flow table entry is as shown in Figure 3B.

[0022] refer to Figure 2A-2C , Figures 3A-3B For example, an RDMA acknowledgment request message P11 from the client (not shown in the attached diagram) arrives at device 200; where the source IP address is IP1, the destination IP address is IP2, and the destination QP is QP100.

[0023] The switching chip 201 performs simultaneous searches in ACL table 21 and hardware flow table 22. Based on the AR=1 flag in the BTH header of the RDMA request message P11, it matches ACL entry 1a and generates hardware flow table entry 2a. In hardware flow table entry 2a, Flow Key={SIP1,DIP2,DQP100}; Flow table entry status={mirror cycle T1, initial 3 message counters in mirror cycle T1, add receive timestamp, message sequence number n}.

[0024] If the switching chip 201 determines that the mirroring period T1 has not arrived based on the established hardware flow table entry 2a, then it will not mirror the RDMA acknowledgment request message P11 to the CPU.

[0025] The switching chip 201 forwards the RDMA request message P11 to the server (not shown in the attached diagram) based on the destination IP address IP2.

[0026] Figure 2B As shown, the RDMA acknowledgment response message P21 from the server arrives at device 200; where the source IP address = IP2; the destination IP address = IP1, and the source QP = QP100.

[0027] The switching chip 201 performs a lookup in both ACL table 21 and hardware flow table 22. Based on the ACK value flag AR=1 indicated by the Opcode field in the BTH header of the RDMA acknowledgment request message P21, it matches ACL entry 1b and generates hardware flow table entry 2b.

[0028] In hardware flow table entry 2b, Flow Key={SIP2,DIP1,SQP100}; Flow table entry status={Mirroring period T1, initial 3 packet counters for mirroring period T1, added receive timestamp, mirroring migration time ta, packet sequence number n}.

[0029] If the established hardware flow table entry 2b determines that the mirroring period T1 has not arrived, the switching chip 201 will not mirror the RDMA acknowledgment response message P21 to the CPU.

[0030] The switching chip 201 forwards the RDMA request message P21 to the server based on the destination IP address IP1.

[0031] The client, acting as the sender, continuously sends multiple data packets. For each batch of data packets sent, the client sends an RDMA acknowledgment request message.

[0032] like Figure 2C As shown, RDMA acknowledgment request messages P12, P13, and P14 from the client (not shown in the attached diagram) arrive at device 200 in succession.

[0033] Based on the RDMA acknowledgment request message P12, the switching chip 201 performs a lookup simultaneously in ACL table 21 and hardware flow table 22, and hits both ACL table entry 1a and hardware flow table entry 2a; it determines that the higher-priority hardware flow table entry 2a takes precedence.

[0034] Based on hardware flow table entry 2a, switching chip 201 determines that the mirroring period T1 has not yet arrived, and the initial three message counters for mirroring period T1 have not reached their maximum values. It then adds the receive timestamp of the RDMA acknowledgment request message P12 and mirrors it to CPU 203. Switching chip 201 forwards the RDMA acknowledgment request message P12 to the server. Upon receiving the RDMA acknowledgment request message P12, the server immediately responds by sending an RDMA acknowledgment response message P22 to device 200.

[0035] Based on the source IP address IP1, destination IP address IP2, and DQP100 of the RDMA acknowledgment request message P12, CPU203 stores the RDMA acknowledgment request message P12 in the RDMA message buffer 24 if no matching RDMA session is found in the RDMA session table 23.

[0036] Based on the RDMA acknowledgment response message P22, the switching chip 201 performs a lookup simultaneously in ACL table 21 and hardware flow table 22, and hits both ACL table entry 1b and hardware flow table entry 2b; it determines that the higher-priority hardware flow table entry 2b takes precedence.

[0037] Based on hardware flow table entry 2b, the switching chip 201 determines that the mirroring period T1 has not arrived. The initial three message counters of the mirroring period T1 have not reached their maximum values. The receiving timestamp of the RDMA confirmation request message P22 is added, and the mirroring is performed to CPU 203 after a delay migration time ta.

[0038] When CPU203 receives the RDMA acknowledgment response message, it first calculates the time difference between receiving the cached RDMA acknowledgment request message and the RDMA acknowledgment response message P22.

[0039] In one example, CPU203 calculates the reception time difference by subtracting the reception time of the buffered RDMA acknowledgment response message P12 from the reception time of the RDMA acknowledgment response message P22.

[0040] Alternatively, in one example, CPU203 reads the port compensation offset time tb configured for the receiving port of the RDMA acknowledgment response message P22, subtracts the port compensation offset time tb from the receiving time of the RDMA acknowledgment response message P22 to calculate the receiving offset time of the RDMA acknowledgment response message P22; and subtracts the receiving time of the buffered RDMA acknowledgment request message P12 from the receiving offset time of the RDMA acknowledgment response message P22 to calculate the receiving time difference.

[0041] CPU203 compares the source IP1 and destination IP2 of the RDMA acknowledgment request message P12 with the source IP2 and destination IP1 of the RDMA acknowledgment response message P22, confirming that they have a pair of opposite source IP addresses and destination IP addresses; it compares the destination QP100 of the RDMA acknowledgment request message P12 with the SQP100 of the RDMA acknowledgment response message P22, confirming that they are the same; it compares the message sequence number of the RDMA acknowledgment request message P12 with the message sequence number n of the RDMA acknowledgment response message P22, confirming that they are the same. CPU203 recognizes that RDMA acknowledgment request message P12 and RDMA acknowledgment response message P22 belong to the same RDMA session. In addition to RDMA sessions 1 to RDMA sessions n already recorded in RDMA session table 23, it records another RDMA session n+1. The four-tuple information of RDMA session n+1 includes: source IP address IP1, destination IP address IP2, source QP200 (destination QP of RDMA acknowledgment response message P22), and destination QP100 (destination QP of RDMA acknowledgment request message P21).

[0042] Figure 4 This is a schematic diagram of an embodiment of a device for identifying remote direct memory access sessions as described in this application.

[0043] In this application, a machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device used to store or contain information (such as executable instructions, data, etc.). For example, any machine-readable storage medium described herein can be any type of random access memory (RAM), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard disk drive), solid-state drive, any type of optical disc (such as an optical disc, DVD, etc.), and similar devices, or combinations thereof. Furthermore, any machine-readable storage medium described herein can be a non-transitory machine-readable storage medium.

[0044] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for identifying remote direct memory access sessions, characterized in that, The method includes, Receive the first Remote Direct Memory Access (RDMA) acknowledgment request message mirrored by the forwarding plane; Based on the source IP address, destination IP address, and destination queue where no matching RDMA session was found for QP, the first RDMA acknowledgment request message is cached. Receive the first RDMA acknowledgment response message mirrored by the forwarding plane; Calculate the reception time difference between the first RDMA acknowledgment request message and the first RDMA acknowledgment response message, and determine that the reception time difference is within a specified time window; identify that the first RDMA acknowledgment request message and the first RDMA acknowledgment response message have a pair of opposite source IP addresses and destination IP addresses, that the destination QP of the first RDMA acknowledgment request message is consistent with the source QP of the first RDMA acknowledgment response message, and that the message sequence numbers of the first RDMA acknowledgment request message and the first RDMA acknowledgment response message are the same; Identify that the first RDMA acknowledgment request message and the first RDMA acknowledgment response message belong to the first RDMA session, and record the quadruple information of the first RDMA session.

2. The method according to claim 1, characterized in that, The calculation of the reception time difference between the first RDMA acknowledgment request message and the first RDMA acknowledgment response message refers to... The reception time difference is calculated by subtracting the reception time of the first RDMA acknowledgment response message from the reception time of the first RDMA acknowledgment response message. or, The reception offset time of the first RDMA acknowledgment response message is calculated by subtracting the port compensation offset time of the receiving port of the first RDMA acknowledgment response message from the reception time of the first RDMA acknowledgment response message. The reception time difference is calculated by subtracting the reception time of the first RDMA acknowledgment request message from the reception offset time of the first RDMA acknowledgment response message.

3. The method according to claim 1, characterized in that, The receiving port compensation offset time is zero or the configured port compensation offset time.

4. The method according to claim 1, characterized in that, The method also includes, In the forwarding plane, an initial number of RDMA acknowledgment request messages for each session within a specified period are mirrored to the control plane; and, In the forwarding plane, the initial number of RDMA acknowledgment response messages for each session within the specified period are mirrored to the control plane.

5. The method according to claim 1, characterized in that, The method also includes, In the forwarding plane, the initial number of RDMA acknowledgment request messages for each session within a specified period are mirrored to the control plane; as well as, In the forwarding plane, the initial number of RDMA acknowledgment response messages for each session within the specified period are delayed by a preset mirror offset time and then mirrored to the control plane.

6. A device for identifying remote direct memory access sessions, the device comprising a processor, a machine-readable storage medium, a switching chip, and a network interface; characterized in that, The processor performs the following operations by executing machine-executable instructions recorded on the machine-readable storage medium. Receive the first Remote Direct Memory Access (RDMA) acknowledgment request message mirrored by the forwarding plane; Based on the source IP address, destination IP address, and destination queue where no matching RDMA session was found for QP, the first RDMA acknowledgment request message is cached. Receive the first RDMA acknowledgment response message mirrored by the forwarding plane; Calculate the reception time difference between the first RDMA acknowledgment request message and the first RDMA acknowledgment response message, and determine that the reception time difference is within a specified time window; identify that the first RDMA acknowledgment request message and the first RDMA acknowledgment response message have a pair of opposite source IP addresses and destination IP addresses, that the destination QP of the first RDMA acknowledgment request message is the same as the source QP of the first RDMA acknowledgment response message, and that the message sequence numbers of the first RDMA acknowledgment request message and the first RDMA acknowledgment response message are the same; Identify that the first RDMA acknowledgment request message and the first RDMA acknowledgment response message belong to the first RDMA session, and record the quadruple information of the first RDMA session.

7. The device according to claim 6, characterized in that, The processor performs the operation of calculating the reception time difference between the first RDMA acknowledgment request message and the first RDMA acknowledgment response message by executing machine-executable instructions recorded on the machine-readable storage medium. The reception time difference is calculated by subtracting the reception time of the first RDMA acknowledgment response message from the reception time of the first RDMA acknowledgment response message. or, The reception offset time of the first RDMA acknowledgment response message is calculated by subtracting the port compensation offset time of the receiving port of the first RDMA acknowledgment response message from the reception time of the first RDMA acknowledgment response message. The reception time difference is obtained by subtracting the reception time of the first RDMA acknowledgment request message from the reception offset time of the first RDMA acknowledgment response message.

8. The device according to claim 6, characterized in that, The processor performs the operation of calculating the reception time difference between the first RDMA acknowledgment request message and the first RDMA acknowledgment response message by executing machine-executable instructions recorded on the machine-readable storage medium. Obtain the port compensation offset time of the receiving port of the first RDMA acknowledgment response message; Subtract the port compensation offset time from the reception time of the first RDMA acknowledgment response message to calculate the reception offset time of the first RDMA acknowledgment response message. The reception time difference is obtained by subtracting the reception time of the first RDMA acknowledgment request message from the reception offset time of the first RDMA acknowledgment response message; wherein the reception port compensation offset time is zero or the configured port compensation offset time.

9. The device according to claim 6, characterized in that, The switching chip is configured to mirror an initial number of RDMA acknowledgment request messages for each session within a specified period to the control plane; and to mirror an initial number of RDMA acknowledgment response messages for each session within the specified period to the control plane.

10. The device according to claim 6, characterized in that, The switching chip is configured to mirror an initial number of RDMA acknowledgment request messages for each session within a specified period to the control plane; and to mirror an initial number of RDMA acknowledgment response messages for each session within the specified period to the control plane after delaying them by a preset mirroring offset time.