Detection request message sending method and device, detection response message sending method and device, chip, computer equipment, network interface card, readable storage medium and program product

By determining the detection mode based on the message scheduling information and adding the detection request message header information to the data packet in the in-band detection mode, the bandwidth waste caused by out-of-band detection is solved and bandwidth utilization is improved.

CN119583407APending Publication Date: 2025-03-07SHENZHEN JAGUAR MICROSYSTEMS CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411589631.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-03-07

Smart Images

  • Figure CN119583407A_ABST
    Figure CN119583407A_ABST
Patent Text Reader

Abstract

The invention relates to a detection request message sending method and device, a detection response message sending method and device, a chip, computer equipment, a network interface card, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring first message scheduling information corresponding to a flow, and determining a current detection mode based on the first message scheduling information; under the condition that the current detection mode is an out-of-band detection mode, sending a detection request message; and under the condition that the current detection mode is an in-band detection mode, adding a first detection message header of the detection request message into a first data message to be sent next time, and sending the first data message added with the first detection message header under the condition that the first data message sending moment is reached. By adopting the method, the bandwidth utilization rate can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method for sending a probe request message, a method for sending a probe response message, an apparatus, a computer device, a computer-readable storage medium, and a computer program product. Background Art

[0002] In modern network communications, detection messages are one of the key technologies for obtaining network status. These messages can provide network congestion information, such as network round-trip time (RTT), in-band network telemetry, and in-band flow analysis information.

[0003] In traditional technology, the network detection model usually includes three roles: the detection requester, the detection network, and the detection responder. The specific implementation process includes: (1) the detection request execution of the detection requester: for multiple consecutive detection requests, the detection requester generates a corresponding number of detection request messages in sequence and sends them to the detection network in sequence; (2) the detection response generation of the detection responder: for multiple consecutive detection requests, the detection responder generates a corresponding number of detection response messages in sequence and sends them to the detection network in sequence; (3) the detection response reporting of the detection requester: for the multiple consecutive detection response messages received, the detection requester extracts multiple detection response values ​​in sequence and reports them to the upper layer module.

[0004] However, in the case of frequent detection, for example, when the ratio of data packets to detection packets is 1:1, if the data packet payload size is 1KB, the out-of-band detection packet payload size is Figure 1 It needs to occupy 252Byte, so the occupancy rate of the out-of-band detection message to the overall bandwidth will be as high as 252 / (252+1024)=19.7%, and the bandwidth occupied by the effective payload is only 80.3%. The effective data throughput is insufficient, resulting in bandwidth waste. Summary of the invention

[0005] Based on this, it is necessary to provide a method for sending a probe request message, a method for sending a probe response message, an apparatus, a chip, a computer device, a network interface card, a computer-readable storage medium and a computer program product that can improve bandwidth utilization in response to the above technical problems.

[0006] In a first aspect, the present application provides a method for sending a probe request message, which is applied to a probe requester, and the method includes:

[0007] Obtaining first message scheduling information corresponding to the flow, and determining a current detection mode based on the first message scheduling information;

[0008] When the current detection mode is the out-of-band detection mode, sending a detection request message;

[0009] When the current detection mode is the in-band detection mode, the first detection message header of the detection request message is added to the first data message to be sent next time, and when the first data message sending time is reached, the first data message with the first detection message header added is sent.

[0010] In one of the optional embodiments, determining the current detection mode based on the first message scheduling information includes:

[0011] Determining whether the probe request message can be sent within a first target time period based on the first message scheduling information;

[0012] If the detection request message can be sent within the first target time period, it is determined that the current detection mode is the in-band detection mode; otherwise, the current detection mode is the out-of-band detection mode.

[0013] In one of the optional embodiments, determining whether the probe request message can be sent within the first target time period based on the first message scheduling information includes any one of the following:

[0014] When the first event scheduling module receives a probe request, it obtains the flow state context of the flow corresponding to the probe request, and obtains the next data packet sending time from the flow state context; when the difference between the next data packet sending time and the current time is less than the first duration, it is determined that the probe request message can be sent within the first target time period, otherwise it is determined that the probe request message cannot be sent within the first target time period; or

[0015] When the first event scheduling module receives a probe request, it obtains the flow state context of the flow corresponding to the probe request, and obtains the number of queue elements corresponding to the flow from the flow state context; when the number of queue elements is greater than a preset value, it is determined that the probe request message can be sent within the first target time period, otherwise it is determined that the probe request message cannot be sent within the first target time period; or

[0016] The difference between the timestamp of when the actual detection request message is sent and the timestamp of the last time the first event scheduling module was instructed to perform detection is obtained through the upper-layer module. If the difference is greater than the second time length, it is determined that the detection request message can be sent within the first target time period; otherwise, it is determined that the detection request message cannot be sent within the first target time period.

[0017] In one of the optional embodiments, the first duration is less than or equal to a minimum RTT of the network.

[0018] In one of the optional embodiments, the method further includes:

[0019] When the first data packet is sent and the first data packet to be sent is not obtained, the detection mode is changed to the out-of-band detection mode, and a detection request message is sent.

[0020] In one of the optional embodiments, the method further includes:

[0021] When the first event scheduling module receives the detection request, based on the first message scheduling information, detecting whether the flow corresponding to the detection request has sent a message in the past third time period;

[0022] If there is a message sent by the flow within the third time period in the past, then continue to perform the step of determining the current detection mode based on the first message scheduling information;

[0023] If no message has been sent by the flow within the past third time period, the probe request message is discarded.

[0024] In one of the optional embodiments, the third time period is greater than or equal to the timeout retransmission time of the detection requester as the data sender.

[0025] In one of the optional embodiments, the method further includes:

[0026] In the upper layer module, read the last message sending timestamp and the current probe request timestamp recorded in the congestion control state context of the corresponding flow;

[0027] If the difference between the timestamp of the last message sending and the timestamp of the probe request is greater than a fourth time period, discard the probe request;

[0028] When the difference between the timestamp of the last message sending and the timestamp of the probe request is less than or equal to a fourth time period, a probe request is sent.

[0029] In one of the optional embodiments, the method further includes:

[0030] When the first event aggregation module receives the detection request, it obtains the flow state context of the flow corresponding to the detection request;

[0031] Detecting whether there is a probe request message being processed based on the flow state context;

[0032] If there is a probe request message being processed, discard the probe request;

[0033] In the case that there is no detection request message being processed, the steps of obtaining first message scheduling information corresponding to the flow and determining the current detection mode based on the first message scheduling information are continued.

[0034] In one of the optional embodiments, the method further includes:

[0035] When the first event aggregation module receives the detection response result, it obtains the flow state context of the flow corresponding to the detection response result;

[0036] Based on the flow state context, detecting whether there is a probe response result being reported to an upper layer module;

[0037] In the case where there is a probe response result being reported to the upper layer module, the probe response result being reported is overwritten by the received probe response result;

[0038] In the case that there is no probe response result being reported to the upper layer module, the received probe response result is reported to the upper layer module.

[0039] In a second aspect, the present application further provides a method for sending a probe response message, which is applied to a probe responder, and the method includes:

[0040] Receive a probe request message;

[0041] Acquire second message scheduling information corresponding to the detection request message, and determine a current detection mode based on the second message scheduling information;

[0042] When the current detection mode is the out-of-band detection mode, sending a detection response message corresponding to the detection request message;

[0043] When the current detection mode is the in-band detection mode, a second detection message header corresponding to the detection response message is added to the second data message to be sent next time, and when the time for sending the second data message is reached, the second data message with the second detection message header added is sent.

[0044] In one of the optional embodiments, determining the current detection mode based on the second message scheduling information includes:

[0045] Determining whether the probe request message can be sent within a second target time period based on the second message scheduling information;

[0046] If the detection request message can be sent within the second target time period, it is determined that the current detection mode is the in-band detection mode; otherwise, the current detection mode is the out-of-band detection mode.

[0047] In one of the optional embodiments, determining whether the probe request message can be sent within the second target time period based on the second message scheduling information includes any one of the following:

[0048] When the second event scheduling module receives a probe response message generation indication, the flow state context of the flow corresponding to the probe response message generation indication is obtained, and the next data packet sending time is obtained from the flow state context; when the difference between the next data packet sending time and the current time is less than a fourth time period, it is determined that the probe request message can be sent within the second target time period, otherwise it is determined that the probe request message cannot be sent within the second target time period; or

[0049] When the second event scheduling module receives a probe response message generation indication, it obtains the flow state context of the flow corresponding to the probe response message generation indication, and obtains the number of queue elements corresponding to the flow from the flow state context; when the number of queue elements is greater than a preset value, it is determined that the probe request message can be sent within the second target time period; otherwise, it is determined that the probe request message cannot be sent within the second target time period.

[0050] In one of the optional embodiments, the fourth time period is less than or equal to a minimum RTT of the network.

[0051] In one of the optional embodiments, the method further includes:

[0052] When the second data packet to be sent is not obtained when the second data packet sending time is reached, the detection mode is modified to the out-of-band detection mode, and a detection request message is sent.

[0053] In one of the optional embodiments, the method further includes:

[0054] When the second event aggregation module receives the detection response message generation indication, it obtains the flow state context of the flow corresponding to the detection response message generation indication;

[0055] Detecting whether there is a probe response message being processed based on the flow state context;

[0056] If there is a probe response message being processed, discard the probe response message generation indication;

[0057] In the case that there is no probe response message being processed, the step of obtaining second message scheduling information corresponding to the probe request message and determining the current detection mode based on the second message scheduling information is continued.

[0058] In a third aspect, the present application further provides a probe request message sending device, the device comprising:

[0059] A first event scheduling module, used to obtain first message scheduling information corresponding to the flow, and determine a current detection mode based on the first message scheduling information;

[0060] The first message sending module is used to send a detection request message when the current detection mode is an out-of-band detection mode; when the current detection mode is an in-band detection mode, add a first detection message header of the detection request message to the first data message to be sent next time, and send the first data message to which the first detection message header is added when the first data message sending time is reached.

[0061] In a fourth aspect, the present application further provides a detection response message sending device, the device comprising:

[0062] A second message receiving module, used for receiving a detection request message;

[0063] A second event scheduling module, used to obtain second message scheduling information corresponding to the detection request message, and determine a current detection mode based on the second message scheduling information;

[0064] A second message sending module is used to send a probe response message corresponding to the probe request message when the current detection mode is an out-of-band detection mode; add a second detection message header corresponding to the detection response message to the second data message to be sent next time when the current detection mode is an in-band detection mode, and send the second data message to which the second detection message header is added when the second data message sending time is reached.

[0065] In a fifth aspect, the present application further provides a chip, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in any one of the above embodiments when executing the computer program.

[0066] In a sixth aspect, the present application also provides a computer device, comprising a processor and the chip described in any one of the above embodiments, the memory stores a computer program, the chip is used to dispatch messages to the processor or the chip itself for processing, and the processor is used to process messages dispatched by the chip.

[0067] In a seventh aspect, the present application also provides a network interface card, comprising a chip and an interface as described in any one of the above embodiments, wherein the chip communicates externally through the interface.

[0068] In an eighth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in any one of the above embodiments are implemented.

[0069] In a ninth aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in any one of the above embodiments.

[0070] The above-mentioned method for sending a probe request message, method for sending a probe response message, apparatus, computer equipment, computer-readable storage medium and computer program product can determine the current detection mode based on the first message scheduling information, support out-of-band detection mode and in-band detection mode, and in the case of the in-band detection mode, add the first detection message header of the detection request message to the first data message to be sent next time, and when the time for sending the first data message is reached, send the first data message to which the first detection message header is added, thereby effectively reducing the resource occupation of the overall network bandwidth by the detection behavior and improving the bandwidth utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0072] Figure 1 It is a schematic diagram of the detection network model in the traditional technology;

[0073] Figure 2 An application environment diagram of a method for sending a probe request message in an embodiment;

[0074] Figure 3 A schematic diagram of a flow chart of a method for sending a probe request message in an embodiment;

[0075] Figure 4 A flowchart of a detection request indication processing process of a detection requester in one embodiment;

[0076] Figure 5 A flowchart of a detection requester detection response indication processing process in one embodiment;

[0077] Figure 6 A schematic diagram of a flow chart of a method for sending a probe response message in an embodiment;

[0078] Figure 7 A flowchart of a detection response generation process of a detection responder in one embodiment;

[0079] Figure 8 It is a structural block diagram of a detection request message sending device in one embodiment;

[0080] Fig. 9 It is a structural block diagram of a detection response message sending device in an embodiment;

[0081] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0082] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0083] Combination Figure 1 As shown, Figure 1 It is a schematic diagram of a detection network model in the traditional technology, and the detection network model includes a detection requester, a detection network and a detection responder.

[0084] The probe requester is a node or device that generates a probe request message, which contains necessary message header information to support the detection network or the detection responder to identify and add information to the probe request. The probe requester is mainly composed of upper-layer modules (such as congestion control module, Host control module), message sending module and message receiving module.

[0085] As a transmission medium, the detection network is responsible for transmitting the detection request message sent by the detection requester to the detection responder, and returning the detection response message generated by the detection responder to the detection requester. In this process, the detection network may mark or modify the message, such as adding timestamp information, to provide necessary network status information. The detection network is mainly composed of switch devices.

[0086] The probe responder is a node or device that receives a probe request message and generates a probe response message. The probe response message contains necessary message header information to support the probe requester to identify and process the probe response. The probe responder is mainly composed of a message receiving module and a message sending module.

[0087] According to IB (InfiniBand) protocol versions 1.7 and 1.8, a typical detection behavior is RTT detection, which recommends the use of out-of-band detection (encapsulating the detection information in independent messages that do not carry a payload) mode. The data structure of a typical RTT detection request message is shown below. The RTT detection core data domain segments are the following three: Requestor Opaque Data: It is recommended to add the message sending timestamp of the detection requester; RequestReceive Time: It is specified to add the timestamp of the detection responder receiving the detection request; Response Send Time: It is specified to add the timestamp of the detection responder sending the detection response. For details, please refer to Table 1:

[0088] Table 1 32B field RTT detection message format

[0089]

[0090] The NVIDIA BlueField-3 PCC (Programmable Congestion Control) module also supports the triggering and sending of detection messages, following the IB protocol to implement out-of-band detection mode.

[0091] Although the IB protocol does not mention it, the request execution and response reporting of the probe message can usually be implemented in the following ways: Probe request execution by the probe requester: for multiple consecutive probe requests, the probe requester generates a corresponding number of multiple probe request messages in sequence, and sends them to the probe network in sequence; Probe response generation by the probe responder: for multiple consecutive probe requests, the probe responder generates a corresponding number of multiple probe response messages in sequence, and sends them to the probe network in sequence; Probe response reporting by the probe requester: for multiple consecutive probe response messages received, the probe requester extracts multiple probe response values ​​in sequence, and reports them to the upper-level module.

[0092] However, there are at least the following problems in the above method:

[0093] Only using the out-of-band mode to perform detection will result in high bandwidth waste. In frequent detection scenarios, for example, when the ratio of data packets to detection packets is 1:1, if the data packet payload size is 1KB, the out-of-band detection packet payload size is Figure 1 It needs to occupy 252Byte, so the occupancy rate of the out-of-band detection message to the overall bandwidth will be as high as 252 / (252+1024)=19.7%, and the bandwidth occupied by the effective payload is only 80.3%, and the effective data throughput is insufficient.

[0094] When performing detection in out-of-band mode, invalid detection may continue to be performed when the current flow has no data traffic, thereby occupying the data bandwidth of other flows. A typical case is: the congestion control algorithm module is responsible for executing the RTT detection instruction and requires the message processing module to send RTT detection messages to collect network congestion information, thereby adjusting the rate of the current flow. However, when the current flow has no data traffic, the congestion control algorithm module may still require frequent RTT detection, resulting in the flow without data traffic occupying the bandwidth resources of other normal flows with data traffic due to the execution of RTT detection, resulting in low overall bandwidth utilization. In the RDMA network card scenario, this problem may further cause PCIe bandwidth waste, because the QPC of the flow without data traffic may have been kicked out of the network card cache (NIC Cache). When it is necessary to execute a request to report to the congestion control algorithm module, it is necessary to first obtain the QPC on the host memory through the PCIe bus through DMA Read.

[0095] The monotonous sequential execution of event requests and responses may waste network card core and algorithm computing power resources. The same flow may initiate multiple RTT probes in a short period of time. On the probe request side, if a new probe instruction is received before the previous probe request message (due to scheduling and other factors) is sent, two consecutive probe request messages may be sent in succession, and their functions are completely repeated. Similarly, the probe responder may also send two consecutive probe response messages with repeated functions. After receiving two consecutive probe response messages, the probe requester may directly extract two response values ​​and report two event requests to the congestion control algorithm module. These redundant message construction, message processing, message parsing and event processing will cause waste of network card computing power and algorithm computing power.

[0096] In order to solve the above technical problems in turn, the detection request message sending method and the detection response message sending method provided in the embodiment of the present application can be applied to Figure 2 In the application environment shown in the figure, the detection requester communicates with the detection responder through the detection network. Figure 1 At least one of the first event aggregation module and the first event scheduling module is introduced. Figure 1 At least one of a second event aggregation module and a second event scheduling module is introduced. Figure 2 For the convenience of description, the first event aggregation module, the first event scheduling module, the second event aggregation module and the second event scheduling module are all drawn out. Those skilled in the art may appreciate that at least one of the above-mentioned technical problems may be solved by introducing at least one of the modules or improving the software of the upper module of the detection requester.

[0097] The first event aggregation module on the detection request side is used to aggregate the trigger detection indications from the upper modules (such as the congestion control module and the host control module) and the detection responses reported by the first message receiving module. On the detection responder side, the second event aggregation module is used to aggregate the trigger response indications from the second message receiving module. In the context of this article, detection indications, requests and responses can all be regarded as events.

[0098] The first event scheduling module and the second event scheduling module are used to intelligently select in-band or out-of-band detection mode and arrange scheduling tasks to execute the corresponding detection request / response message sending when receiving a detection request or detection response indication according to the current flow message scheduling to be sent. In the context of this article, both the detection request message and the detection response message can be regarded as detection messages.

[0099] The above-mentioned detection requester and detection responder can both be terminals or servers, wherein the terminals can be, but are not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices and portable wearable devices, and IoT devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0100] In an exemplary embodiment, Figure 3 As shown, a method for sending a probe request message is provided, and the method is applied to Figure 1 The detection requesting party in the example is used to illustrate, including the following steps S302 to S306. Among them:

[0101] S302: Acquire first message scheduling information corresponding to the flow, and determine a current detection mode based on the first message scheduling information.

[0102] The first message scheduling information is used to characterize the message scheduling status of the corresponding flow. The first message scheduling information may include relevant parameters for indicating whether the detection request message can be sent within the first target time period. For example, the first message scheduling information may include the next data packet sending time, the number of queue elements corresponding to the flow, the timestamp of the actual detection request message being sent, and at least one of the difference between the timestamp of the last time indicating that the first event scheduling module performs detection.

[0103] The current detection mode may be determined based on the first message scheduling information, wherein the detection mode includes an out-of-band detection mode and an out-of-band detection mode, and specific definitions may be found below.

[0104] In one of the optional embodiments, the current detection mode is determined based on the first message scheduling information, including: determining whether the detection request message can be sent within the first target time period based on the first message scheduling information; if the detection request message can be sent within the first target time period, determining that the current detection mode is an in-band detection mode, otherwise, the current detection mode is an out-of-band detection mode.

[0105] The first target time period may be a tolerable delayed sending duration of the probe request message, and the delayed sending duration may be less than or equal to a minimum RTT (Round-Trip Time) in the reference network.

[0106] When the detection request message can be sent within the first target time period, it is determined that the current detection mode is the in-band detection mode, otherwise, the current detection mode is the out-of-band detection mode, thereby improving the immediacy of the detection request message.

[0107] S304: When the current detection mode is the out-of-band detection mode, a detection request message is sent.

[0108] The out-of-band detection mode is Figure 1 The detection mode in the traditional technology shown is to send a separate detection request message.

[0109] S306: When the current detection mode is the in-band detection mode, add a first detection message header of the detection request message to the first data message to be sent next time, and send the first data message with the first detection message header added when the first data message sending time is reached.

[0110] In the in-band detection mode, the detection request message is merged into the first data message and sent together with the first data message. The first data message here is a message including a valid service payload. The first detection message header of the detection request message is added to the first data message, so that the first data message with the first detection message header added is sent at the time of sending the first data message to realize detection.

[0111] The first probe message header includes a request message header Common Mad Header, a probe requester message sending timestamp Requestor Opaque Data, a probe responder message receiving timestamp Request ReceiveTime, and a probe responder message sending timestamp Response Send Time.

[0112] Specifically, still taking the above Table 1 as an example, for a message including a 1KB business payload, only 44 bytes need to be added, including 20 bytes of Common Mad Header, 8 bytes of Requestor Opaque Data, 8 bytes of Request Receive Time and 8 bytes of Response Send Time. When the ratio of the pure first data message to the first data message including the first detection message header is 1:1, the occupation rate of the detection request message to the overall bandwidth is only 44B / (1KB+1KB)=2.15%, which is much lower than the bandwidth value ratio of 19.7% occupied by the out-of-band detection mode, thereby improving the bandwidth utilization.

[0113] However, compared with the out-of-band detection mode, the shortcoming of the in-band detection mode is that the immediacy of detection execution is poor. This is because the in-band detection can only attach the first detection message header to the valid first data message and send it out to implement the detection when the current flow has a first data message to send. If the execution mode of in-band detection is fixed, the execution of the detection may become difficult to predict, for example, the current flow has no traffic to send within 1ms, or the current flow has traffic but the scheduling task limits it to be sent after 1ms. The delay in detection execution may seriously affect the immediacy and effectiveness of the detection value, especially for the congestion control module, which has very high detection accuracy and immediacy. In order to solve the problem of immediacy brought by in-band detection in this application, the in-band detection mode and the out-of-band detection mode are combined, and the adaptive switching of the in-band detection mode and the out-of-band detection mode is realized based on the above-mentioned first target time period, that is, the first message sending module is allowed to use both the detection message of the out-of-band mode and the detection message of the in-band mode, so as to further utilize the advantages of the two messages and avoid their respective disadvantages.

[0114] The switching condition between the in-band detection mode and the out-of-band detection mode is to determine whether the detection request message can be sent within the first target time period based on the first message scheduling information. If it can be sent within the first target time period, immediacy is guaranteed, so the in-band detection mode can be used, otherwise the out-of-band detection mode is used. Optionally, in the present application, the in-band detection mode is preferentially used. When immediacy cannot be guaranteed, that is, the detection request message cannot be sent within the first target time period, the out-of-band detection mode is switched.

[0115] The above-mentioned method for sending a detection request message can determine the current detection mode based on the first message scheduling information, and supports out-of-band detection mode and in-band detection mode. In the case of the in-band detection mode, the first detection message header of the detection request message is added to the first data message to be sent next time, and when the time for sending the first data message is reached, the first data message with the first detection message header added is sent. This can effectively reduce the resource occupation of the overall network bandwidth by the detection behavior and improve the bandwidth utilization.

[0116] In one of the optional embodiments, determining whether the probe request message can be sent within the first target time period based on the first message scheduling information includes any one of the following: when the first event scheduling module receives the probe request, obtaining the flow state context of the flow corresponding to the probe request, and obtaining the next data packet sending time from the flow state context; when the difference between the next data packet sending time and the current time is less than the first duration, determining that the probe request message can be sent within the first target time period, otherwise determining that the probe request message cannot be sent within the first target time period; or when the first event scheduling module receives the probe request, obtaining the flow state context of the flow corresponding to the probe request, and obtaining the number of queue elements corresponding to the flow from the flow state context; when the number of queue elements is greater than a preset value, determining that the probe request message can be sent within the first target time period, otherwise determining that the probe request message cannot be sent within the first target time period; or obtaining the difference between the timestamp of the actual probe request message and the timestamp of the last time the first event scheduling module was instructed to perform the probe through the upper-layer module, and when the difference is greater than the second duration, determining that the probe request message can be sent within the first target time period, otherwise determining that the probe request message cannot be sent within the first target time period.

[0117] In the first solution, whether the probe request message can be sent within the first target time period can be processed in the first event scheduling module described above. When the first event scheduling module receives a probe indication, it obtains the flow status context (Flow Context, FC) of the corresponding flow. For example, in the RDMA network card implementation, it should be the next_packet_ts field segment in the QPC (QP Context). This field segment represents the sending time of the next data packet. Then, it determines whether there is a first data message schedulable within the first target time period for the current flow, that is, it satisfies next_packet_ts – cur_ts < T1. Here, next_packet_ts is the sending time of the next data packet, that is, the scheduling time of the next first data message, cur_ts is the current time, and T1 is the first duration. In this embodiment, the first duration is equal to the length of the first target time period. Therefore, optionally, the first duration is less than or equal to the minimum RTT of the network. If there is a schedulable first data message within the T1 time period, it is marked as the in-band detection mode (for example, the probe requester sets probe_req_mode to PROBE_INBAND in the QPC), and waits to execute the probe request sending during scheduling; if there is no schedulable first data message within the T1 time period, it is marked as the out-of-band detection mode (probe_req_mode is set to PROBE_OUTBAND in the QPC), and the probe request message is sent immediately.

[0118] In addition, it should be noted that the update of the next message scheduling time next_packet_ts is not within the scope of the design of this application and needs to be maintained by the first message sending module as needed. This application assumes that the scheduling implementation of the first data message is already accurate and complete.

[0119] In the second solution, whether the probe request message can be sent within the first target time period can be processed in the first event scheduling module described above. In this embodiment, a judgment method with weakened hardware requirements can be executed. It does not need to rely on the next_pkt_ts field segment (that is, does not rely on the message-level time scheduling ability), but determines whether there is a message to be sent by checking the wqe_count (the number of WQEs to be processed, that is, the number of queue elements corresponding to the flow) in the flow status context FC. As long as the number of queue elements wqe_count corresponding to the flow is greater than a preset value, for example, 0, the in-band detection mode is selected; otherwise, the out-of-band detection mode is executed. It should be noted that in this solution, due to the lack of time scheduling ability, the timeliness of sending in-band detection messages in this solution is weaker than that of the first solution.

[0120] In the third solution, whether the probe request message can be sent within the first target time period can be processed in the upper layer module mentioned above. A typical implementation is: by calculating the difference between the timestamp ts_rtt_req_sent of the actual probe request message contained in RTT_TX_EVENT and the timestamp ts_last_rtt_probe_ts of the last instruction for the first event scheduling module to perform the probe: ts_diff = ts_rtt_req_sent - ts_last_rtt_probe_ts, to determine whether the detection mode needs to be switched. If the difference ts_diff exceeds a preset waterline value, that is, the second duration T3, an out-of-band detection indication is generated, otherwise an in-band detection indication is generated. Since the upper module's perception of traffic scheduling and the timing of sending the next segment of the message is weaker than that of the first event scheduling module, this solution is weaker than the first solution in terms of accuracy and practicality.

[0121] In one of the optional embodiments, when the first data packet to be sent is not obtained when the first data packet sending time is reached, the detection mode is changed to the out-of-band detection mode, and a detection request message is sent.

[0122] Among them, the in-band detection mode in the present application may encounter the following scenario during actual execution: after the scheduling time of the first data packet arrives, that is, the time for sending the first data packet arrives, the first packet sending module prepares to send the first data packet of the current stream, but finds that there is actually no first data packet to send, then the out-of-band mode detection is immediately executed (for example, the detection requester sets probe_req_mode to PROBE_OUTBAND in QPC).

[0123] In order to solve the problem of invalid detection mentioned above, the present application introduces an invalid detection strategy to detect invalid detection requests at the detection requesting party.

[0124] In one of the optional embodiments, the method also includes: when the first event scheduling module receives a detection request, based on the first message scheduling information, detecting whether the flow corresponding to the detection request has sent any message in the past third time period; when the flow has sent any message in the past third time period, continuing to execute the step of determining the current detection mode based on the first message scheduling information; when the flow has not sent any message in the past third time period, discarding the detection request message.

[0125] In one of the optional embodiments, the third time period is greater than or equal to the timeout retransmission time of the detection requester as the data sender.

[0126] Among them, whether there is no invalid detection in the probe request can be processed in the first event scheduling module mentioned above. For example, when the first event scheduling module receives the probe request, it is determined whether there is a message sent by the corresponding flow in the past third time period (this time domain should be used as a performance configuration parameter of the probe requester, such as an optional register configuration), that is, cur_ts-last_packet_ts>T2 is satisfied, and the current probe request is determined to be an invalid probe, otherwise the current probe request has no invalid probe. Among them, cur_ts is the current time, and last_packet_ts is the time when the message was last sent. If the difference between the two does not exceed the duration corresponding to the third time period T2, it means that the current probe request does not exceed the flow interruption detection watermark, and the probe request message should be sent; if it exceeds the third time period T2, it means that the current flow has not sent traffic in the time period represented by the flow interruption detection watermark, which is regarded as a flow interruption, and the current probe request is invalid, so the corresponding probe request message is not sent. The typical value of the third time period T2 should refer to the timeout retransmission (RTO, Retransmission Timeout) configuration of the probe requester as the data sender, and should not be less than this value.

[0127] Through the above-mentioned invalid probe request identification strategy, the probe requester can silently discard the probe request message in the "broken flow" state, thereby reducing the waste of network bandwidth.

[0128] In an optional embodiment thereof, the identification of invalid probe requests can also be achieved by other means, and the method also includes: in the upper layer module, reading the last message sending timestamp and the current probe request timestamp recorded in the congestion control state context of the corresponding flow; when the difference between the last message sending timestamp and the probe request timestamp is greater than a fourth time period, discarding the probe request; when the difference between the last message sending timestamp and the probe request timestamp is less than or equal to the fourth time period, sending the probe request.

[0129] In this embodiment, whether there is no invalid detection in the detection request can be processed in the upper layer module mentioned above, that is, the upper layer congestion control algorithm module actively avoids or reduces the generation of invalid detection indications. Optionally, the upper layer module determines whether the current flow is in a suspended state by calculating the difference between the last message sending timestamp ts_last_sent recorded in the congestion control state context (Congestion Control Context, CCC) corresponding to the event reporting flow and the current event timestamp ts_cur: ts_diff = ts_cur-ts_last_sent. If ts_diff exceeds a preset waterline value, such as the fourth time period T4 (the meaning of the fourth time period T4 can be the same as the third time period T2 mentioned above), then this algorithm response does not include a detection indication, otherwise it may include a detection indication.

[0130] This alternative solution constrains each CC algorithm based on detection (such as RTT detection) to maintain and manage related data domain segments on its own, with greater instruction overhead and poor uniformity, so its practicality is weaker than the solution for identifying invalid detection requests implemented in the first event scheduling module.

[0131] In the above embodiment, through the invalid probe request detection strategy, the probe request party first detects whether the current traffic is interrupted before executing the probe request message sending. If it is interrupted, the probe request is silently ignored and the probe request message is not sent. This can effectively reduce the bandwidth resource occupation of other data traffic by invalid detection.

[0132] In view of the problem that the monotonous sequential execution of the above-mentioned probe requests may waste the computing power resources of the network card core and the algorithm core, a first event aggregation module is newly added in this embodiment to aggregate multiple redundant probe requests or probe responses. The first event aggregation module implements an adaptive aggregation strategy for probe requests and probe responses.

[0133] In one of the optional embodiments, the method also includes: when the first event aggregation module receives a detection request, obtaining the flow state context of the flow corresponding to the detection request; detecting whether there is a detection request message being processed based on the flow state context; if there is a detection request message being processed, discarding the detection request; if there is no detection request message being processed, continuing to execute the step of obtaining the first message scheduling information corresponding to the flow, and determining the current detection mode based on the first message scheduling information.

[0134] When the first event aggregation module receives a probe request sent by the upper-layer module, the first event aggregation module can obtain the flow state context of the corresponding flow, and detect whether there is a probe request message being processed based on the flow state context. If so, the probe request is discarded.

[0135] The existence of a probe request message being processed can be realized through the probe identifier probe_req_mode in the flow state context of the flow. The probe identifier probe_req_mode is the domain segment held by the probe requester and can include the following four modes: PROBE_NULL means that there is currently no probe / event to be performed; PROBE_ON means that there is currently a probe / event to be performed, but the in-band or out-of-band mode of sending has not yet been determined; PROBE_INBAND means that there is currently a scheduled in-band probe message, and the probe message header needs to be carried when the first data message is sent next time; PROBE_OUTBAND means that there is currently a scheduled out-of-band probe message, and an out-of-band probe message needs to be sent immediately.

[0136] Therefore, in this application, it is possible to determine whether there is a probe request message being processed by identifying the corresponding probe identifier probe_req_mode, for example, whether probe_req_mode is PROBE_NULL. If it is empty, it means that there is no probe request message in the scheduling or sending state, and probe_req_mode needs to be marked as PROBE_ON to perform subsequent probe tasks normally; otherwise, silent aggregation is performed and the current probe request sending indication is ignored.

[0137] Among them, it should be noted that the update of the probe flag probe_req_mode also includes clearing the probe flag after the first message sending module completes sending the probe request message, that is, setting the probe flag probe_req_mode to PROBE_NULL, thereby improving the accuracy of judging whether there is a probe request message being processed.

[0138] In one of the optional embodiments, aggregation of probe requests includes: when the first event aggregation module receives a probe response result, obtaining the flow state context of the flow corresponding to the probe response result; based on the flow state context, detecting whether there is a probe response result being reported to the upper-level module; when there is a probe response result being reported to the upper-level module, overwriting the probe response result being reported by receiving the probe response result; when there is no probe response result being reported to the upper-level module, reporting the received probe response result to the upper-level module.

[0139] In this embodiment, when the first event aggregation module of the detection requester receives the detection response result of the first message receiving module, for example, receives the detection response message parsing value of the first message receiving module, it first checks the flow state context of the corresponding flow, and based on the flow state context, detects whether there is a detection response result being reported to the upper-level module.

[0140] Among them, the first event aggregation module can detect whether there is a probe response result being reported to the upper layer module by identifying the corresponding probe response identifier probe_inf_mode. The probe response identifier probe_inf_mode is a domain segment held by the probe requester, which is used to record the probe response reporting status, including two modes: PROBE_NULL and PROBE_ON, where PROBE_NULL indicates that there is currently no probe response to be reported; PROBE_ON indicates that there is currently a probe response to be reported.

[0141] This is based on whether probe_inf_mode is PROBE_NULL. If it is PROBE_NULL, it means that there is no probe response event in the reporting process. You need to mark probe_inf_mode as PROBE_ON and perform subsequent response reporting tasks normally; otherwise, silent aggregation is performed and the new probe response value is used to overwrite the last reported value.

[0142] Among them, for the convenience of understanding, combined Figure 4 and Figure 5 As shown, Figure 4 is a flowchart of a detection request indication processing process of a detection requester in one embodiment. Figure 5 The following is a flowchart of a process for processing a probe requester probe response indication in one embodiment.

[0143] When the first event aggregation module receives a probe request indication sent by the upper-layer module, it first obtains the flow status context of the corresponding flow and determines whether the probe identifier probe_req_mode in the flow status context is PROBE_NULL. If it is not NULL, the probe request indication is discarded to complete the probe request process; if it is NULL, the probe request indication is passed to the first event scheduling module, and the probe identifier probe_req_mode in the flow status context is set to PROBE_ON. The first event scheduling module detects whether the probe request indication is an invalid indication, such as whether cur_ts–last_packet_ts<T2 is satisfied. If not, the probe request indication is discarded; otherwise, the first packet scheduling information corresponding to the flow is obtained, and the current probe mode is determined based on the first packet scheduling information. For example, it is detected whether next_packet_ts–cur_ts<T1 holds. If so, the current probe mode is the in-band probe mode, and the first packet sending module is scheduled to send the probe packet header together when the next first data packet is executed. If next_packet_ts–cur_ts<T1 does not hold, the current probe mode is the out-of-band probe mode, that is, the first packet sending module is scheduled to immediately send the probe request packet. And after the first packet sending module sends the probe request packet or the first data packet carrying the probe packet header, the probe identifier probe_req_mode in the flow status context corresponding to the flow is updated to PROBE_NULL to complete the probe request.

[0144] When the first packet receiving module receives a probe response packet, it parses and extracts the corresponding response value. Then, the first aggregation module determines whether the probe response identifier probe_inf_mode is PROBE_NULL. If it is PROBE_NULL, the new probe response value of this time is reported to the response aggregation queue; otherwise, the probe response identifier probe_inf_mode is set to PROBE_ON, and the probe response values are aggregated to overwrite the response value obtained by the previous parsing. After the response value in the response aggregation queue is reported, the probe response identifier probe_inf_mode is updated to PROBE_NULL to complete the reporting process of the probe response value.

[0145] In the above embodiment, the detection requester can give priority to sending the detection request message in the in-band detection mode when executing the detection message sending, which can effectively reduce the resource occupation of the detection behavior on the overall network bandwidth. In addition, the detection requester first detects whether the current traffic is interrupted before executing the detection message sending. If it is interrupted, the detection request is silently ignored and the detection message is not sent. This can effectively reduce the bandwidth resource occupation of other data traffic by invalid detection. When executing the sending and receiving of the detection request message, the message or domain segment resolution value can be aggregated to avoid redundant end-side message processing, which can effectively reduce the waste of network card core and algorithm core computing resources caused by the detection behavior.

[0146] In an exemplary embodiment, Figure 6 As shown, a method for sending a probe response message is provided, and the method is applied to Figure 1 The detection responder in the example is used to illustrate, including the following steps S602 to S608. Among them:

[0147] S602: Receive a probe request message.

[0148] The probe request message is received by the second message receiving module 901 of the probe responder, and a probe response message generation indication is generated based on the probe request message and transmitted to the downstream module.

[0149] S604: Obtain second message scheduling information corresponding to the detection request message, and determine a current detection mode based on the second message scheduling information.

[0150] The second message scheduling information is used to characterize the message scheduling status of the corresponding flow. The second message scheduling information may include relevant parameters for indicating whether the detection response message can be sent within the second target time period. For example, the second message scheduling information may include at least one of the next data packet sending time and the number of queue elements corresponding to the flow.

[0151] The current detection mode may be determined based on the second message scheduling information, wherein the detection mode includes an out-of-band detection mode and an out-of-band detection mode. For specific definitions, see below.

[0152] In one of the optional embodiments, the current detection mode is determined based on the second message scheduling information, including: determining whether the detection request message can be sent within the second target time period based on the second message scheduling information; if the detection request message can be sent within the second target time period, determining that the current detection mode is an in-band detection mode, otherwise, the current detection mode is an out-of-band detection mode.

[0153] The second target time period may be a tolerable delayed sending duration of the probe response message, and the delayed sending duration may be less than or equal to a minimum RTT (Round-Trip Time) in the reference network.

[0154] When the detection response message can be sent within the second target time period, it is determined that the current detection mode is the in-band detection mode, otherwise, the current detection mode is the out-of-band detection mode, thereby improving the immediacy of the detection response message.

[0155] S606: When the current detection mode is the out-of-band detection mode, send a detection response message corresponding to the detection request message.

[0156] The out-of-band detection mode is Figure 1 The detection mode in the traditional technology shown is to send a separate detection response message.

[0157] S608: When the current detection mode is the in-band detection mode, add a second detection message header corresponding to the detection response message to the second data message to be sent next time, and send the second data message with the second detection message header added when the second data message sending time is reached.

[0158] In the in-band detection mode, the detection response message is merged into the second data message and sent together with the second data message. The second data message here is a message including a valid service payload. The second detection message header of the detection response message is added to the second data message, so that the second data message with the second detection message header added is sent at the time of sending the second data message to realize detection.

[0159] The second probe message header includes the request message header Common Mad Header, the probe requester message sending timestamp Requestor Opaque Data, the probe responder receives the probe request message timestamp Request ReceiveTime, and the probe responder sends the probe response message timestamp Response Send Time.

[0160] Specifically, still taking the above Table 1 as an example, for a message including a 1KB business payload, only 44 bytes need to be added, including a 20-byte Common Mad Header, an 8-byte Requestor Opaque Data, an 8-byte Request Receive Time, and an 8-byte Response Send Time. When the ratio of the pure second data message to the second data message including the second detection message header is 1:1, the occupancy rate of the detection response message to the overall bandwidth is only 44B / (1KB+1KB)=2.15%, which is much lower than the bandwidth value ratio of the out-of-band detection mode of 19.7%, thereby improving the bandwidth utilization.

[0161] However, compared with the out-of-band detection mode, the shortcoming of the in-band detection mode is that the immediacy of detection execution is poor. This is because the in-band detection can only attach the second detection message header to the valid second data message and send it out to implement the detection when the current flow has a second data message to send. If the execution mode of in-band detection is fixed, the execution of the detection may become difficult to predict, for example, the current flow has no traffic to send within 1ms, or the current flow has traffic but the scheduling task limits it to be sent after 1ms. The delay in detection execution may seriously affect the immediacy and effectiveness of the detection value, especially for the congestion control module, which has very high detection accuracy and immediacy. In order to solve the problem of immediacy brought by in-band detection in this application, the in-band detection mode and the out-of-band detection mode are combined, and the adaptive switching of the in-band detection mode and the out-of-band detection mode is realized based on the above-mentioned second target time period, that is, the second message sending module is allowed to use both the detection message of the out-of-band mode and the detection message of the in-band mode, so as to further utilize the advantages of the two messages and avoid their respective disadvantages.

[0162] The switching condition between the in-band detection mode and the out-of-band detection mode is to determine whether the detection response message can be sent within the second target time period based on the second message scheduling information. If it can be sent within the second target time period, immediacy is guaranteed, so the in-band detection mode can be used, otherwise the out-of-band detection mode is used. Optionally, in the present application, the in-band detection mode is preferentially used. When immediacy cannot be guaranteed, that is, the detection response message cannot be sent within the second target time period, the out-of-band detection mode is switched.

[0163] The above-mentioned method for sending a detection response message can determine the current detection mode based on the second message scheduling information, and supports out-of-band detection mode and in-band detection mode. In the case of the in-band detection mode, a second detection message header of the detection request message is added to the second data message to be sent next time, and when the time for sending the second data message is reached, the second data message with the second detection message header added is sent. This can effectively reduce the resource occupation of the overall network bandwidth by the detection behavior and improve the bandwidth utilization.

[0164] In one of the optional embodiments, determining whether the probe request message can be sent within the second target time period based on the second message scheduling information includes any one of the following: when the second event scheduling module receives a probe response message generation indication, obtaining the flow state context of the flow corresponding to the probe response message generation indication, and obtaining the next data packet sending time from the flow state context; when the difference between the next data packet sending time and the current time is less than a fourth time period, determining that the probe request message can be sent within the second target time period, otherwise determining that the probe request message cannot be sent within the second target time period; or when the second event scheduling module receives a probe response message generation indication, obtaining the flow state context of the flow corresponding to the probe response message generation indication, and obtaining the number of queue elements corresponding to the flow from the flow state context; when the number of queue elements is greater than a preset value, determining that the probe request message can be sent within the second target time period, otherwise determining that the probe request message cannot be sent within the second target time period.

[0165] In one of the optional embodiments, the fourth time period is less than or equal to a minimum RTT of the network.

[0166] In the first solution, whether the probe response message can be sent within the second target time period can be processed in the second event scheduling module described above. When the second event scheduling module receives an indication for generating a probe response message, it obtains the flow status context (Flow Context, FC) of the corresponding flow. For example, in the implementation of an RDMA network card, it should be the next_packet_ts field segment in the QPC (QP Context), which represents the sending time of the next data packet. Then, it determines whether there is a second data message schedulable within the second target time period for the current flow, that is, it satisfies next_packet_ts – cur_ts < T4. Here, next_packet_ts is the sending time of the next data packet, that is, the scheduling time of the next second data message, cur_ts is the current time, and T4 is the second duration. In this embodiment, the second duration is equal to the length of the second target time period. Therefore, optionally, the second duration is less than or equal to the minimum RTT of the network. If there is a schedulable second data message within the T4 time period, it is marked as the in-band detection mode (for example, the probe responder sets probe_req_mode to PROBE_INBAND in the QPC), and waits to execute the probe response message sending during scheduling; if there is no schedulable second data message within the T4 time period, it is marked as the out-of-band detection mode (probe_req_mode is set to PROBE_OUTBAND in the QPC), and the probe response message is sent immediately.

[0167] In addition, it should be noted that the update of the next message scheduling time next_packet_ts is not within the scope of the design of this application and needs to be maintained by the second message sending module as required. This application assumes that the scheduling implementation of the second data message is already accurate and complete.

[0168] In the second solution, whether the probe response message can be sent within the second target time period can be processed in the second event scheduling module described above. In this embodiment, a judgment method with weakened hardware requirements can be executed. It does not need to rely on the next_pkt_ts field segment (that is, does not rely on the message-level time scheduling ability), but determines whether there is a message to be sent by checking the wqe_count (the number of WQEs to be processed, that is, the number of queue elements corresponding to the flow) in the flow status context FC. As long as the number of queue elements wqe_count corresponding to the flow is greater than a preset value, for example, 0, the in-band detection mode is selected; otherwise, the out-of-band detection mode is executed. It should be noted that in this solution, due to the lack of time scheduling ability, the instantaneity of sending in-band detection messages in this solution is weaker than that of the first solution.

[0169] In one of the optional embodiments, when the second data packet to be sent is not obtained when the second data packet sending time is reached, the detection mode is changed to the out-of-band detection mode, and a detection request message is sent.

[0170] Among them, the in-band detection mode in the present application may encounter the following scenario during actual execution: after the scheduling time of the second data packet arrives, that is, the time for sending the second data packet arrives, the second packet sending module prepares to send the second data packet of the current stream, but finds that there is actually no first data packet to send, then the out-of-band mode detection is immediately executed (for example, the detection requester sets probe_req_mode to PROBE_OUTBAND in QPC).

[0171] In one of the optional embodiments, the above method also includes: when the second event aggregation module receives a probe response message generation indication, obtaining the flow state context of the flow corresponding to the probe response message generation indication; detecting whether there is a probe response message being processed based on the flow state context; when there is a probe response message being processed, discarding the probe response message generation indication; when there is no probe response message being processed, continuing to execute the step of obtaining the second message scheduling information corresponding to the probe request message, and determining the current detection mode based on the second message scheduling information.

[0172] After the second event aggregation module of the detection requester receives the detection response message generation indication from the second message receiving module 901, it first checks the flow state context FC of the corresponding flow to see whether there is a detection response message generation indication being processed. If so, the detection response message generation indication is discarded.

[0173] Among them, whether there is a probe response message generation indication being processed can be achieved through the probe response generation identifier probe_rsp_mode in the flow state context of the flow. The probe response generation identifier probe_rsp_mode is a field segment held by the probe responder and can include the following four modes: PROBE_NULL indicates that there is currently no probe response message generation indication that needs to be executed; PROBE_ON indicates that there is currently a probe response message generation indication that needs to be executed, but the in-band or out-of-band mode of sending has not yet been determined; PROBE_INBAND indicates that there is currently a scheduled in-band probe message, and the probe message header needs to be carried when the first data message is sent next time; PROBE_OUTBAND indicates that there is currently a scheduled out-of-band probe message, and an out-of-band probe message needs to be sent immediately.

[0174] Therefore, in the present application, it is possible to determine whether there is a probe response message generation indication being processed by identifying the corresponding probe response generation identifier probe_rsp_mode. For example, whether the probe response generation identifier probe_rsp_mode is PROBE_NULL. If it is null, it indicates that there is currently no probe response message generation indication, and the probe response generation identifier probe_rsp_mode needs to be marked as PROBE_ON, and the subsequent probe response message generation indication is normally executed; otherwise, silent aggregation is performed, and the current probe response message generation indication is ignored.

[0175] It should be noted that the update of the probe response generation identifier probe_rsp_mode also includes clearing the probe response generation identifier probe_rsp_mode after the second message sending module finishes sending the probe response message, that is, setting the probe response generation identifier probe_rsp_mode to PROBE_NULL, so as to improve the accuracy of the judgment of whether there is a probe response message generation indication being processed.

[0176] In the above embodiment, when receiving the probe response message, the message or field segment parsing value can be aggregated to avoid redundant end-side message processing, which can effectively reduce the waste of network card core and algorithm computing resources caused by probing behavior.

[0177] Combined Figure 7 as shown Figure 7 FIG. is a flowchart of the probe response generation processing process of the probe response party in an embodiment. In this embodiment, after the second message receiving module receives the probe request message, it generates a probe response message generation indication and sends it to the second aggregation module. The second aggregation module detects whether the probe response generation identifier probe_rsp_mode is PROBE_NULL. If the probe response generation identifier probe_rsp_mode is PROBE_ON, the probe response message generation indication is discarded, and the probe response generation process is completed. If the probe response generation identifier probe_rsp_mode is PROBE_NULL, the probe response message generation indication is sent to the second event scheduling module, and the probe response generation identifier probe_rsp_mode is set to PROBE_ON. The second event scheduling module then performs a mode judgment, that is, it satisfies next_packet_ts–cur_ts<T4. If there is a schedulable second data message within the T4 time period, it is marked as the in-band probing mode, and the second message sending module is scheduled to wait for the next time to send the second data message and only perform probing. If there is no schedulable second data message within the T4 time period, it is marked as the out-of-band probing mode, and therefore the second message sending module is scheduled to immediately send the probe response message.

[0178] After the second message sending module sends the probe response message, the flow state information is updated, that is, after the probe response generation identifier probe_rsp_mode is set to PROBE_NULL, the probe response message generation process is completed.

[0179] In the above embodiment, the probe responder can give priority to sending the probe request message in the in-band detection mode when executing the sending of the probe response message, which can effectively reduce the resource occupation of the overall network bandwidth by the detection behavior. In addition, when executing the reception of the probe response message, the message or domain segment resolution value can be aggregated to avoid redundant end-side message processing, which can effectively reduce the waste of network card core and algorithm core computing resources by the detection behavior.

[0180] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0181] Based on the same inventive concept, the embodiment of the present application also provides a probe request message sending device and a probe response message sending device for implementing the above-mentioned probe request message sending method and probe response message sending method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the embodiments of one or more probe request message sending devices and probe response message sending devices provided below can refer to the limitations of the probe request message sending method and the probe response message sending method in the above text, and will not be repeated here.

[0182] In an exemplary embodiment, Figure 8 As shown, a detection request message sending device is provided, including: a first event scheduling module 802 and a first message sending module 804, wherein:

[0183] A first event scheduling module 802, configured to obtain first message scheduling information corresponding to a flow, and determine a current detection mode based on the first message scheduling information;

[0184] The first message sending module 804 is used to send a detection request message when the current detection mode is the out-of-band detection mode; when the current detection mode is the in-band detection mode, add the first detection message header of the detection request message to the first data message to be sent next time, and when the first data message sending time is reached, send the first data message to which the first detection message header is added.

[0185] In one of the optional embodiments, the above-mentioned first event scheduling module 802 is specifically used to determine whether the detection request message can be sent within the first target time period based on the first message scheduling information; if the detection request message can be sent within the first target time period, the current detection mode is determined to be an in-band detection mode, otherwise, the current detection mode is an out-of-band detection mode.

[0186] In one of the optional embodiments, the above-mentioned first event scheduling module 802 specifically determines whether the detection request message can be sent within the first target time period based on the first message scheduling information in any of the following ways: when the first event scheduling module receives the detection request, the flow state context of the flow corresponding to the detection request is obtained, and the next data packet sending time is obtained from the flow state context; when the difference between the next data packet sending time and the current time is less than the first duration, it is determined that the detection request message can be sent within the first target time period, otherwise it is determined that the detection request message cannot be sent within the first target time period; or when the first event scheduling module receives the detection request Under, obtain the flow state context of the flow corresponding to the detection request, and obtain the number of queue elements corresponding to the flow from the flow state context; when the number of queue elements is greater than a preset value, determine that the detection request message can be sent within the first target time period, otherwise determine that the detection request message cannot be sent within the first target time period; or obtain the difference between the timestamp when the actual detection request message is sent and the timestamp of the last time indicating the first event scheduling module to perform detection through the upper-level module, and when the difference is greater than the second duration, determine that the detection request message can be sent within the first target time period, otherwise determine that the detection request message cannot be sent within the first target time period.

[0187] In one of the optional embodiments, the first duration is less than or equal to a minimum RTT of the network.

[0188] In one of the optional embodiments, the first event scheduling module is further used to modify the detection mode to the out-of-band detection mode and send a detection request message when the first data message sending time is reached and the first data message to be sent is not obtained.

[0189] In one of the optional embodiments, the above-mentioned first event scheduling module is also used to detect whether the flow corresponding to the detection request has sent any message in the past third time period based on the first message scheduling information when the first event scheduling module receives a detection request; if the flow has sent any message in the past third time period, continue to execute the step of determining the current detection mode based on the first message scheduling information; if the flow has not sent any message in the past third time period, discard the detection request message.

[0190] In one of the optional embodiments, the third time period is greater than or equal to the timeout retransmission time of the detection requester as the data sender.

[0191] In one of the optional embodiments, the above-mentioned first event scheduling module is also used to read the last message sending timestamp and the current probe request timestamp recorded in the congestion control state context of the corresponding flow in the upper layer module; when the difference between the last message sending timestamp and the probe request timestamp is greater than a fourth time period, discard the probe request; when the difference between the last message sending timestamp and the probe request timestamp is less than or equal to the fourth time period, send a probe request.

[0192] In one of the optional embodiments, the above-mentioned device also includes: a first event aggregation module, which is used to obtain the flow state context of the flow corresponding to the detection request when the first event aggregation module receives the detection request; detect whether there is a detection request message being processed based on the flow state context; if there is a detection request message being processed, discard the detection request; if there is no detection request message being processed, continue to execute the steps of obtaining the first message scheduling information corresponding to the flow, and determine the current detection mode based on the first message scheduling information.

[0193] In one of the optional embodiments, the above-mentioned first event aggregation module is also used to obtain the flow state context of the flow corresponding to the detection response result when the first event aggregation module receives the detection response result; based on the flow state context, detect whether there is a detection response result being reported to the upper layer module; in the case that there is a detection response result being reported to the upper layer module, overwrite the detection response result being reported by receiving the detection response result; in the case that there is no detection response result being reported to the upper layer module, report the received detection response result to the upper layer module.

[0194] In an exemplary embodiment, Fig. 9As shown, a detection response message sending device is provided, including: a second message receiving module 901, a second event scheduling module 902 and a second message sending module 903, wherein:

[0195] The second message receiving module 901 is used to receive the detection request message;

[0196] A second event scheduling module 902, configured to obtain second message scheduling information corresponding to the detection request message, and determine a current detection mode based on the second message scheduling information;

[0197] The second message sending module 903 is used to send a detection response message corresponding to the detection request message when the current detection mode is the out-of-band detection mode; when the current detection mode is the in-band detection mode, add a second detection message header corresponding to the detection response message to the second data message to be sent next time, and when the second data message sending time is reached, send the second data message to which the second detection message header is added.

[0198] In one of the optional embodiments, the above-mentioned second event scheduling module 902 is specifically used to determine whether the detection request message can be sent within the second target time period based on the second message scheduling information; if the detection request message can be sent within the second target time period, the current detection mode is determined to be an in-band detection mode, otherwise, the current detection mode is an out-of-band detection mode.

[0199] In one of the optional embodiments, the above-mentioned second event scheduling module 902 specifically obtains the flow state context of the flow corresponding to the detection response message generation indication when the second event scheduling module receives the detection response message generation indication, and obtains the next data packet sending time from the flow state context in any of the following ways; when the difference between the next data packet sending time and the current time is less than the fourth time period, it is determined that the detection request message can be sent within the second target time period, otherwise it is determined that the detection request message cannot be sent within the second target time period; or when the second event scheduling module receives the detection response message generation indication, it obtains the flow state context of the flow corresponding to the detection response message generation indication, and obtains the number of queue elements corresponding to the flow from the flow state context; when the number of queue elements is greater than a preset value, it is determined that the detection request message can be sent within the second target time period, otherwise it is determined that the detection request message cannot be sent within the second target time period.

[0200] In one of the optional embodiments, the fourth time period is less than or equal to a minimum RTT of the network.

[0201] In one of the optional embodiments, the second event scheduling module is further used to modify the detection mode to the out-of-band detection mode and send a detection request message when the first data message is sent and the first data message is not received.

[0202] In one of the optional embodiments, the above-mentioned device also includes: a second event aggregation module, which is used to obtain the flow state context of the flow corresponding to the probe response message generation indication when the second event aggregation module receives the probe response message generation indication; detect whether there is a probe response message being processed based on the flow state context; if there is a probe response message being processed, discard the probe response message generation indication; if there is no probe response message being processed, continue to execute the step of obtaining the second message scheduling information corresponding to the probe request message, and determine the current detection mode based on the second message scheduling information.

[0203] Each module in the above-mentioned detection request message sending device and detection response message sending device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0204] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.10As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a method for sending a detection request message and a method for sending a detection response message are implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0205] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0206] In one embodiment, a chip is provided, the chip includes a memory and a processor, the memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program. The chip may be a data processing unit (DPU) chip.

[0207] In one embodiment, a computer device is provided. The computer device includes a processor and the above chip. The chip is used to dispatch messages to the processor or the chip itself for processing. The processor is used to process the messages dispatched by the chip.

[0208] In one embodiment, a network interface card is provided, the network interface card includes the above chip and multiple interfaces, and the chip communicates with the outside through the interface. The interface includes a PCI / PCIE interface, a network interface, and the like.

[0209] In one embodiment, a computer device is provided. The computer device includes a processor and the above-mentioned network interface card. The network interface card is used to dispatch messages to the processor or the network interface card itself for processing, and the processor is used to process the messages dispatched by the network interface card.

[0210] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0211] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0212] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0213] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0214] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for sending a probe request message, characterized in that: Applied to the detection requester, the method comprises: Obtaining first message scheduling information corresponding to the flow, and determining a current detection mode based on the first message scheduling information; When the current detection mode is the out-of-band detection mode, sending a detection request message; When the current detection mode is the in-band detection mode, the first detection message header of the detection request message is added to the first data message to be sent next time, and when the first data message sending time is reached, the first data message with the first detection message header added is sent.

2. The method according to claim 1, characterized in that The determining the current detection mode based on the first message scheduling information includes: Determining whether the probe request message can be sent within a first target time period based on the first message scheduling information; If the detection request message can be sent within the first target time period, it is determined that the current detection mode is the in-band detection mode; otherwise, the current detection mode is the out-of-band detection mode.

3. The method according to claim 2, characterized in that The determining whether the probe request message can be sent within the first target time period based on the first message scheduling information includes any one of the following: When the first event scheduling module receives the detection request, it obtains the flow state context of the flow corresponding to the detection request, and obtains the next data packet sending time from the flow state context; If the difference between the next data packet sending time and the current time is less than the first duration, determine that the probe request message can be sent within the first target time period; otherwise, determine that the probe request message cannot be sent within the first target time period; or When the first event scheduling module receives a detection request, it obtains the flow state context of the flow corresponding to the detection request, and obtains the number of queue elements corresponding to the flow from the flow state context; when the number of queue elements is greater than a preset value, it is determined that the detection request message can be sent within the first target time period, otherwise it is determined that the detection request message cannot be sent within the first target time period; or The difference between the timestamp of when the actual detection request message is sent and the timestamp of the last time the first event scheduling module was instructed to perform detection is obtained through the upper-layer module. If the difference is greater than the second time length, it is determined that the detection request message can be sent within the first target time period; otherwise, it is determined that the detection request message cannot be sent within the first target time period.

4. The method according to claim 3, characterized in that The first duration is less than or equal to a minimum RTT of the network.

5. The method according to claim 1, characterized in that The method further comprises: When the first data packet is sent and the first data packet to be sent is not obtained, the detection mode is changed to the out-of-band detection mode, and a detection request message is sent.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: When the first event scheduling module receives the detection request, based on the first message scheduling information, detecting whether the flow corresponding to the detection request has sent a message in the past third time period; If there is a message sent by the flow within the third time period in the past, then continue to perform the step of determining the current detection mode based on the first message scheduling information; If no message has been sent by the flow within the past third time period, the probe request message is discarded.

7. The method according to claim 6, characterized in that The third time period is greater than or equal to the timeout retransmission time of the detection requester as the data sender.

8. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: In the upper layer module, read the last message sending timestamp and the current probe request timestamp recorded in the congestion control state context of the corresponding flow; If the difference between the timestamp of the last message sending and the timestamp of the probe request is greater than a fourth time period, discard the probe request; When the difference between the timestamp of the last message sending and the timestamp of the probe request is less than or equal to a fourth time period, a probe request is sent.

9. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: When the first event aggregation module receives the detection request, it obtains the flow state context of the flow corresponding to the detection request; Detecting whether there is a probe request message being processed based on the flow state context; If there is a probe request message being processed, discard the probe request; In the case that there is no detection request message being processed, the steps of obtaining first message scheduling information corresponding to the flow and determining the current detection mode based on the first message scheduling information are continued.

10. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: When the first event aggregation module receives the detection response result, it obtains the flow state context of the flow corresponding to the detection response result; Based on the flow state context, detecting whether there is a probe response result being reported to an upper layer module; In the case where there is a probe response result being reported to the upper layer module, the probe response result being reported is overwritten by the received probe response result; In the case that there is no probe response result being reported to the upper layer module, the received probe response result is reported to the upper layer module.

11. A method for sending a probe response message, characterized in that: Applied to the detection responder, the method includes: Receive a probe request message; Acquire second message scheduling information corresponding to the detection request message, and determine a current detection mode based on the second message scheduling information; When the current detection mode is the out-of-band detection mode, sending a detection response message corresponding to the detection request message; When the current detection mode is the in-band detection mode, a second detection message header corresponding to the detection response message is added to the second data message to be sent next time, and when the time for sending the second data message is reached, the second data message with the second detection message header added is sent.

12. The method according to claim 11, characterized in that The determining the current detection mode based on the second message scheduling information includes: Determining whether the probe request message can be sent within a second target time period based on the second message scheduling information; If the detection request message can be sent within the second target time period, it is determined that the current detection mode is the in-band detection mode; otherwise, the current detection mode is the out-of-band detection mode.

13. The method according to claim 12, characterized in that The determining whether the probe request message can be sent within the second target time period based on the second message scheduling information includes any one of the following: When the second event scheduling module receives a probe response message generation indication, the flow state context of the flow corresponding to the probe response message generation indication is obtained, and the next data packet sending time is obtained from the flow state context; when the difference between the next data packet sending time and the current time is less than a fourth time period, it is determined that the probe request message can be sent within the second target time period, otherwise it is determined that the probe request message cannot be sent within the second target time period; or When the second event scheduling module receives a probe response message generation indication, it obtains the flow state context of the flow corresponding to the probe response message generation indication, and obtains the number of queue elements corresponding to the flow from the flow state context; when the number of queue elements is greater than a preset value, it is determined that the probe request message can be sent within the second target time period; otherwise, it is determined that the probe request message cannot be sent within the second target time period.

14. The method according to claim 13, characterized in that The fourth time period is less than or equal to a minimum RTT of the network.

15. The method according to claim 11, characterized in that The method further comprises: When the second data packet to be sent is not obtained when the second data packet sending time is reached, the detection mode is modified to the out-of-band detection mode, and a detection request message is sent.

16. The method according to any one of claims 11 to 15, characterized in that: The method further comprises: When the second event aggregation module receives the detection response message generation indication, it obtains the flow state context of the flow corresponding to the detection response message generation indication; Detecting whether there is a probe response message being processed based on the flow state context; If there is a probe response message being processed, discard the probe response message generation indication; In the case that there is no probe response message being processed, the step of obtaining second message scheduling information corresponding to the probe request message and determining the current detection mode based on the second message scheduling information is continued.

17. A detection request message sending device, characterized in that: The device comprises: A first event scheduling module, used to obtain first message scheduling information corresponding to the flow, and determine a current detection mode based on the first message scheduling information; The first message sending module is used to send a detection request message when the current detection mode is an out-of-band detection mode; when the current detection mode is an in-band detection mode, add a first detection message header of the detection request message to the first data message to be sent next time, and send the first data message to which the first detection message header is added when the first data message sending time is reached.

18. A detection response message sending device, characterized in that: The device comprises: A second message receiving module, used for receiving a detection request message; A second event scheduling module, used to obtain second message scheduling information corresponding to the detection request message, and determine a current detection mode based on the second message scheduling information; A second message sending module is used to send a probe response message corresponding to the probe request message when the current detection mode is an out-of-band detection mode; add a second detection message header corresponding to the detection response message to the second data message to be sent next time when the current detection mode is an in-band detection mode, and send the second data message to which the second detection message header is added when the second data message sending time is reached.

19. A chip comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 16 are implemented.

20. A computer device comprising a processor and the chip as claimed in claim 19, characterized in that: The chip is used to dispatch the message to the processor or the chip itself for processing, and the processor is used to process the message dispatched by the chip.

21. A network interface card, characterized in that: It comprises the chip and the interface as claimed in claim 19, wherein the chip communicates externally through the interface.

22. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 16 are implemented.

23. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 16 are implemented.

Citation Information

Cited By

  • Performance data detection method and device, computer equipment and storage medium

    CN120128511A