Message transmission method based on DPU network card, DPU network card, network equipment and computer storage medium

By obtaining the resource indication information of the receiving end to determine the sending conditions of RDMA messages, it reduces data packet loss and retransmission problems caused by network congestion in the RDMA network, and improves system performance and protocol compatibility.

CN118555249APending Publication Date: 2024-08-27YUSUR TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410770191.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

The data packet loss problem caused by network congestion in the RDMA network, especially the RNR retransmission mechanism when the receiving end is not ready, has an impact on system performance, and the occurrence of retransmissions needs to be reduced.

Method used

By obtaining the resource indication information in the reception confirmation message of the previous RDMA message at the receiving end, calculating the number of remaining message resources, judging whether the sending conditions of the current RDMA message are met, and sending the message to the receiving end when the conditions are met, the realization The receiving end notifies the sending end of the number of supplementary message resources to reduce RDMA message retransmissions.

Benefits of technology

It effectively reduces the occurrence of RDMA message retransmissions, improves system performance, and improves compatibility with the RDMA protocol.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118555249A
    Figure CN118555249A
Patent Text Reader

Abstract

The embodiment of the invention provides a message transmission method based on a DPU network card, the DPU network card, network equipment and a computer storage medium. The message transmission method comprises the steps that a receiving confirmation message sent by a receiving end for a previous RDMA message is acquired, the receiving confirmation message comprises resource indication information, and the resource indication information is used for indicating the number of supplementary message resources of a receiving message queue of the receiving end; calculating the quantity of residual message resources of the receiving end according to the quantity of the supplementary message resources, and judging whether the quantity of the residual message resources meets the sending condition of the current RDMA message or not; and under the condition that the sending condition is satisfied, sending the current RDMA message to the receiving end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a message transmission method based on a DPU network card, a DPU network card, a network device, and a computer storage medium. Background Art

[0002] RDMA (Remote Direct Memory Access) technology is an important supporting technology for implementing DPU (Data Processing Unit) solutions. RDMA allows applications to bypass the operating system kernel protocol stack and directly interact with the network card for network communication, thereby achieving high bandwidth and extremely low latency. In addition, in RDMA, the network card can directly initiate and complete read and write requests to remote memory without the help of remote nodes, which can greatly improve CPU utilization. From the perspective of system software design, RDMA can be directly regarded as a faster network. The current implementations of RDMA mainly include InfiniBand, RoCE (RDMA over Converged Ethernet) and iWARP (Internet Wide Area RDMA Protocol). Among them, RoCE can achieve high-performance data transmission on Ethernet by encapsulating RDMA operations in the Ethernet protocol and is the most widely used.

[0003] With the development of Ethernet, it also has the ability of high bandwidth and low latency, and its latency is close to that of InfiniBand switching performance, so RoCE will become an inevitable result, and the cost of RoCE networking is lower. The reason for data packet loss in RDMA networks is that in the network switch, when the inlet traffic is greater than the bandwidth of the outlet traffic, network congestion will occur, and the newly received data packets will be discarded if the congestion lasts too long. In order to solve the packet loss problem, InfiniBand uses the credit flow control mechanism in the network card; RoCE Ethernet cards need to implement DCB features in the network card and the switch.

[0004] RDMA RNR (Receiver Not Ready) retransmission is an error handling mechanism. When the receiving end is not ready to receive data, the receiving end will send a RNR NAK (Negative Acknowledgement) signal to the sending end, requesting the sending end to retransmit the data.

[0005] Since RNR retransmission is mainly used to solve the situation where the receiving end cannot receive data in time, the RNR retransmission mechanism can ensure the reliable transmission and correctness of data. However, RNR retransmission is a request-response based mechanism, which will have a certain impact on the performance of the system, so it is necessary to reduce the occurrence of RNR retransmission as much as possible. Summary of the invention

[0006] In view of this, an embodiment of the present invention provides a message transmission method based on a DPU network card, a DPU network card, a network device, and a computer storage medium to solve the above problems.

[0007] According to a first aspect of an embodiment of the present invention, a message transmission method based on a DPU network card is provided, comprising: obtaining a reception confirmation message sent by a receiving end for a previous RDMA message, the reception confirmation message including resource indication information, wherein the resource indication information is used to indicate the number of supplementary message resources of a receiving message queue of the receiving end; calculating the number of remaining message resources of the receiving end according to the number of supplementary message resources, and judging whether the number of remaining message resources meets the sending condition of the current RDMA message; and sending the current RDMA message to the receiving end if the sending condition is met.

[0008] In another implementation of the present invention, determining whether the number of remaining message resources meets the sending condition of the current RDMA message includes: determining the number of messages to be sent in the sending message queue where the current RDMA message is located; and when the number of messages to be sent is not greater than the number of remaining message resources, determining that the sending condition of the current RDMA message is met.

[0009] In another implementation of the present invention, determining whether the number of remaining message resources meets the sending condition of the current RDMA message further includes: after the previous RDMA message of the current RDMA message is sent, updating the sending message queue where the current RDMA message is located; and when receiving a reception confirmation message of the previous RDMA message, updating the number of remaining message resources.

[0010] According to a second aspect of an embodiment of the present invention, a message transmission method based on a DPU network card is provided, comprising: receiving a previous RDMA message; generating resource indication information according to the number of supplementary message resources of a receiving message queue; including the resource indication information in a reception confirmation message of the previous RDMA message; and sending the reception confirmation message to a sending end.

[0011] In another implementation of the present invention, the method further includes: when the remaining message resource data of the receiving message queue is insufficient for receiving the current RDMA message, triggering the configuration interface of the receiving message queue to obtain the number of supplementary message resources pre-configured via the configuration interface.

[0012] In another implementation of the present invention, the method further includes: when the current RDMA message sent by the sender is not received, when the preset timeout period of the timeout timer arrives, resending the reception confirmation message to the sender, wherein the preset timeout period is less than the retransmission trigger period of the RDMA message.

[0013] In another implementation of the present invention, the method further includes: upon receiving a current RDMA message sent by the sending end, setting the timeout timer to a disabled state, and updating the next RDMA message to the current RDMA message.

[0014] In another implementation of the present invention, the method further includes: when the remaining message resource data of the receiving message queue is insufficient, setting the timeout timer to an enabled state.

[0015] According to a third aspect of an embodiment of the present invention, a DPU network card is provided, comprising: a receiving module, which obtains a reception confirmation message sent by a receiving end for a previous RDMA message, the reception confirmation message including resource indication information, wherein the resource indication information is used to indicate the number of supplementary message resources of a receiving message queue of the receiving end; a judging module, which calculates the number of remaining message resources of the receiving end according to the number of supplementary message resources, and judges whether the number of remaining message resources meets the sending condition of the current RDMA message; and a sending module, which sends the current RDMA message to the receiving end if the sending condition is met.

[0016] According to a fourth aspect of an embodiment of the present invention, a DPU network card is provided, comprising: a receiving module, which receives a previous RDMA message; a generating module, which generates resource indication information according to the number of supplementary message resources of a receiving message queue; and a sending module, which includes the resource indication information in a reception confirmation message of the previous RDMA message, and sends the reception confirmation message to a sending end.

[0017] According to a fifth aspect of an embodiment of the present invention, there is provided a network device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the method described in the first aspect or the second aspect.

[0018] According to a sixth aspect of an embodiment of the present invention, there is provided a computer storage medium on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect or the second aspect is implemented.

[0019] According to a seventh aspect of an embodiment of the present invention, a computer program product is provided, comprising computer instructions, which, when executed by a processor, implement the method described in the first aspect or the second aspect.

[0020] In the solution of the embodiment of the present invention, the receiving end can obtain the number of supplementary message resources, and multiplex the reception confirmation message of the RDMA message, so as to realize the notification of the number of supplementary message resources of the receiving end to the sending end, and timely meet the sending conditions of the current RDMA message to the receiving end through the number of supplementary message resources, which greatly reduces the occurrence of RDMA message retransmission and improves the performance of the system. In addition, multiplexing the RDMA message realizes the notification of the number of supplementary message resources of the receiving end to the sending end, and improves the compatibility with the RDMA protocol. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0022] Figure 1 Schematic interactive diagram of some example RDMA protocol message flow control schemes.

[0023] Figure 2 The present invention is a flowchart of the steps of the message transmission method according to some embodiments of the present invention.

[0024] Figure 3 The present invention is a flowchart of the steps of the message transmission method according to some other embodiments of the present invention.

[0025] Figure 4 Schematic interaction diagram of message transmission methods according to other embodiments of the present invention.

[0026] Figure 5 is a structural block diagram of a DPU network card according to some other embodiments of the present invention.

[0027] Figure 6 is a structural block diagram of a DPU network card according to some other embodiments of the present invention.

[0028] Figure 7 Schematic diagram of the structure of network devices according to some other embodiments of the present invention. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in the field based on the embodiments in the embodiments of the present invention should fall within the scope of protection of the embodiments of the present invention.

[0030] The specific implementation of the embodiment of the present invention is further described below in conjunction with the accompanying drawings of the embodiment of the present invention.

[0031] Generally speaking, RDMA RNR (Receiver Not Ready) retransmission is an error handling mechanism. When the receiving end is not ready to receive data, the receiving end will send a RNR NAK (Negative Acknowledgement) signal to the sending end, requesting the sending end to retransmit the data.

[0032] During the RNR retransmission process, the sender sends data to the receiver. The receiver detects that it is not ready to receive data and sends an RNR NAK to the sender. After receiving the RNR NAK, the sender stops sending data and waits for the receiver to be ready. Once the receiver is ready to receive data, the sender continues to send the previously unfinished transmission and retransmits the previously interrupted data as needed.

[0033] Since RNR retransmission is mainly used to solve the situation where the receiving end cannot receive data in time, the RNR retransmission mechanism can ensure the reliable transmission and correctness of data. However, RNR retransmission is a request-response based mechanism, which will have a certain impact on the performance of the system, so it is necessary to reduce the occurrence of RNR retransmission as much as possible.

[0034] Figure 1 Schematic diagram of some example RDMA protocol message flow control schemes. Figure 1In the example flow control scheme, node A executes, when it is determined that the sending memory unit usage counter is not zero, a data packet is sent to the other node, and the count in the sending memory unit usage counter is reduced by a predetermined step size, and when it is determined that the sending memory unit usage counter is zero, the sending of data packets is stopped, and when receiving the flow control data packet sent by the other node, the sending memory unit usage counter is reset to the number of sending memory units used, and a new sending is started; when it is determined that the receiving memory unit usage counter is not zero, the data packet sent by the other node is received, and the count in the receiving memory unit usage counter is reduced by a predetermined step size, and when it is determined that the receiving memory unit usage counter is zero, the receiving of data packets from the other node is stopped, a flow control data packet is sent to the other node, the receiving memory unit usage counter is reset to the number of receiving memory units used, and a new receiving is started.

[0035] like Figure 1 As shown, the receiving end and the sending end initially maintain 120 memory unit counts. Every time the sending end sends 4K data (corresponding to one memory unit), the sending end count decreases by 1. Every time the receiving end successfully receives 4K data, the receiving end count decreases by 1. When the sending end uses up 120 memory units, it stops sending. When the receiving end uses up 120 memory units, it actively sends a flow control data packet to the sending end and resets its own memory unit count to 120. After receiving the flow control data packet, the receiving end resets its own memory unit count to 120 and starts the next round of data transmission.

[0036] Since the sender and the receiver each maintain a counter with the same initial value, which is used to determine the number of memory units received by the receiver, the sender reduces the counter count after sending the data packet, and the receiver reduces the counter count after successful reception. When the receiver counter is cleared, it actively sends a flow control message to the sender to reset the counters of both parties, thereby starting the next round of data transmission.

[0037] For devices implemented according to the standard RDMA protocol, user behavior is undefined. That is, when performing RDMA data transmission according to the patented solution, after the receiving end actively sends a flow control message, it does not mean that the user has replenished the receiving queue memory unit, so more configuration changes need to be performed.

[0038] The following will be combined Figure 2 The message transmission methods according to some embodiments of the present invention are described. Figure 2 The message transmission method can be applied to the DPU network card, and the message transmission method includes:

[0039] S210: Obtain a reception confirmation message sent by the receiving end for a previous RDMA message, wherein the reception confirmation message includes resource indication information, wherein the resource indication information is used to indicate the number of supplementary message resources of the receiving message queue of the receiving end.

[0040] It should be understood that the RDMA message is a message that satisfies the RDMA protocol. In addition, the previous RDMA message is the previous RDMA message of the current RDMA message in the same message queue, and may also be other previous RDMA messages in the same message queue.

[0041] It should also be understood that when the sending condition of the current RDMA message is not met, the receiving end may obtain the reception confirmation message sent by the receiving end for the previous RDMA message, so as to obtain the resource indication information in time. In addition, when the sending condition of the current RDMA message is met, the receiving end may obtain the reception confirmation message sent by the receiving end for the previous RDMA message, so as to obtain the resource indication information more reliably and in time.

[0042] It should also be understood that the reception confirmation message may be an ACK message required by the RDMA protocol, and the resource indication information represents the number of supplementary message resources, or the resource indication information and the number of supplementary message resources may have a preset mapping relationship, and the receiving end writes the resource indication information representing the number of supplementary message resources into the reception confirmation message, or searches for the preset mapping relationship and writes the resource indication information corresponding to the number of supplementary message resources into the reception confirmation message. In some examples, the resource indication information may be the number of supplementary message resources. In addition, the resource indication information may be written into a reserved field of the reception confirmation message.

[0043] It should also be understood that the mechanism of receiving the message queue and the mechanism of sending the message queue may follow the RDMA protocol.

[0044] S220: Calculate the number of remaining message resources at the receiving end according to the number of supplementary message resources, and determine whether the number of remaining message resources meets the sending condition of the current RDMA message.

[0045] It should be understood that the remaining message resource quantity may be calculated by summing the remaining message resource quantity before the reception confirmation message is received and the supplementary message resource quantity, that is, the remaining message resource quantity may be updated after the reception confirmation message is received.

[0046] S230: When the sending condition is met, the current RDMA message is sent to the receiving end.

[0047] It should be understood that in some examples, when the number of remaining message resources is not less than the verified number of messages to be sent, it is considered that the sending condition of the current RDMA message is met. For example, the number of remaining message resources is verified once every N messages are sent, then if the number of remaining message resources is not less than N, it is considered that at least N RDMA messages can be sent in the sending message queue.

[0048] In the solution of the embodiment of the present invention, the receiving end can obtain the number of supplementary message resources, and multiplex the reception confirmation message of the RDMA message, so as to realize the notification of the number of supplementary message resources of the receiving end to the sending end, and timely meet the sending conditions of the current RDMA message to the receiving end through the number of supplementary message resources, which greatly reduces the occurrence of RDMA message retransmission and improves the performance of the system. In addition, multiplexing the RDMA message realizes the notification of the number of supplementary message resources of the receiving end to the sending end, and improves the compatibility with the RDMA protocol.

[0049] In some embodiments, as an example of determining whether the number of remaining message resources meets the sending conditions of the current RDMA message, the number of messages to be sent in the sending message queue where the current RDMA message is located can be determined, and then, when the number of messages to be sent is not greater than the number of remaining message resources, it is determined that the sending conditions of the current RDMA message are met.

[0050] That is to say, according to the RDMA protocol, the receiving end can carry the local Credits information in the ACK message header to feedback the current receiving end receiving queue resource situation to the sending end. More specifically, taking the sending process as an example, each time the sending end sends an RDMA message, the SSN (Send Sequence Number) count is increased by 1, and each time an ACK carrying Credits information is received, the LSN (Limit Sequence Number) count is increased by the number corresponding to Credits. Before the sending end sends an RDMA message each time, the SSN count in the next to-be-sent WQE (Work Queue Entry) will be judged. If SSN>LSN, it indicates that the receiving end receiving queue resources are insufficient at this time, and the sending end will immediately stop scheduling. That is to say, the sending sequence count is an example of the number of messages to be sent in the sending message queue, and the remaining sequence count is an example of the number of remaining message resources. The number of messages to be sent and the number of remaining message resources are both examples of queue management information.

[0051] In other embodiments, when determining whether the number of remaining message resources meets the sending conditions of the current RDMA message, the sending message queue where the current RDMA message is located can be updated after the previous RDMA message of the current RDMA message is sent, and then, when the reception confirmation message of the previous RDMA message is received, the number of remaining message resources is updated.

[0052] That is, each time the receiving end receives an RDMA message, it will consume a receiving queue resource. When the receiving queue resources are exhausted and (for example, the user) does not replenish them, it will feedback to the sending end through ACK that the receiving queue resources are insufficient at this time, and the sending end will stop scheduling to trigger RDMA retransmission. (For example, the user) can replenish the receiving queue resources by calling ibv_post_recv (that is, the verbs interface).

[0053] Alternatively, when the receiving queue resources of the receiving end are exhausted, (for example, the user) pre-replenishes the receiving queue resources through ibv_post_recv, that is, when the available resources of the receiving queue change from 0 to 1, after waiting for the request period (for example, 1us, which can be configured by the user), the receiving end will actively send a flow control ACK message (recorded as FC_ACK, Flow Control ACK) according to the number of receiving queue resources replenished in the request period, and the PSN in the FC_ACK message is consistent with the ACK message successfully sent by the receiving end, or the last sent ACK message is used as the FC_ACK message. In other words, the Credits information field in the message will be updated according to the number of currently replenished receiving queue resources, notifying the sending end that the current receiving queue resources are sufficient and data transmission can continue.

[0054] The following will be combined Figure 3 The message transmission methods according to other embodiments of the present invention are described. Figure 3 The message transmission method can be applied to the DPU network card, and the message transmission method includes:

[0055] S310: Receive the previous RDMA message.

[0056] It should be understood that the RDMA message is a message that satisfies the RDMA protocol. In addition, the previous RDMA message is the previous RDMA message of the current RDMA message in the same message queue, and may also be other previous RDMA messages in the same message queue.

[0057] S320: Generate resource indication information according to the number of supplementary message resources of the received message queue.

[0058] It should be understood that when the remaining message resources of the received message queue are insufficient, the supplementary message resource quantity can be obtained. The supplementary message resource quantity can be considered to be a supplement to the remaining message resource quantity before receiving the previous RDMA message (for example, the remaining message resource quantity can be 0).

[0059] It should also be understood that the reception confirmation message may be an ACK message required by the RDMA protocol, and the resource indication information represents the number of supplementary message resources, or the resource indication information and the number of supplementary message resources may have a preset mapping relationship.

[0060] S330: Include the resource indication information in the reception confirmation message of the previous RDMA message.

[0061] It should be understood that the receiving end writes the resource indication information representing the number of supplementary message resources into the reception confirmation message, or searches for a preset mapping relationship and writes the resource indication information corresponding to the number of supplementary message resources into the reception confirmation message. In some examples, the resource indication information may be the number of supplementary message resources. In addition, the resource indication information may be written into a reserved field of the reception confirmation message.

[0062] S340: Send a reception confirmation message to the sending end.

[0063] In the solution of the embodiment of the present invention, the receiving end can obtain the number of supplementary message resources, and multiplex the reception confirmation message of the RDMA message, so as to realize the notification of the number of supplementary message resources of the receiving end to the sending end, and timely meet the sending conditions of the current RDMA message to the receiving end through the number of supplementary message resources, which greatly reduces the occurrence of RDMA message retransmission and improves the performance of the system. In addition, multiplexing the RDMA message realizes the notification of the number of supplementary message resources of the receiving end to the sending end, and improves the compatibility with the RDMA protocol.

[0064] In other embodiments, the operation of the receiving end further includes: when the remaining message resource data of the receiving message queue is insufficient for receiving the current RDMA message, triggering the configuration interface of the receiving message queue to obtain the number of supplementary message resources pre-configured via the configuration interface.

[0065] That is, when the receiving queue resources are exhausted, (for example, the user) pre-replenishes the receiving queue resources through ibv_post_recv, that is, when the available resources of the receiving queue change from 0 to 1, after waiting for the request period (for example, 1us, which can be configured by the user), the receiving end will actively send a flow control ACK message (recorded as FC_ACK, Flow Control ACK) according to the number of receiving queue resources replenished during the request period. The PSN in the FC_ACK message is consistent with the last successfully sent ACK message by the receiving end, or the last sent ACK message is used as the FC_ACK message. In other words, the Credits information field in the message will be updated according to the current number of replenished receiving queue resources, notifying the sending end that the current receiving queue resources are sufficient and data transmission can continue.

[0066] In some other embodiments, the operation of the receiving end further includes: after the receiving end sends the FC_ACK message, if the message is not correctly delivered to the sending end, the sending end cannot perceive that the receiving end has replenished the receiving queue resources and cannot restart the sending schedule. Therefore, after the receiving end sends the FC_ACK, the timeout timer will be started.

[0067] Without loss of generality, in the case where the current RDMA message sent by the sender is not received, when the preset timeout period of the timeout timer arrives, the reception confirmation message is resent to the sender, wherein the preset timeout period is less than the retransmission trigger period of the RDMA message. For example, the preset timeout period is equal to the retransmission trigger period of the RDMA message multiplied by a coefficient less than 1. More specifically, the timeout time T of the timeout timer can be freely configured by the user, and its default value is set to:

[0068] T = MAX (e.g., 0.2*RNR timeout);

[0069] Among them, RNR timeout is the length of the RNR retransmission trigger period specified by the user. When the timeout timer expires, the receiving end will send FC_ACK again. If the user supplements more receiving queue message resources through ibv_post_recv within the time interval T, the Credits information in FC_ACK is updated based on the supplemented message resources.

[0070] In some other embodiments, the operation of the receiving end further includes:

[0071] When the current RDMA message sent by the sender is received, the timeout timer is set to disabled state, and the next RDMA message is updated to the current RDMA message. That is to say, when the receiver receives a new RDMA message after sending FC_ACK, it indicates that the sender is aware of the receiving queue resource situation at this time, and the receiver immediately cancels the timeout timer and starts a new round of RDMA data transmission according to the normal process.

[0072] In some other embodiments, the operation of the receiving end further includes: when the remaining message resource data of the receiving message queue is insufficient, setting the timeout timer to an enabled state. That is, when the receiving end sends FC_ACK, if no new RDMA message is received, indicating that the sending end is not aware of the receiving queue resource status at this time, the receiving end enables the timeout timer.

[0073] Figure 4 Schematic interactive diagram of message transmission methods of other embodiments of the present invention. Figure 4 As shown, both the receiving end 42 and the sending end 41 can be DPU network cards. The DPU network card of the receiving end 41 and the DPU network card of the sending end 42 can be two adjacent nodes in the RDMA message transmission link.

[0074] The message transmission method performed by the sending end 41 includes the following steps:

[0075] Step S411: Based on the queue management information maintained by the sending end, determine whether the number of remaining resources of the receiving message queue is sufficient? If yes, execute step S414; if no, execute step S412. It should be understood that the queue management information indicates the queue status of the receiving message queue and the queue status of the sending message queue. The sending end can determine whether the remaining resources of the receiving message queue are sufficient by comparing the difference between the number of remaining message resources of the receiving message queue and the number of messages to be sent in the sending message queue. That is to say, in this example, when the sending condition of the current RDMA message is not met, the receiving confirmation message sent by the receiving end for the previous RDMA message is obtained. Alternatively, when the sending condition of the current RDMA message is met, the receiving confirmation message sent by the receiving end for the previous RDMA message is obtained.

[0076] Step S412: suspend the sending of the current RDMA message, and wait or request resource indication information from the receiving end.

[0077] Step S413: Receive a flow control message and obtain resource indication information. It should be understood that the previous RDMA message can be used as a flow control message for the current RDMA message. It should be understood that the number of remaining message resources at the receiving end can also be calculated based on the number of supplementary message resources, and it is determined whether the number of remaining message resources meets the sending conditions of the current RDMA message.

[0078] Step S414: Execute sending of the current RDMA message. Without loss of generality, when the current RDMA sending condition is met, the current RDMA message is sent to the receiving end.

[0079] Accordingly, the message transmission method performed by the receiving end 42 includes the following steps:

[0080] Step S421: when the remaining resource quantity of the receiving message queue is insufficient for the current RDMA message, wait for replenishment of the message resource quantity.

[0081] Step S422: Generate a flow control message according to the number of supplementary message resources, and send the flow control message to the sender. It should be understood that, without loss of generality, resource indication information is generated according to the number of supplementary message resources of the receive message queue, and then the resource indication information is included in the reception confirmation message of the previous RDMA message, and then the reception confirmation message is sent to the sender.

[0082] Step S423: After sending the flow control message, monitor whether the current RDMA message is received. If yes, execute step S424; if no, execute step S425.

[0083] Step S424: Determine whether the remaining resources in the receive message queue are sufficient for the next RDMA message.

[0084] Step S425: Determine whether the timeout timer reaches the preset timeout period. If it reaches the preset timeout period, execute step S422.

[0085] It should be understood that in step S422, the receiving end 42 sends a flow control message to the sending end 41, and in step S413, the sending end 41 receives the flow control message from the receiving end 42, that is, step S422 and step S413 are corresponding operations.

[0086] The following will be combined Figure 5 The DPU network card according to some other embodiments of the present invention is described. Figure 5 The DPU network cards include:

[0087] The receiving module 510 obtains a reception confirmation message sent by the receiving end for a previous RDMA message, wherein the reception confirmation message includes resource indication information, wherein the resource indication information is used to indicate the number of supplementary message resources of the receiving message queue of the receiving end;

[0088] The judgment module 520 calculates the number of remaining message resources of the receiving end according to the number of supplementary message resources, and judges whether the number of remaining message resources meets the sending condition of the current RDMA message;

[0089] The sending module 530 sends the current RDMA message to the receiving end when the sending condition is met.

[0090] In the solution of the embodiment of the present invention, the receiving end can obtain the number of supplementary message resources, and multiplex the reception confirmation message of the RDMA message, so as to realize the notification of the number of supplementary message resources of the receiving end to the sending end, and timely meet the sending conditions of the current RDMA message to the receiving end through the number of supplementary message resources, which greatly reduces the occurrence of RDMA message retransmission and improves the performance of the system. In addition, multiplexing the RDMA message realizes the notification of the number of supplementary message resources of the receiving end to the sending end, and improves the compatibility with the RDMA protocol.

[0091] In some other embodiments, the judgment module is specifically used to: determine the number of to-be-sent messages in the sending message queue where the current RDMA message is located; and when the number of to-be-sent messages is not greater than the number of remaining message resources, determine that the sending condition of the current RDMA message is met.

[0092] In some other embodiments, the judgment module is further used to: update the sending message queue where the current RDMA message is located after the previous RDMA message of the current RDMA message is sent; and update the remaining message resource quantity when receiving the reception confirmation message of the previous RDMA message.

[0093] The following will be combined Figure 6 The DPU network card according to some other embodiments of the present invention is described. Figure 6 The DPU network cards include:

[0094] The receiving module 610 receives the previous RDMA message;

[0095] A generating module 620 generates resource indication information according to the number of supplementary message resources of the received message queue;

[0096] The sending module 630 includes the resource indication information in a reception confirmation message of the previous RDMA message, and sends the reception confirmation message to the sending end.

[0097] In the solution of the embodiment of the present invention, the receiving end can obtain the number of supplementary message resources, and multiplex the reception confirmation message of the RDMA message, so as to realize the notification of the number of supplementary message resources of the receiving end to the sending end, and timely meet the sending conditions of the current RDMA message to the receiving end through the number of supplementary message resources, which greatly reduces the occurrence of RDMA message retransmission and improves the performance of the system. In addition, multiplexing the RDMA message realizes the notification of the number of supplementary message resources of the receiving end to the sending end, and improves the compatibility with the RDMA protocol.

[0098] In other embodiments, the DPU network card also includes an acquisition module, which triggers the configuration interface of the receive message queue when the remaining message resource data of the receive message queue is insufficient for receiving the current RDMA message, and obtains the number of supplementary message resources pre-configured via the configuration interface.

[0099] In some other embodiments, the DPU network card also includes: a retransmission module, which, when the current RDMA message sent by the sender is not received, resends the reception confirmation message to the sender when the preset timeout period of the timeout timer is reached, wherein the preset timeout period is smaller than the retransmission trigger period of the RDMA message.

[0100] In some other embodiments, the DPU network card further includes: a timer module, which sets the timeout timer to a disabled state and updates the next RDMA message to the current RDMA message when receiving the current RDMA message sent by the sender.

[0101] In some other embodiments, the timer module is specifically used to: when the remaining message resource data of the received message queue is insufficient, set the timeout timer to an enabled state.

[0102] It should be understood that the specific implementation of each module in the DPU network card can refer to the corresponding description of the corresponding steps in the above method embodiment, and has corresponding beneficial effects, which will not be repeated here. Technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working process of the DPU network card and module described above can refer to the corresponding process description in the above method embodiment, which will not be repeated here.

[0103] Reference Figure 7 , shows a schematic diagram of the structure of a network device according to another embodiment of the present invention. The specific embodiment of the present invention does not limit the specific implementation of the network device.

[0104] like Figure 7 As shown, the network device may include: a processor (processor) 702 for executing a program 710 , a communication interface (Communications Interface) 704 , a memory (memory) 706 , and a communication bus 708 .

[0105] The processor, the communication interface, and the memory communicate with each other via a communication bus.

[0106] Communication interface, used to communicate with other network devices or servers.

[0107] The processor is used to execute the program, and specifically can execute the relevant steps in the above method embodiment.

[0108] Specifically, the program may include program codes including computer operation instructions.

[0109] The processor may be a CPU, or an application specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0110] The memory is used to store programs. The memory may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.

[0111] The program may include multiple computer instructions. Specifically, the program may enable the processor to execute the message transmission method based on the DPU network card described in any of the aforementioned method embodiments through multiple computer instructions.

[0112] The specific implementation of each step in the program can refer to the corresponding description of the corresponding steps, modules or units in the above method embodiments, and has corresponding beneficial effects, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described device, equipment or module can refer to the corresponding process description in the above method embodiments, which will not be repeated here.

[0113] The embodiment of the present invention further provides a computer storage medium on which a computer program is stored, and when the program is executed by a processor, the method described in any of the above-mentioned multiple method embodiments is implemented. The computer storage medium includes, but is not limited to: a compact disc read-only memory (CD-ROM), a random access memory (RAM), a floppy disk, a hard disk or a magneto-optical disk, etc.

[0114] An embodiment of the present invention further provides a computer program product, including computer instructions, which instruct a computing device to execute the message transmission method based on the DPU network card in the above-mentioned multiple method embodiments.

[0115] In addition, it should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used to train the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant regulations and standards, and corresponding operation entrances are provided for users to choose to authorize or refuse.

[0116] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present invention can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present invention.

[0117] The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk or magneto-optical disk), or implemented as a computer code originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor or programmable or dedicated hardware (such as an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA)). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., a random access memory (RAM), a read-only memory (ROM), a flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown here, the execution of the code converts the general-purpose computer into a dedicated computer for executing the method shown here.

[0118] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present invention.

[0119] The above implementation methods are only used to illustrate the embodiments of the present invention, and are not intended to limit the embodiments of the present invention. Ordinary technicians in the relevant technical field may make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present invention. The patent protection scope of the embodiments of the present invention should be defined by the claims.

Claims

1. A message transmission method based on a DPU network card, characterized in that: include: Obtaining a reception confirmation message sent by the receiving end for a previous RDMA message, wherein the reception confirmation message includes resource indication information, wherein the resource indication information is used to indicate the number of supplementary message resources of a receiving message queue of the receiving end; Calculating the number of remaining message resources at the receiving end according to the number of supplementary message resources, and determining whether the number of remaining message resources meets the sending condition of the current RDMA message; When the sending condition is met, the current RDMA message is sent to the receiving end.

2. The method according to claim 1, characterized in that Determining whether the remaining number of message resources meets the sending condition of the current RDMA message includes: Determine the number of messages to be sent in the sending message queue where the current RDMA message is located; When the number of the to-be-sent messages is not greater than the number of the remaining message resources, it is determined that the sending condition of the current RDMA message is met.

3. The method according to claim 2, characterized in that Determining whether the remaining number of message resources meets the sending condition of the current RDMA message also includes: After the previous RDMA message of the current RDMA message is sent, updating the sending message queue where the current RDMA message is located; When a reception confirmation message of the previous RDMA message is received, the remaining message resource quantity is updated.

4. A message transmission method based on a DPU network card, characterized in that: include: Receive the previous RDMA message; Generate resource indication information according to the number of supplementary message resources of the receiving message queue; Including the resource indication information in a reception confirmation message of the previous RDMA message; Send the reception confirmation message to the sending end.

5. The method according to claim 4, characterized in that The method further comprises: When the remaining message resource data of the receiving message queue is insufficient for receiving the current RDMA message, the configuration interface of the receiving message queue is triggered to obtain the number of supplementary message resources pre-configured via the configuration interface.

6. The method according to claim 5, characterized in that The method further comprises: In the case that the current RDMA message sent by the sender is not received, when the preset timeout period of the timeout timer arrives, the reception confirmation message is resent to the sender, wherein the preset timeout period is smaller than the retransmission trigger period of the RDMA message.

7. The method according to claim 6, characterized in that The method further comprises: When the current RDMA message sent by the sending end is received, the timeout timer is set to a disabled state, and the next RDMA message is updated to the current RDMA message.

8. The method according to claim 7, characterized in that The method further comprises: When the remaining message resource data of the receiving message queue is insufficient, the timeout timer is set to an enabled state.

9. A DPU network card, characterized in that: include: A receiving module, which obtains a reception confirmation message sent by a receiving end for a previous RDMA message, wherein the reception confirmation message includes resource indication information, wherein the resource indication information is used to indicate the number of supplementary message resources of a receiving message queue of the receiving end; A judgment module, calculating the number of remaining message resources of the receiving end according to the number of supplementary message resources, and judging whether the number of remaining message resources meets the sending condition of the current RDMA message; A sending module sends the current RDMA message to the receiving end when the sending condition is met.

10. A DPU network card, characterized in that: include: The receiving module receives the previous RDMA message; A generating module, generating resource indication information according to the number of supplementary message resources of the receiving message queue; The sending module includes the resource indication information in a reception confirmation message of the previous RDMA message, and sends the reception confirmation message to the sending end.

11. A network device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the method according to any one of claims 1-8.

12. A computer storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Cited By

  • Communication method and system, computer equipment, computer readable storage medium and computer program product

    CN119520422A

  • Communication method, system, computer device, computer readable storage medium and computer program product

    CN119520422B