DPU-based message timeout time determination method and device

The remote direct memory access driver module in the DPU dynamically adjusts the timeout time according to the sending and receiving timestamps of message messages, solving the problem of low transmission efficiency caused by fixed timeout time in the prior art, and improving the transmission efficiency of remote direct memory access .

CN119094092APending Publication Date: 2024-12-06YUSUR TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411264201.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing packet retransmission process relies on user configuration, resulting in a fixed timeout and inflexible retransmission timing, which affects the transmission efficiency of remote direct memory access.

Method used

The remote direct memory access driver module in the DPU sends message messages, and dynamically adjusts the timeout time according to the sending and receiving timestamps, improving the flexibility of the timeout time and transmission efficiency.

Benefits of technology

The timeout time is adjusted according to actual conditions, which improves the transmission efficiency of remote direct memory access, and avoids the problem of too long or too short timeout waiting time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094092A_ABST
    Figure CN119094092A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a DPU-based message timeout time determination method and device, and relates to the technical field of DPU. The method comprises the following steps: in response to a calling operation of calling a preset interface by a user, triggering a remote direct memory access driving module in a DPU to send a first message to a receiving end, and obtaining a first sending timestamp; if the first acknowledgement character is received within the first timeout time, acquiring a first receiving timestamp; and determining a second timeout time according to the first sending timestamp and the first receiving timestamp. By the adoption of the technical scheme, the timeout time can be adjusted according to the actual situation, the flexibility of the timeout time is improved, and the transmission efficiency of remote direct memory access is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The disclosed embodiments relate to the field of DPU technology, and more particularly to a method and device for determining a message timeout period based on a DPU. Background Art

[0002] The growing scale and complexity of high-performance computers has made network reliability a key factor. Reliable transmission means that the transport layer uses some mechanisms to ensure that the data packets sent can be received normally. The upper-layer application does not need to worry about packet loss or retransmission. It only needs to configure the number of retries and timeouts. After the bottom layer detects packet loss, it triggers the retransmission mechanism to retransmit the message.

[0003] However, the current message retransmission process has the following problems: first, it depends on user configuration, and the remote direct memory access transmission efficiency is not high; second, the timeout period is fixed and the retransmission timing is not flexible.

[0004] Therefore, there is an urgent need for a DPU-based message timeout determination method that can adjust the timeout according to actual conditions, improve the flexibility of the timeout, and improve the transmission efficiency of remote direct memory access. Summary of the invention

[0005] In order to solve the above technical problem or at least partially solve the above technical problem, the embodiments of the present disclosure provide a method and device for determining a message timeout period based on a DPU.

[0006] A first aspect of an embodiment of the present disclosure provides a method for determining a message timeout based on a DPU, which is applied to a sending end. The method includes:

[0007] In response to a user calling operation of a preset interface, a remote direct memory access driver module in the DPU is triggered to send a first message to a receiving end, and obtain a first sending timestamp; wherein the first message carries a first confirmation character; the first confirmation character is sent by the receiving end to the sending end after receiving the first message; the first sending timestamp is used to represent the time when the sending end sends the first message;

[0008] If the first confirmation character is received within the first timeout period, a first receiving timestamp is obtained; wherein the first timeout period is pre-configured by the user; and the first receiving timestamp is used to indicate the time when the sending end receives the first confirmation character;

[0009] A second timeout period is determined based on the first sending timestamp and the first receiving timestamp; wherein the second timeout period is used to represent the longest time for the second message to be sent from the sending end to the receiving end and for the receiving end to feed back a second confirmation character to the sending end; wherein the second message carries the second confirmation character; and the value of the second timeout period is less than the value of the first timeout period.

[0010] In one example, determining a second timeout period according to the first sending timestamp and the first receiving timestamp includes:

[0011] Determining a first round trip time according to a difference between the first sending timestamp and the first receiving timestamp;

[0012] A second timeout period is determined according to the first round-trip time and a preset parameter; wherein the preset parameter is used to adjust the value of the first round-trip time.

[0013] In one example, determining the second timeout period according to the first round-trip time and a preset parameter includes:

[0014] Calculate the product of the first round-trip time and the preset parameter to obtain an adjustment parameter;

[0015] The sum of the first round-trip time and the adjustment parameter is calculated to obtain the second timeout time.

[0016] In one example, after determining the second timeout period according to the first sending timestamp and the first receiving timestamp, the method further includes:

[0017] Sending the second message to the receiving end based on the remote direct memory access driver module in the DPU, and obtaining a second sending timestamp; wherein the second sending timestamp is used to represent the time when the sending end sends the second message;

[0018] If the second confirmation character is received within the second timeout period, a second receiving timestamp is obtained; wherein the second receiving timestamp is used to indicate the time when the transmitting end receives the second confirmation character;

[0019] A third timeout period is determined according to the second sending timestamp and the second receiving timestamp; a value of the third timeout period is smaller than a value of the first timeout period.

[0020] In one example, after obtaining the second sending timestamp, the method further includes:

[0021] If the second confirmation character is not received within the second timeout period, resending the second message;

[0022] If the second confirmation character is received within the second timeout period, a third receiving timestamp is obtained; wherein the third receiving timestamp is used to indicate the time when the transmitting end receives the second confirmation character;

[0023] A fourth timeout period is determined according to the second sending timestamp and the third receiving timestamp; a value of the fourth timeout period is smaller than a value of the first timeout period.

[0024] In one example, after obtaining the first sending timestamp, the method further includes:

[0025] If the first confirmation character is not received within the first timeout period, the first message is resent.

[0026] In one example, the data volume of the first message is smaller than a threshold; the data volume of the second message is smaller than a threshold.

[0027] A second aspect of an embodiment of the present disclosure provides a DPU-based message timeout determination device, which is applied to a sending end, and includes:

[0028] A first acquisition module, configured to trigger a remote direct memory access driver module in the DPU to send a first message to a receiving end in response to a user calling a preset interface, and to obtain a first sending timestamp; wherein the first message carries a first confirmation character; the first confirmation character is sent by the receiving end to the sending end after receiving the first message; the first sending timestamp is used to indicate the time when the sending end sends the first message;

[0029] A second acquisition module is configured to acquire a first receiving timestamp if the first confirmation character is received within a first timeout period; wherein the first timeout period is pre-configured by the user; and the first receiving timestamp is used to indicate the time when the transmitting end receives the first confirmation character;

[0030] A first determination module is used to determine a second timeout period according to the first sending timestamp and the first receiving timestamp; wherein the second timeout period is used to represent the longest time for the second message to be sent from the sending end to the receiving end and for the receiving end to feed back a second confirmation character to the sending end; wherein the second message carries the second confirmation character; and the value of the second timeout period is less than the value of the first timeout period.

[0031] In one example, a first determining module is configured to determine a first round trip time based on a difference between the first sending timestamp and the first receiving timestamp;

[0032] A second timeout period is determined according to the first round-trip time and a preset parameter; wherein the preset parameter is used to adjust the value of the first round-trip time.

[0033] In one example, the first determining module, configured to determine the second timeout period according to the first round-trip time and a preset parameter, includes:

[0034] Calculate the product of the first round-trip time and the preset parameter to obtain an adjustment parameter;

[0035] The sum of the first round-trip time and the adjustment parameter is calculated to obtain the second timeout time.

[0036] In one example, the apparatus further comprises:

[0037] A third acquisition module is used to send the second message to the receiving end based on the remote direct memory access driver module in the DPU, and obtain a second sending timestamp; wherein the second sending timestamp is used to represent the time when the sending end sends the second message;

[0038] A fourth acquisition module, configured to acquire a second receiving timestamp if the second confirmation character is received within a second timeout period; wherein the second receiving timestamp is used to indicate the time when the transmitting end receives the second confirmation character;

[0039] The second determination module is used to determine a third timeout period according to the second sending timestamp and the second receiving timestamp; the value of the third timeout period is smaller than the value of the first timeout period.

[0040] In one example, the apparatus further comprises:

[0041] A first sending module, configured to resend the second message if the second confirmation character is not received within a second timeout period;

[0042] a fifth acquisition module, configured to acquire a third receiving timestamp if the second confirmation character is received within a second timeout period; wherein the third receiving timestamp is used to indicate the time when the transmitting end receives the second confirmation character;

[0043] The third determination module is used to determine a fourth timeout period according to the second sending timestamp and the third receiving timestamp; the value of the fourth timeout period is smaller than the value of the first timeout period.

[0044] In one example, the apparatus further comprises:

[0045] The second sending module is used to resend the first message if the first confirmation character is not received within a first timeout period.

[0046] In one example, the data volume of the first message is smaller than a threshold; the data volume of the second message is smaller than a threshold.

[0047] A third aspect of an embodiment of the present disclosure provides an electronic device, the server comprising: a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the method of the first aspect above.

[0048] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of the first aspect described above can be implemented.

[0049] The embodiment of the present disclosure provides a method and device for determining a message timeout based on a DPU, the method comprising: in response to a user calling a preset interface, triggering a remote direct memory access driver module in the DPU to send a first message to a receiving end, and obtaining a first sending timestamp; wherein the first message carries a first confirmation character; the first confirmation character is sent by the receiving end to the sending end after receiving the first message; the first sending timestamp is used to indicate the time when the sending end sends the first message; if the first confirmation character is received within the first timeout, the first receiving timestamp is obtained; wherein the first timeout is pre-configured by the user; the first receiving timestamp is used to indicate the time when the sending end receives the first confirmation character; determining a second timeout according to the first sending timestamp and the first receiving timestamp; wherein the second timeout is used to indicate the longest time when the second message is sent from the sending end to the receiving end and the receiving end feeds back the second confirmation character to the sending end; wherein the second message carries the second confirmation character; the value of the second timeout is less than the value of the first timeout. By adopting this technical solution, the timeout period can be adjusted according to actual conditions, the flexibility of the timeout period can be improved, and the transmission efficiency of remote direct memory access can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0051] 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0052] Figure 1a It is an interactive schematic diagram of a timeout retransmission scenario provided by an embodiment of the present disclosure;

[0053] Figure 1b It is an interactive schematic diagram of a timeout retransmission scenario provided by an embodiment of the present disclosure;

[0054] Figure 1c It is an interactive schematic diagram of a timeout retransmission scenario provided by an embodiment of the present disclosure;

[0055] Figure 2 It is a schematic diagram of an interaction of timeout retransmission provided by an embodiment of the present disclosure;

[0056] Figure 3 It is a flowchart of a method for determining a message timeout based on a DPU provided in an embodiment of the present disclosure;

[0057] Figure 4 It is a flowchart of a method for determining a message timeout based on a DPU provided in an embodiment of the present disclosure;

[0058] Figure 5a is a schematic diagram of a first round-trip time determination process provided by an embodiment of the present disclosure;

[0059] Figure 5b is a schematic diagram of a second timeout determination process provided by an embodiment of the present disclosure;

[0060] Figure 6 It is a structural diagram of a DPU-based message timeout determination device provided in an embodiment of the present disclosure;

[0061] Figure 7 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0062] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0063] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0064] At present, reliable transmission means that the transport layer uses some mechanisms to ensure that the sent data packets can be received normally. The upper-layer application does not need to worry about packet loss or retransmission problems. It only needs to configure the number of retries and the timeout period. After the bottom layer detects packet loss, it triggers the retransmission mechanism to retransmit the message. There are three common timeout retransmission scenarios: The first is that the last packet sequence number (Packet Sequence Number, PSN for short) is lost, and the last packet sequence number carries an acknowledgment character (ACK for short). In this case, the receiving end did not return ACK because it did not receive the last packet sequence number. At this time, the sending end determines that the timeout has occurred. For a clearer explanation, please refer to Figure 1a The diagram shows an interaction diagram of a timeout retransmission scenario. As can be seen from the figure, the message of the sender includes three message sequence numbers with order, namely PSN1, PSN2 and PSN3, among which PSN3 carries ACK. In this scenario, after the sender sends PSN3, the receiver does not receive PSN3, and then the receiver cannot send the ACK carried in PSN3 to the sender. Therefore, the sender determines the timeout, and resends PSN1 again after the R time after sending PSN3.

[0065] The second is that the last PSN carries an ACK and the receiver receives the last PSN and returns an ACK, but the ACK is lost on the way, resulting in the sender not receiving the ACK, which leads to a timeout. For a clearer explanation, please refer to Figure 1b The diagram shows an interaction diagram of a timeout retransmission scenario. As can be seen from the figure, the message of the sender includes three message sequence numbers with order, namely PSN1, PSN2 and PSN3, among which PSN3 carries ACK. In this scenario, after the sender sends PSN3, the receiver receives PSN3 and sends ACK to the sender, but the ACK is lost on the way, resulting in the sender not receiving the ACK, which leads to a timeout. Then, after the R time after sending PSN3, PSN1 is resent again.

[0066] The third is that a certain PSN of the sender is lost, and the Not-Acknowledgment character (NACK) returned by the receiver is also lost. The receiver has not received the ACK or NACK message, and the confirmation timeout occurs. For a clearer explanation, please refer to Figure 1c An interactive diagram of a timeout retransmission scenario is shown. As can be seen from the figure, the message of the sender includes three message sequence numbers with order, namely PSN1, PSN2 and PSN3, among which PSN3 carries ACK. PSN2 is lost on the way after being sent by the sender, and then the receiver does not receive PSN2. Therefore, the sender continues to send PSN3. After receiving PSN3, the receiver feeds back NACK to the sender, but it is also lost on the way. The sender does not receive NACK, which leads to a timeout. Then, after the R time after sending PSN3, PSN1 is resent again.

[0067] Currently, the timeout retransmission scenario can be found in Figure 2 The diagram of an interaction of timeout retransmission is shown in FIG. The timeout retransmission scenario has the following problems: if the timeout time configured by the user is too large, the timeout waiting time will be long, which will cause the time of retransmission of the message to be delayed, and finally cause the remote direct memory access (RDMA) message transmission efficiency to be low, which has a great impact on RDMA, which is known for its high performance; if the timeout time configured by the user is too small, the retransmission message will be sent too early, which will lead to additional waste of resources; in addition, network transmission is volatile, even if the retransmission time configured by the user before is relatively appropriate, the transmission rate may change due to some reasons, and the retransmission timeout time is no longer appropriate at this time.

[0068] Therefore, in order to solve the above problems, Figure 3 1 is a flow chart of a method for determining a message timeout based on a DPU provided in an embodiment of the present disclosure, which is applied to a transmitting end. The method can be executed by an electronic device, in which a DPU is configured. Figure 3 As shown, the method provided in this embodiment includes the following steps:

[0069] S301, in response to a user's calling operation of calling a preset interface, trigger the remote direct memory access driver module in the DPU to send a first message to the receiving end, and obtain a first sending timestamp; wherein, the first message carries a first confirmation character; the first confirmation character is sent by the receiving end to the sending end after receiving the first message; the first sending timestamp is used to represent the time when the sending end sends the first message.

[0070] In one example, a preset interface is used to store a call operation, and the call operation is used to trigger a remote direct memory access driver module in a DPU, so that the remote direct memory access driver module in the DPU sends a first message to a receiving end. In this embodiment, the first message is PSN1. The first confirmation character is ACK1. The first sending timestamp is T0. After receiving PSN1, the receiving end sends ACK1 to the sending end so that the sending end knows that PSN1 has been sent to the receiving end. In one example, PSN1 is generally used to mark the sequence number of a message.

[0071] In one example, remote direct memory access is a computer network technology that allows two nodes on the network to directly access each other's memory and complete data communication without the involvement of the operating system. It has the advantages of low latency, high bandwidth, and reduced system resource consumption.

[0072] S302. If a first confirmation character is received within a first timeout period, a first receiving timestamp is obtained. The first timeout period is pre-configured by a user. The first receiving timestamp is used to indicate the time when the transmitting end receives the first confirmation character.

[0073] In one example, the first timeout period T1 is pre-configured by the user, indicating that whether the first confirmation character is received within this time range is detected. The advantage of this setting is that the adaptive timeout retransmission mechanism is almost completely controlled by the underlying module, and the user only needs to configure the first timeout period T1, which is relatively safer. If the first confirmation character is not received within the first timeout period T1, it is considered that the situation is a timeout. If the first confirmation character is received within the first timeout period T1, it is considered that the first message message is sent successfully.

[0074] Specifically, it can be realized through the attribute configuration of the queue pair (Queue Pair, referred to as QP): attr->timeout. Specifically, if the first confirmation character is received within the first timeout period, the first receiving timestamp T2 is obtained.

[0075] Furthermore, the first confirmation character is a transmission control character sent by the receiving end to the sending end in data communication, and is used to indicate to the sending end that the interactive information is received successfully.

[0076] S303. Determine a second timeout period according to the first sending timestamp and the first receiving timestamp; wherein the second timeout period is used to represent the longest time for the second message to be sent from the sending end to the receiving end and for the receiving end to feed back a second confirmation character to the sending end; wherein the second message carries a second confirmation character; and the value of the second timeout period is less than the value of the first timeout period.

[0077] In one example, the second timeout T3 is used to represent the maximum length of time for the second message PSN2 to be sent from the sender to the receiver and for the receiver to feed back the second confirmation character ACK2 to the sender; the second timeout T3 has the same function as the first timeout T1, except that the first timeout T1 is used to limit the first message PSN1; the second timeout T3 is used to limit the second message PSN2. In order to improve transmission efficiency, the value of the second timeout T3 is smaller than the value of the first timeout T1.

[0078] In an example, the data volume of the first message is smaller than a threshold; the data volume of the second message is smaller than a threshold.

[0079] In one example, the threshold may be limited by Maximum Transmission Unit=1024.

[0080] The embodiment of the present disclosure provides a method for determining a message timeout based on a DPU, the method comprising: in response to a user calling a preset interface, triggering a remote direct memory access driver module in the DPU to send a first message to a receiving end, and obtaining a first sending timestamp; wherein, the first message carries a first confirmation character; the first confirmation character is sent by the receiving end to the sending end after receiving the first message; the first sending timestamp is used to represent the time when the sending end sends the first message; if the first confirmation character is received within the first timeout, the first receiving timestamp is obtained; wherein, the first timeout is pre-configured by the user; the first receiving timestamp is used to represent the time when the sending end receives the first confirmation character; according to the first sending timestamp and the first receiving timestamp, determining a second timeout; wherein, the second timeout is used to represent the longest time for the second message to be sent from the sending end to the receiving end and for the receiving end to feed back the second confirmation character to the sending end; wherein, the second message carries a second confirmation character; the value of the second timeout is less than the value of the first timeout. By adopting this technical solution, the timeout period can be adjusted according to actual conditions, the flexibility of the timeout period can be improved, and the transmission efficiency of remote direct memory access can be improved.

[0081] Figure 4 The flowchart of a method for determining a message timeout based on a DPU provided by an embodiment of the present disclosure is shown. The embodiment of the present disclosure is optimized on the basis of the above embodiment, and the embodiment of the present disclosure can be combined with various optional solutions in one or more of the above embodiments.

[0082] like Figure 4 As shown, the DPU-based message timeout determination method is applied to the sending end, and the DPU-based message timeout determination method may include the following steps:

[0083] S401, in response to a user's calling operation of calling a preset interface, triggering the remote direct memory access driver module in the DPU to send a first message to a receiving end, and obtaining a first sending timestamp; wherein, the first message carries a first confirmation character; the first confirmation character is sent by the receiving end to the sending end after receiving the first message; the first sending timestamp is used to represent the time when the sending end sends the first message.

[0084] In an example, the data volume of the first message is smaller than a threshold; the data volume of the second message is smaller than a threshold.

[0085] In an example, this step can refer to the content of step S301, which will not be repeated here.

[0086] S402. If a first confirmation character is received within a first timeout period, a first receiving timestamp is obtained. The first timeout period is pre-configured by a user. The first receiving timestamp is used to indicate the time when the transmitting end receives the first confirmation character.

[0087] In an example, this step can refer to the content of step S302, which will not be repeated here.

[0088] S403: Determine a first round-trip time according to a difference between the first sending timestamp and the first receiving timestamp.

[0089] In one example, the first round trip time N represents the total time from when the sender sends the first message to when the sender receives the confirmation from the receiver. In this embodiment, the first round trip time N = the first receiving timestamp T2 - the first sending timestamp T0. For a clearer explanation, please refer to Figure 5a A schematic diagram of a first round-trip time determination process is shown.

[0090] S404. Determine a second timeout period according to the first round-trip time and a preset parameter; wherein the preset parameter is used to adjust the value of the first round-trip time.

[0091] In one example, the second timeout period is used to represent the maximum length of time for a second message to be sent from a sending end to a receiving end, and for the receiving end to feed back a second confirmation character to the sending end; wherein the second message carries a second confirmation character; and the value of the second timeout period is less than the value of the first timeout period.

[0092] In one example, the preset parameter is preset by a user and may be P. The first round trip time N is adjusted by P to obtain the second timeout time T3.

[0093] In one example, determining the second timeout period according to the first round-trip time and a preset parameter includes:

[0094] Calculate the product of the first round trip time and the preset parameter to obtain the adjustment parameter;

[0095] The sum of the first round-trip time and the adjustment parameter is calculated to obtain a second timeout period.

[0096] In one example, the adjustment parameter M=the first round trip time N multiplied by the preset parameter P, and the second timeout period T3=the first round trip time N+the adjustment parameter M, wherein P is a percentage.

[0097] S405. Send a second message to the receiving end based on the remote direct memory access driver module in the DPU, and obtain a second sending timestamp; wherein the second sending timestamp is used to represent the time when the sending end sends the second message.

[0098] In one example, after the first message PSN1 is sent successfully, the remote direct memory access driver module in the DPU sends a second message PSN2 to the receiving end and obtains a second sending timestamp T4.

[0099] S406: If a second confirmation character is received within the second timeout period, obtain a second receiving timestamp; wherein the second receiving timestamp is used to indicate the time when the sending end receives the second confirmation character.

[0100] In an example, the second receiving timestamp T5 is used to indicate the time when the sending end receives the second confirmation character.

[0101] For a clearer explanation, see Figure 5b A schematic diagram of a second timeout determination process is shown.

[0102] S407: Determine a third timeout period according to the second sending timestamp and the second receiving timestamp; the value of the third timeout period is smaller than the value of the first timeout period.

[0103] In one example, the third timeout period T6 is determined according to the second sending timestamp T4 and the second receiving timestamp T5.

[0104] In an example, the process of determining the third timeout period T6 may refer to the contents of step S403 and step S404.

[0105] S408: If the second confirmation character is not received within the second timeout period, resend the second message.

[0106] In one example, if the second confirmation character is not received within the second timeout period, it is considered that the situation is a timeout, and the second message needs to be resent.

[0107] S409: If a second confirmation character is received within the second timeout period, a third receiving timestamp is obtained; wherein the third receiving timestamp is used to indicate the time when the sending end receives the second confirmation character.

[0108] In an example, the third receiving timestamp T7 is the time after the second message is resent, after the receiving end receives the resent second message, and sends the second confirmation character to the sending end.

[0109] S410. Determine a fourth timeout period according to the second sending timestamp and the third receiving timestamp; the value of the fourth timeout period is smaller than the value of the first timeout period.

[0110] In an example, the fourth timeout period is T8. For the process, refer to the contents of step S403 and step S404.

[0111] S411: If the first confirmation character is not received within the first timeout period, resend the first message.

[0112] In an example, if the first confirmation character is not received within the first timeout period T1, it is considered that the situation is a timeout, and the first message is resent until the first message is successfully sent, and then step S402 is executed.

[0113] The disclosed embodiment provides a method for determining a message timeout based on a DPU, the method comprising: determining a first round trip time according to the difference between a first sending timestamp and a first receiving timestamp, and determining a second timeout according to the first round trip time and a preset parameter; wherein the preset parameter is used to adjust the value of the first round trip time. With this technical solution, the timeout is derived by the underlying layer based on the actual message sending and receiving time, so that the timeout wait is not too short or too long, thereby improving the RDMA message transmission efficiency, and the timeout changes in real time, and will increase or decrease in real time when the network fluctuates, so that the timeout message can be retransmitted more flexibly.

[0114] Figure 6 1 is a schematic diagram of a DPU-based message timeout determination device provided in an embodiment of the present disclosure. The DPU-based message timeout determination device can be understood as the above-mentioned electronic device or a part of the functional modules in the above-mentioned electronic device, and is applied to the sending end. Figure 6 As shown, the DPU-based message timeout determination device 60 includes:

[0115] The first acquisition module 601 is used to trigger the remote direct memory access driver module in the DPU to send a first message to the receiving end in response to the calling operation of the user calling the preset interface, and obtain a first sending timestamp; wherein the first message carries a first confirmation character; the first confirmation character is sent by the receiving end to the sending end after receiving the first message; the first sending timestamp is used to represent the time when the sending end sends the first message;

[0116] The second acquisition module 602 is used to acquire a first receiving timestamp if a first confirmation character is received within a first timeout period; wherein the first timeout period is pre-configured by a user; and the first receiving timestamp is used to indicate the time when the transmitting end receives the first confirmation character;

[0117] The first determination module 603 is used to determine a second timeout period according to a first sending timestamp and a first receiving timestamp; wherein the second timeout period is used to represent the longest time for the second message to be sent from the sending end to the receiving end and for the receiving end to feed back a second confirmation character to the sending end; wherein the second message carries a second confirmation character; and the value of the second timeout period is less than the value of the first timeout period.

[0118] In one example, the first determination module 603 is configured to determine a first round trip time according to a difference between a first sending timestamp and a first receiving timestamp;

[0119] A second timeout period is determined according to the first round-trip time and a preset parameter, wherein the preset parameter is used to adjust the value of the first round-trip time.

[0120] In an example, the first determination module 603 is configured to determine the second timeout period according to the first round-trip time and the preset parameters, including:

[0121] Calculate the product of the first round trip time and the preset parameter to obtain the adjustment parameter;

[0122] The sum of the first round-trip time and the adjustment parameter is calculated to obtain a second timeout period.

[0123] In one example, the apparatus 60 further includes:

[0124] The third acquisition module 604 is used to send a second message to the receiving end based on the remote direct memory access driver module in the DPU, and obtain a second sending timestamp; wherein the second sending timestamp is used to represent the time when the sending end sends the second message;

[0125] The fourth acquisition module 605 is used to acquire a second receiving timestamp if a second confirmation character is received within a second timeout period; wherein the second receiving timestamp is used to indicate the time when the transmitting end receives the second confirmation character;

[0126] The second determination module 606 is used to determine a third timeout period according to the second sending timestamp and the second receiving timestamp; the value of the third timeout period is smaller than the value of the first timeout period.

[0127] In one example, the apparatus 60 further includes:

[0128] The first sending module 607 is configured to resend the second message if the second confirmation character is not received within the second timeout period;

[0129] A fifth acquisition module 608 is configured to acquire a third receiving timestamp if the second confirmation character is received within the second timeout period; wherein the third receiving timestamp is used to indicate the time when the transmitting end receives the second confirmation character;

[0130] The third determination module 609 is used to determine a fourth timeout period according to the second sending timestamp and the third receiving timestamp; the value of the fourth timeout period is smaller than the value of the first timeout period.

[0131] In one example, the apparatus 60 further includes:

[0132] The second sending module 610 is configured to resend the first message if the first confirmation character is not received within a first timeout period.

[0133] In an example, the data volume of the first message is smaller than a threshold; the data volume of the second message is smaller than a threshold.

[0134] The device provided in this embodiment can execute the method of any of the above embodiments, and its execution method and beneficial effects are similar, which will not be repeated here.

[0135] An embodiment of the present disclosure further provides an electronic device, which includes: a memory, in which a computer program is stored; and a processor, for executing the computer program. When the computer program is executed by the processor, the method of any of the above embodiments can be implemented.

[0136] For example, Figure 7 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 7 , which shows a schematic diagram of the structure of an electronic device 1000 suitable for implementing the embodiment of the present disclosure. The electronic device 1000 in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0137] like Figure 7 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0138] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0139] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1009, or installed from a storage device 1008, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0140] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0141] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0142] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0143] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to a user's calling operation of calling a preset interface, triggers the remote direct memory access driver module in the DPU to send a first message to the receiving end, and obtains a first sending timestamp; wherein, the first message carries a first confirmation character; the first confirmation character is sent by the receiving end to the sending end after receiving the first message; the first sending timestamp is used to represent the time when the sending end sends the first message; if the first confirmation character is received within the first timeout period, the first receiving timestamp is obtained; wherein the first timeout period is pre-configured by the user; the first receiving timestamp is used to represent the time when the sending end receives the first confirmation character; the second timeout period is determined according to the first sending timestamp and the first receiving timestamp; wherein the second timeout period is used to represent the longest time for the second message to be sent from the sending end to the receiving end and for the receiving end to feed back the second confirmation character to the sending end; wherein, the second message carries the second confirmation character; the value of the second timeout period is less than the value of the first timeout period.

[0144] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0145] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0146] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0147] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0148] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0149] The embodiments of the present disclosure further provide a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of any of the above embodiments can be implemented. The execution method and beneficial effects are similar and will not be repeated here.

[0150] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0151] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for determining message timeout based on DPU, It is characterized in that Applied to the sending end, the method includes: In response to a user calling operation of a preset interface, a remote direct memory access driver module in the DPU is triggered to send a first message to a receiving end, and obtain a first sending timestamp; wherein the first message carries a first confirmation character; the first confirmation character is sent by the receiving end to the sending end after receiving the first message; the first sending timestamp is used to represent the time when the sending end sends the first message; If the first confirmation character is received within the first timeout period, a first receiving timestamp is obtained; wherein the first timeout period is pre-configured by the user; and the first receiving timestamp is used to indicate the time when the sending end receives the first confirmation character; A second timeout period is determined based on the first sending timestamp and the first receiving timestamp; wherein the second timeout period is used to represent the longest time for the second message to be sent from the sending end to the receiving end and for the receiving end to feed back a second confirmation character to the sending end; wherein the second message carries the second confirmation character; and the value of the second timeout period is less than the value of the first timeout period.

2. The method according to claim 1, It is characterized in that The determining a second timeout period according to the first sending timestamp and the first receiving timestamp includes: Determining a first round trip time according to a difference between the first sending timestamp and the first receiving timestamp; A second timeout period is determined according to the first round-trip time and a preset parameter; wherein the preset parameter is used to adjust the value of the first round-trip time.

3. The method according to claim 2, It is characterized in that The determining a second timeout period according to the first round-trip time and a preset parameter includes: Calculate the product of the first round-trip time and the preset parameter to obtain an adjustment parameter; The sum of the first round-trip time and the adjustment parameter is calculated to obtain the second timeout time.

4. The method according to claim 1, It is characterized in that After determining a second timeout period according to the first sending timestamp and the first receiving timestamp, the method further includes: Sending the second message to the receiving end based on the remote direct memory access driver module in the DPU, and obtaining a second sending timestamp; wherein the second sending timestamp is used to indicate the time when the sending end sends the second message; If the second confirmation character is received within the second timeout period, a second receiving timestamp is obtained; wherein the second receiving timestamp is used to indicate the time when the transmitting end receives the second confirmation character; A third timeout period is determined according to the second sending timestamp and the second receiving timestamp; a value of the third timeout period is smaller than a value of the first timeout period.

5. The method according to claim 4, It is characterized in that After obtaining the second sending timestamp, the method further includes: If the second confirmation character is not received within the second timeout period, resending the second message; If the second confirmation character is received within the second timeout period, a third receiving timestamp is obtained; wherein the third receiving timestamp is used to indicate the time when the transmitting end receives the second confirmation character; A fourth timeout period is determined according to the second sending timestamp and the third receiving timestamp; a value of the fourth timeout period is smaller than a value of the first timeout period.

6. The method according to claim 1, It is characterized in that After obtaining the first sending timestamp, the method further includes: If the first confirmation character is not received within the first timeout period, the first message is resent.

7. The method according to any one of claims 1 to 5, It is characterized in that The data volume of the first message is smaller than a threshold; the data volume of the second message is smaller than a threshold.

8. A device for determining message timeout based on DPU, It is characterized in that Applied to a transmitting end, the device comprises: A first acquisition module, configured to trigger a remote direct memory access driver module in the DPU to send a first message to a receiving end in response to a user calling a preset interface, and to obtain a first sending timestamp; wherein the first message carries a first confirmation character; the first confirmation character is sent by the receiving end to the sending end after receiving the first message; the first sending timestamp is used to indicate the time when the sending end sends the first message; A second acquisition module is configured to acquire a first receiving timestamp if the first confirmation character is received within a first timeout period; wherein the first timeout period is pre-configured by the user; and the first receiving timestamp is used to indicate the time when the transmitting end receives the first confirmation character; A first determination module is used to determine a second timeout period according to the first sending timestamp and the first receiving timestamp; wherein the second timeout period is used to represent the longest time for the second message to be sent from the sending end to the receiving end and for the receiving end to feed back a second confirmation character to the sending end; wherein the second message carries the second confirmation character; and the value of the second timeout period is less than the value of the first timeout period.

9. An electronic device, It is characterized in that include: A processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Bus message transmission control method and device, equipment and storage medium

    CN119363296A

  • Remote direct memory access data transmission mechanism optimization method and device based on DPU

    CN121396963A