Rdma engine and queue pair management method and chip thereof
Patent Information
- Application Number
- CN202410095152.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-22
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2044-01-22
AI Technical Summary
[0004]RDMA引擎通常是通过多个链表来实现定时器(ACK定时器或RNR定时器),每个时间刻度可能有多个来自不同QP的定时器节点(链表是由多个定时器节点连接形成,一个定时器节点对应一个定时器)同时发生超时,因此需要将相同时间刻度的所有定时器节点放入一个链表,每个时间刻度对应一个链表;当RDMA引擎执行QP注销命令时,此时RDMA引擎需要回收QP所使用的资源,如果发现QPC内的ACK定时器标识或RNR定时器标识为非0,则需要回收定时器节点,此时如果RDMA引擎主动将定时器节点删除,则需要遍历定时器节点所在的链表,此时如果链表内定时器节点较多,则在遍历时会耗费很多时间,而且动态地删除链表内的定时器节点是复杂并且是易出错的,因此RDMA引擎在队列对注销时通常采用被动方式去等待定时器节点的自然超时
[0041]本申请实施例在RDMA引擎处理队列队注销命令时,不考虑队列队是否有未回收的定时器节点,即在目标队列对有使用ACK定时器和RNR定时器的情况下,不需要等待定时器节点的超时,直接清空接收侧和发送侧的与目标队列对应的业务并回收接收侧和发送侧的相应资源,从而减少RDMA引擎执行队列对注销命令的执行时间,使得RDMA引擎可以很快地接收下一个队列对注销命令,使得下一个队列对注销命令的发送方无需等待很长时间即可完成将队列对注销命令发送给RDMA引擎,提高了RDMA引擎的QP注销性能。
Smart Images

Figure CN117896336B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of RDMA technology, specifically to an RDMA engine and its queue pair management method and chip. Background Technology
[0002] To ensure reliable transmission of RDMA (Remote Direct Memory Access) services, the sending side typically uses an ACK timer to check whether the sending side's request is acknowledged in a timely manner. When the receiving side experiences an RNR (Receiver Not Ready), it is usually due to a lack of RQ (Resource Queue) resources. The sending side also needs to use an RNR timer to wait for the receiving end to be ready.
[0003] The RDMA engine typically records whether the ACK timer and RNR timer have been used within the Queue Pair Context (QPC) using the ACK timer flag and the RNR timer flag. Usually, a Queue Pair (QP) will use at most one ACK timer and one RNR timer.
[0004] RDMA engines typically implement timers (ACK timers or RNR timers) using multiple linked lists. Each timescale may have multiple timer nodes from different QPs (a linked list is formed by connecting multiple timer nodes, with one timer node corresponding to one timer) timeout simultaneously. Therefore, all timer nodes at the same timescale need to be placed in a linked list, one linked list per timescale. When the RDMA engine executes a QP deregistration command, it needs to reclaim the resources used by the QP. If the ACK timer flag or RNR timer flag in the QPC is found to be non-zero, the timer node needs to be reclaimed. If the RDMA engine actively deletes the timer node, it needs to traverse the linked list containing the timer node. If there are many timer nodes in the linked list, this traversal will consume a lot of time. Furthermore, dynamically deleting timer nodes from the linked list is complex and error-prone. Therefore, RDMA engines typically adopt a passive approach when deregistering timer nodes in the queue, waiting for the timer nodes to time out naturally.
[0005] Because the timeout periods of the ACK and RNR timers are usually set to be relatively long, when the RDMA engine executes a queue pair deregistration command, waiting for the timer node to time out naturally will affect the execution time of the queue pair deregistration command. This causes the RDMA engine to wait a long time before receiving the next queue pair deregistration command. This is very unfriendly to the sender who issues the queue pair deregistration command to the RDMA engine, as the sender also needs to wait a long time to complete the transmission of the queue pair deregistration command. Therefore, the queue pair deregistration performance of the RDMA engine needs to be improved. Summary of the Invention
[0006] The purpose of this application is to propose an RDMA engine and its queue pair management method and chip to improve the queue pair deregistration performance of the RDMA engine.
[0007] To achieve the above objectives, embodiments of this application provide an RDMA engine, including:
[0008] The input module is used to receive queue pair cancellation commands and forward the queue pair cancellation commands to the queue pair cancellation processing module;
[0009] The queue pair cancellation processing module is used to receive and forward the queue pair cancellation command to the sending-side processing module and the receiving-side processing module.
[0010] The sending-side processing module is used to determine the target queue pair according to the queue pair cancellation command, clear the service of the target queue pair on the sending side and reclaim the resources, generate sending-side cancellation completion information, and send the sending-side cancellation completion information to the queue pair cancellation processing module.
[0011] The receiving-side processing module is used to determine the target queue pair according to the queue pair cancellation command, clear the services of the target queue pair on the receiving side and reclaim resources, generate receiving-side cancellation completion information, and send the receiving-side cancellation completion information to the queue pair cancellation processing module.
[0012] The timer module is used to control and monitor the ACK timer and RNR timer of the target queue pair;
[0013] The queue pair deregistration processing module is further configured to send queue pair deregistration completion information to the sender of the queue pair deregistration command based on the sending-side deregistration completion information and the receiving-side deregistration completion information, provided that the ACK timer and / or RNR timer of the target queue pair has not expired.
[0014] Preferably, the timer module is further configured to generate a timer timeout notification and send it to the sending-side processing module when the ACK timer or RNR timer of the target queue pair times out.
[0015] The sending-side processing module is further configured to read the queue pair context of the target queue pair according to the timer timeout notification, and set the flag of the ACK timer or RNR timer that timed out in the queue pair context to a state where there are no old timer nodes that have not been recycled.
[0016] Preferably, the RDMA engine further includes a queue pair creation processing module;
[0017] The input module is also used to receive a queue pair creation command and forward the queue pair creation command to the queue pair creation processing module;
[0018] The queue pair creation processing module is further configured to read the queue pair context of the target queue pair according to the queue pair creation command, determine whether there are any old timer nodes that have not been recycled according to the identifiers of the ACK timer and RNR timer in the queue pair context, and if so, return a creation failure message to the sender of the queue pair creation command; otherwise, create the corresponding queue pair according to the queue pair creation command and return a creation success message to the sender of the queue pair creation command.
[0019] Preferably, when both the ACK timer identifier and the RNR timer identifier in the context of the queue are 0, it is determined that there are no old timer nodes that have not been recycled;
[0020] When the identifier of the ACK timer or the identifier of the RNR timer in the context of the queue is 1, it is determined that there are old timer nodes that have not been recycled.
[0021] This application embodiment also provides a queue pair management method based on the above-described RDMA engine, the method comprising:
[0022] The input module receives the queue pair cancellation command and forwards the queue pair cancellation command to the queue pair cancellation processing module;
[0023] The queue pair cancellation processing module receives and forwards the queue pair cancellation command to the sending-side processing module and the receiving-side processing module;
[0024] The sending-side processing module determines the target queue pair based on the queue pair cancellation command, clears the services of the target queue pair on the sending side and reclaims resources, generates sending-side cancellation completion information, and sends the sending-side cancellation completion information to the queue pair cancellation processing module.
[0025] The receiving-side processing module determines the target queue pair based on the queue pair cancellation command, clears the services of the target queue pair on the receiving side and reclaims resources, generates receiving-side cancellation completion information, and sends the receiving-side cancellation completion information to the queue pair cancellation processing module.
[0026] The queue pair deregistration processing module sends queue pair deregistration completion information to the sender of the queue pair deregistration command based on the sending-side deregistration completion information and the receiving-side deregistration completion information.
[0027] Preferably, if the ACK timer or RNR timer of the target queue pair times out after the target queue pair is deregistered, the timer module silently discards the timer event.
[0028] Preferably, the RDMA engine further includes a queue pair creation processing module;
[0029] The method further includes:
[0030] The input module receives the queue pair creation command and forwards the queue pair creation command to the queue pair creation processing module;
[0031] The queue pair creation processing module reads the queue pair context of the target queue pair according to the queue pair creation command. Based on the identifiers of the ACK timer and RNR timer in the queue pair context, it determines whether there are any old timer nodes that have not been recycled. If so, it returns a creation failure message to the sender of the queue pair creation command. If not, it creates the corresponding queue pair according to the queue pair creation command and returns a creation success message to the sender of the queue pair creation command.
[0032] Preferably, if the ACK timer or RNR timer for the target queue pair times out after the target queue pair is deregistered, the timer module silently discards the timer event, specifically including:
[0033] If the ACK timer or RNR timer of the target queue pair times out after the target queue pair is deregistered, the timer module generates a timer timeout notification and sends it to the sending side processing module.
[0034] The sending-side processing module reads the queue pair context of the target queue pair according to the timer timeout notification, and sets the flag of the ACK timer or RNR timer that timed out in the queue pair context to a state where there are no old timer nodes that have not been recycled.
[0035] Preferably, the method specifically includes:
[0036] When both the ACK timer identifier and the RNR timer identifier in the context of the queue are 0, it is determined that there are no old timer nodes that have not been recycled.
[0037] When the identifier of the ACK timer or the identifier of the RNR timer in the context of the queue is 1, it is determined that there are old timer nodes that have not been recycled.
[0038] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0039] This application also provides a chip including the RDMA engine described above.
[0040] The method and chip for improving the QP deregistration performance of an RDMA engine provided in this application have the following beneficial effects:
[0041] In this embodiment, when the RDMA engine processes the queue deregistration command, it does not consider whether the queue has any unreclaimed timer nodes. That is, if the target queue pair uses ACK timer and RNR timer, it does not need to wait for the timer nodes to time out. It directly clears the services corresponding to the target queue on the receiving and sending sides and reclaims the corresponding resources on the receiving and sending sides. This reduces the execution time of the RDMA engine in executing the queue pair deregistration command, allowing the RDMA engine to quickly receive the next queue pair deregistration command. This also allows the sender of the next queue pair deregistration command to complete sending the queue pair deregistration command to the RDMA engine without waiting for a long time, thus improving the QP deregistration performance of the RDMA engine. Attached Figure Description
[0042] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings required in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a structural diagram of an RDMA engine in one embodiment of this application.
[0044] Figure 2 This is a structural diagram of an RDMA engine in another embodiment of this application.
[0045] Figure 3 This is a flowchart of queue pair deregistration for an RDMA engine in one embodiment of this application.
[0046] Figure 4 This is a flowchart illustrating the creation of queue pairs for an RDMA engine in one embodiment of this application. Detailed Implementation
[0047] The detailed description of the accompanying drawings is intended to illustrate some embodiments of this application and is not intended to represent only the forms in which this application can be implemented. It should be understood that the same or equivalent functions can be accomplished by different embodiments intended to be included within the spirit and scope of this application.
[0048] See Figure 1 One embodiment of this application provides an RDMA engine, including an input module, a queue pair deregistration processing module, a sending-side processing module, a receiving-side processing module, and a timer module.
[0049] The input module receives queue pair cancellation commands and forwards them to the queue pair cancellation processing module. Specifically, queue pairs in the RDMA engine are a mechanism for data transmission. RDMA (Remote Direct Memory Access) is a network transmission technology that allows direct reading and writing of data between remote computers without central processing unit intervention. In the RDMA engine, data transmission is achieved through send and receive queue pairs. The send queue stores data to be sent, and the receive queue stores received data. The sender writes the data to be sent into the send queue and then triggers the RDMA operation to transfer the data in the send queue to the target computer's receive queue. The receiver reads the data from the receive queue and stores it in its local memory. The queue size in a queue pair can be configured according to requirements to adapt to different data transmission scenarios. The use of queue pairs can improve data transmission efficiency and performance and reduce CPU load. Since queue pairs consume RDMA engine resources, they need to be cancelled when there is no service. This embodiment includes a queue pair cancellation processing module to cancel queue pairs.
[0050] The queue pair cancellation processing module is used to forward the queue pair cancellation command to the sending-side processing module and the receiving-side processing module when it receives the queue pair cancellation command output by the input module, so as to control the sending-side processing module and the receiving-side processing module to clear the services of the corresponding queue pair and reclaim the corresponding resources.
[0051] The sending-side processing module is used to manage and control the sending queue. In this embodiment, the sending-side processing module is used to determine the target queue pair according to the queue pair cancellation command, clear the services of the target queue pair on the sending side and reclaim resources. When all resources on the sending side are reclaimed, the sending-side cancellation is successful, sending-side cancellation completion information is generated, and the sending-side cancellation completion information is sent to the queue pair cancellation processing module.
[0052] The receiving-side processing module is used to manage and control the receiving queue. In this embodiment, the receiving-side processing module is used to determine the target queue pair according to the queue pair cancellation command, clear the services of the target queue pair on the receiving side and reclaim resources. When all resources on the receiving side are reclaimed, the receiving-side cancellation is successful, receiving-side cancellation completion information is generated, and the receiving-side cancellation completion information is sent to the queue pair cancellation processing module.
[0053] The timer module is used to control and monitor the ACK timer and RNR timer of the target queue pair. For example, it starts the ACK timer or RNR timer. When starting a timer, timer resources need to be requested. Timer resources are managed using linked list nodes, and there is a timer node resource pool. When requesting, a timer node is allocated from the resource pool, and when reclaiming, the timer node is released back to the resource pool. Furthermore, if the ACK timer or RNR timer of the target queue pair times out after the target queue pair is deregistered, the timer event is silently discarded. Therefore, the queue pair has been deregistered at this time. Silently discarding the timer event means ignoring the timer event; no operation is performed when the timer times out. The queue pair deregistration processing module is also used to send queue pair deregistration completion information to the sender of the queue pair deregistration command based on the sending-side deregistration completion information and the receiving-side deregistration completion information, to notify the sender that the queue pair deregistration was successful. Specifically, the deregistration completion information can be the sending-side deregistration completion information and the receiving-side deregistration completion information, or other information generated based on the sending-side deregistration completion information and the receiving-side deregistration completion information.
[0054] In this embodiment, the RDMA engine processes queue deregistration commands without considering whether the queue has any unreclaimed timer nodes, meaning it doesn't need to wait for timer node timeouts, thus reducing the execution time of the RDMA engine for queue deregistration commands. After receiving a queue deregistration command, the RDMA engine's input module forwards it to the queue deregistration processing module. At this point, the queue deregistration processing module doesn't consider whether the target queue has any unreclaimed timer nodes and directly sends the queue deregistration command to the sending-side processing module and the receiving-side processing module. The sending-side and receiving-side processing modules execute the queue deregistration command, clearing the target queue's services and reclaiming the corresponding resources. Therefore, the RDMA engine's input module can quickly receive the next queue deregistration command, allowing the sender of the next queue deregistration command to complete sending the command to the RDMA engine without a long wait, thus improving the RDMA engine's QP deregistration performance.
[0055] In some embodiments, the timer module is further configured to generate a timer timeout notification and send it to the sending-side processing module if the ACK timer or RNR timer of the target queue pair times out after the target queue pair is deregistered.
[0056] The sending-side processing module is further configured to determine that the ACK timer or RNR timer has timed out based on the timer timeout notification, and read the queue pair context of the target queue pair, setting the identifier of the ACK timer or RNR timer that timed out in the queue pair context to 0; wherein, when both the identifier of the ACK timer and the identifier of the RNR timer are 0, it indicates that there are no old timer nodes that have not been recycled.
[0057] Specifically, the RDMA engine records whether ACK and RNR timers have been used within the Queue Pair Context (QPC) using ACK and RNR timer flags. This Queue Pair Context can be read from the QPC Cache within the RDMA engine or from the host-side memory. Since some ACK or RNR timers haven't timed out when the target queue pair is deregistered, some timers are not reclaimed. If an ACK or RNR timer for the target queue pair times out after deregistration, the corresponding timer flag needs to be changed to 0, and the timed-out ACK or RNR timer needs to be deleted to avoid affecting the next queue pair creation. This is because a queue pair can only use one ACK or RNR timer at most. If the ACK or RNR timer flag is 1, it indicates that an ACK or RNR timer is in use.
[0058] More specifically, by checking the QP state in the queue context, which refers to the state of the target pair queue, the QP state of the target pair queue after deregistration should be Reset. Based on the QP state being Reset, the sending-side processing module determines to set the flags of the ACK timer and RNR timer to 0.
[0059] In some embodiments, see Figure 2 The RDMA engine also includes a queue pair creation processing module;
[0060] The input module is also used to receive a queue pair creation command and forward the queue pair creation command to the queue pair creation processing module;
[0061] The queue pair creation processing module is further configured to read the queue pair context of the target queue pair according to the queue pair creation command, determine whether there are any old timer nodes that have not been recycled according to the identifiers of the ACK timer and RNR timer in the queue pair context, and if so, return a creation failure message to the sender of the queue pair creation command; otherwise, create the corresponding queue pair according to the queue pair creation command and return a creation success message to the sender of the queue pair creation command.
[0062] Specifically, as mentioned above, the identifier of the ACK timer or RNR timer of the queue pair affects the creation of the queue pair. That is, when creating a queue pair, it is necessary to consider whether there are old timer nodes that have not been recycled. Specifically, when the identifier of the ACK timer and the identifier of the RNR timer in the context of the queue pair are both 0, it is determined that there are no old timer nodes that have not been recycled. When the identifier of the ACK timer or the identifier of the RNR timer in the context of the queue pair is 1, it is determined that there are old timer nodes that have not been recycled.
[0063] As can be seen from the description of the above embodiments, the RDMA engine of this embodiment does not reclaim the timer node corresponding to the queue pair when the queue pair is deregistered. Instead, it waits for the old timer node to time out and reclaim it when the queue pair is recreated and used. Since there is a cooling-off period from the deregistration of the queue pair to its re-creation and use (which usually exceeds the timeout time of the timer node), the waiting for the old timer node to time out during creation does not affect the performance of the queue pair destruction and creation. That is, this embodiment improves the performance of queue pair deregistration without causing performance loss when the queue pair is reused.
[0064] In this embodiment, the RDMA engine does not reclaim the timer node corresponding to the queue pair when the queue pair is deregistered, thereby improving the performance of queue pair deregistration. Since queue pair deregistration is inevitable in RDMA services, improving the performance of queue pair deregistration can enhance the overall competitiveness of RDMA services.
[0065] See Figure 3 Another embodiment of this application also provides a queue pair management method based on the above-described RDMA engine, the method comprising the following steps:
[0066] Step S11: The input module receives the queue pair cancellation command and forwards the queue pair cancellation command to the queue pair cancellation processing module;
[0067] Step S12: The queue pair cancellation processing module receives and forwards the queue pair cancellation command to the sending-side processing module and the receiving-side processing module;
[0068] Step S13: The sending-side processing module determines the target queue pair according to the queue pair cancellation command, clears the services of the target queue pair on the sending side and reclaims resources, generates sending-side cancellation completion information, and sends the sending-side cancellation completion information to the queue pair cancellation processing module.
[0069] Step S14: The receiving side processing module determines the target queue pair according to the queue pair cancellation command, clears the services of the target queue pair on the receiving side and reclaims resources, generates receiving side cancellation completion information, and sends the receiving side cancellation completion information to the queue pair cancellation processing module.
[0070] Step S15: The queue pair deregistration processing module sends queue pair deregistration completion information to the sender of the queue pair deregistration command based on the sending-side deregistration completion information and the receiving-side deregistration completion information.
[0071] Furthermore, the method also includes:
[0072] Step S16: If the ACK timer or RNR timer of the target queue pair times out after the target queue pair is deregistered, the timer module silently discards the timer event.
[0073] In some embodiments, step S16 further includes:
[0074] If the ACK timer or RNR timer of the target queue pair times out after the target queue pair is deregistered, the timer module generates a timer timeout notification and sends it to the sending side processing module.
[0075] The method further includes:
[0076] Step S17: The sending side processing module determines that the ACK timer or RNR timer has timed out based on the timer timeout notification, and reads the queue pair context of the target queue pair, setting the identifier of the ACK timer or RNR timer that timed out in the queue pair context to 0; wherein, when the identifiers of the ACK timer and the RNR timer are both 0, it indicates that there are no old timer nodes that have not been recycled.
[0077] In some embodiments, the RDMA engine further includes a queue pair creation processing module;
[0078] The method further includes:
[0079] Step S21: The input module receives the queue pair creation command and forwards the queue pair creation command to the queue pair creation processing module;
[0080] Step S22: The queue pair creation processing module reads the queue pair context of the target queue pair according to the queue pair creation command, and determines whether there are any old timer nodes that have not been recycled based on the identifiers of the ACK timer and RNR timer in the queue pair context. If yes, it returns a creation failure message to the sender of the queue pair creation command; otherwise, it creates the corresponding queue pair according to the queue pair creation command and returns a creation success message to the sender of the queue pair creation command.
[0081] In some embodiments, the method specifically includes:
[0082] When both the ACK timer identifier and the RNR timer identifier in the context of the queue are 0, it is determined that there are no old timer nodes that have not been recycled.
[0083] When the identifier of the ACK timer or the identifier of the RNR timer in the context of the queue is 1, it is determined that there are old timer nodes that have not been recycled.
[0084] In some embodiments, the method further includes:
[0085] After receiving the creation failure information, the sender waits for a preset time and then sends the queue pair creation command to the RDMA engine again, that is, it executes the above steps S21 and S22 again until the queue pair is successfully created.
[0086] It should be noted that the methods in the above embodiments correspond to the RDMA engine in the above embodiments. Therefore, the parts of the methods in the above embodiments that are not described in detail can be obtained by referring to the content of the RDMA engine in the above embodiments, and will not be repeated here.
[0087] This application also provides a chip including the RDMA engine described above.
[0088] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or technological improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. An RDMA engine, characterized in that, include: The input module is used to receive queue pair cancellation commands and forward the queue pair cancellation commands to the queue pair cancellation processing module; The queue pair cancellation processing module is used to receive and forward the queue pair cancellation command to the sending-side processing module and the receiving-side processing module. The sending-side processing module is used to determine the target queue pair according to the queue pair cancellation command, clear the service of the target queue pair on the sending side and reclaim the resources, generate sending-side cancellation completion information, and send the sending-side cancellation completion information to the queue pair cancellation processing module. The receiving-side processing module is used to determine the target queue pair according to the queue pair cancellation command, clear the services of the target queue pair on the receiving side and reclaim resources, generate receiving-side cancellation completion information, and send the receiving-side cancellation completion information to the queue pair cancellation processing module. The timer module is used to control and monitor the ACK timer and RNR timer of the target queue pair. If the ACK timer or RNR timer of the target queue pair times out after the target queue pair is deregistered, the timer event is silently discarded, a timer timeout notification is generated and sent to the sending side processing module. The queue pair deregistration processing module is further configured to send queue pair deregistration completion information to the sender of the queue pair deregistration command based on the sending-side deregistration completion information and the receiving-side deregistration completion information, provided that the ACK timer and / or RNR timer of the target queue pair has not expired. The sending-side processing module is further configured to read the queue pair context of the target queue pair according to the timer timeout notification, and set the flag of the ACK timer or RNR timer that timed out in the queue pair context to a state where there are no old timer nodes that have not been recycled.
2. The RDMA engine according to claim 1, characterized in that, The RDMA engine also includes a queue pair creation processing module; The input module is also used to receive a queue pair creation command and forward the queue pair creation command to the queue pair creation processing module; The queue pair creation processing module is further configured to read the queue pair context of the target queue pair according to the queue pair creation command, determine whether there are any old timer nodes that have not been recycled according to the identifiers of the ACK timer and RNR timer in the queue pair context, and if so, return a creation failure message to the sender of the queue pair creation command; otherwise, create the corresponding queue pair according to the queue pair creation command and return a creation success message to the sender of the queue pair creation command.
3. The RDMA engine according to claim 2, characterized in that: When both the ACK timer identifier and the RNR timer identifier in the context of the queue are 0, it is determined that there are no old timer nodes that have not been recycled. When the identifier of the ACK timer or the identifier of the RNR timer in the context of the queue is 1, it is determined that there are old timer nodes that have not been recycled.
4. A queue pair management method for an RDMA engine according to claim 1, characterized in that, The method includes: The input module receives the queue pair cancellation command and forwards the queue pair cancellation command to the queue pair cancellation processing module; The queue pair cancellation processing module receives and forwards the queue pair cancellation command to the sending-side processing module and the receiving-side processing module; The sending-side processing module determines the target queue pair based on the queue pair cancellation command, clears the services of the target queue pair on the sending side and reclaims resources, generates sending-side cancellation completion information, and sends the sending-side cancellation completion information to the queue pair cancellation processing module. The receiving-side processing module determines the target queue pair based on the queue pair cancellation command, clears the services of the target queue pair on the receiving side and reclaims resources, generates receiving-side cancellation completion information, and sends the receiving-side cancellation completion information to the queue pair cancellation processing module. The queue pair deregistration processing module sends queue pair deregistration completion information to the sender of the queue pair deregistration command based on the sending-side deregistration completion information and the receiving-side deregistration completion information; If the ACK timer or RNR timer of the target queue pair times out after the target queue pair is deregistered, the timer module silently discards the timer event, generates a timer timeout notification, and sends it to the sending side processing module. The sending-side processing module reads the queue pair context of the target queue pair according to the timer timeout notification, and sets the flag of the ACK timer or RNR timer that timed out in the queue pair context to a state where there are no old timer nodes that have not been recycled.
5. The method according to claim 4, characterized in that, The RDMA engine also includes a queue pair creation processing module; The method further includes: The input module receives the queue pair creation command and forwards the queue pair creation command to the queue pair creation processing module; The queue pair creation processing module reads the queue pair context of the target queue pair according to the queue pair creation command. Based on the identifiers of the ACK timer and RNR timer in the queue pair context, it determines whether there are any old timer nodes that have not been recycled. If so, it returns a creation failure message to the sender of the queue pair creation command. If not, it creates the corresponding queue pair according to the queue pair creation command and returns a creation success message to the sender of the queue pair creation command.
6. The method according to claim 5, characterized in that, The method specifically includes: When both the ACK timer identifier and the RNR timer identifier in the context of the queue are 0, it is determined that there are no old timer nodes that have not been recycled. When the identifier of the ACK timer or the identifier of the RNR timer in the context of the queue is 1, it is determined that there are old timer nodes that have not been recycled.
7. A chip comprising the RDMA engine according to any one of claims 1 to 3.