Message processing method and device, electronic equipment and storage medium

By adding an HRD processing module to the host device to divide and distribute the packets of the RoCEv2 data stream, the problem of unbalanced forwarding path of the RoCEv2 data stream is solved, reliable but non-order-preserved message transmission is achieved, and the scalability of the network is improved.

CN120200983AActive Publication Date: 2025-06-24NEW H3C TECH CO LTD
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202311723574.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-14
Publication Date
2025-06-24
Estimated Expiration
2043-12-14

AI Technical Summary

Technical Problem

In HPC and AI applications networks, the forwarding path of the RoCEv2 data stream is uneven, resulting in poor scalability, especially in the case of elephant streams.

Method used

The HRD processing module is added to the host device, divide the RoCEv2 data stream into multiple sub-data streams, and distribute the corresponding RoCEv2 messages to different paths to transmit, realizing reliable but non-order-preserving message transmission.

Benefits of technology

Through the processing method of the HRD processing module, reliable message transmission can be achieved without interface adaptation, effectively utilize path resources, easy operation, and good applicability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120200983A_ABST
    Figure CN120200983A_ABST
Patent Text Reader

Abstract

The invention provides a message processing method and device, electronic equipment and a storage medium. The method is applied to an HRD processing module in host equipment, and comprises the following steps: receiving a first RoCEv2 data stream sent by a processing module corresponding to a service mode supported by the host equipment in the host equipment; dividing the first RoCEv2 data stream into a plurality of first sub-data streams, and determining source ports used by a plurality of first RoCEv2 messages corresponding to each first sub-data stream based on available ports on the first RoCEv2 data stream; and caching a plurality of first RoCEv2 messages corresponding to each first sub-data stream to a sub-data stream queue corresponding to a corresponding source port, and for each sub-data stream queue, sending the first RoCEv2 messages to a destination host device of the first RoCEv2 data stream sequentially based on quintuple information of each first RoCEv2 message in the sub-data stream queue. The application can improve the applicability of the host device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a method and apparatus for packet processing, an electronic device, and a storage medium. Background Art

[0002] RoCE (RDMA over Converged Ethernet), that is, RDMA technology based on Ethernet. RoCE has two versions, one of which is RoCEv2. RoCEv2 is based on the User Datagram Protocol (UDP) protocol of Ethernet, and the host device supporting the RoCEv2 protocol provides four service modes, namely, Reliable Connection (RC) mode, Reliable Datagram (RD) mode, Unreliable Connection (UC) mode, and Unreliable Datagram (UD) mode.

[0003] Currently, applications such as High Performance Computing (HPC) and Artificial Intelligence (AI) all use the RoCEv2 protocol to achieve low-latency data transmission, and usually use the RC mode to transmit RoCEv2 data streams.

[0004] In the case of elephant flows existing in the network where applications such as HPC and AI are located, when the host device uses the RC mode to transmit RoCEv2 data streams, there will be problems such as unbalanced forwarding paths and poor scalability of the RoCEv2 packets corresponding to the RoCEv2 data streams. In one application scenario, a new service mode, namely, Scalable Reliable Datagram (SRD) mode, is added to the host device. The SRD mode does not retain the packet order of RoCEv2 packets and sends RoCEv2 packets through as many network paths as possible to avoid path overload, and has good scalability.

[0005] However, adopting the SRD mode requires modifying relevant driver programs, kernel programs, etc. of the host device, and also requires re-adapting the SRD interface, which is inconvenient to operate and has poor applicability. Summary of the Invention

[0006] To overcome the problems existing in the related art, this application provides a method and apparatus for packet processing, an electronic device, and a storage medium.

[0007] According to the first aspect of the embodiments of the present application, a packet processing method is provided. The method is applied to an HRD processing module in a host device, and the method includes:

[0008] Receiving a first RoCEv2 data stream sent by a processing module corresponding to a service mode supported by the host device in the host device, where the service mode is the RC mode, the RD mode, the UC mode, or the UD mode;

[0009] Dividing the first RoCEv2 data stream into multiple first sub-data streams, and determining source ports used by multiple first RoCEv2 packets corresponding to each first sub-data stream based on available ports on itself, where multiple first RoCEv2 packets corresponding to one sub-data stream use the same source port, and multiple first RoCEv2 packets corresponding to different sub-data streams use different source ports;

[0010] Caching multiple first RoCEv2 packets corresponding to each first sub-data stream into a sub-data stream queue corresponding to the corresponding source port, and for each sub-data stream queue, sequentially sending the first RoCEv2 packet to the destination host device of the first RoCEv2 data stream based on the five-tuple information of each first RoCEv2 packet in the sub-data stream queue.

[0011] According to the second aspect of the embodiments of the present application, a packet processing device is provided. The device is applied to an HRD processing module in a host device, and the device includes:

[0012] A receiving unit, configured to receive a first RoCEv2 data stream sent by a processing module corresponding to a service mode supported by the host device in the host device, where the service mode is the RC mode, the RD mode, the UC mode, or the UD mode;

[0013] A determining unit, configured to divide the first RoCEv2 data stream into multiple first sub-data streams, and determine source ports used by multiple first RoCEv2 packets corresponding to each first sub-data stream based on available ports on itself, where multiple first RoCEv2 packets corresponding to one sub-data stream use the same source port, and multiple first RoCEv2 packets corresponding to different sub-data streams use different source ports;

[0014] A caching and sending unit, configured to cache multiple first RoCEv2 packets corresponding to each first sub-data stream into a sub-data stream queue corresponding to the corresponding source port, and for each sub-data stream queue, sequentially send the first RoCEv2 packet to the destination host device of the first RoCEv2 data stream based on the five-tuple information of each first RoCEv2 packet in the sub-data stream queue.

[0015] The technical solutions provided by the embodiments of the present application may include the following beneficial effects:

[0016] In the embodiments of the present application, an HRD processing module is added to the host device, which is responsible for processing the RoCEv2 data stream from the processing module corresponding to the RC mode, the processing module corresponding to the RD mode, the processing module corresponding to the UC mode, or the processing module corresponding to the UD mode in the host device, dividing the RoCEv2 data stream into multiple sub-data streams, and dispersing the RoCEv2 packets corresponding to the sub-data streams to different paths for transmission. This packet processing method can achieve reliable but not in-sequence packet transmission without interface adaptation, and can also effectively utilize path resources, is convenient to operate, and has good applicability.

[0017] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings herein are incorporated into the specification and constitute a part of the present application, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.

[0019] Figure 1 It is a schematic flowchart of a packet processing method provided by an embodiment of the present application;

[0020] Figure 2 It is a schematic structural diagram of a packet processing device provided by an embodiment of the present application;

[0021] Figure 3 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0023] The terms used in the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms of "a", "the", and "said" used in the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0024] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" or "when" as used herein may be interpreted as "when... " or "while... ".

[0025] Next, the embodiments of this application will be described in detail.

[0026] The embodiment of this application provides a message processing method, which is applied to a High-performance Reliable Datagram (HRD) processing module in a host device, such as Figure 1 As shown, the method may include the following steps:

[0027] S11. Receive the first RoCEv2 data stream sent by the processing module corresponding to the service mode supported by the host device in the host device.

[0028] In this step, the above service mode is the RC mode, the RD mode, the UC mode or the UD mode.

[0029] It should be noted that the specific process of obtaining the first RoCEv2 data stream on the processing module side corresponding to the service mode supported by the host device is a prior art and will not be elaborated herein.

[0030] S12. Divide the first RoCEv2 data stream into multiple first sub-data streams, and based on the available ports on itself, determine the source ports used by multiple first RoCEv2 messages corresponding to each first sub-data stream.

[0031] In this step, the source ports used by multiple first RoCEv2 messages corresponding to one sub-data stream are the same, and the source ports used by multiple first RoCEv2 messages corresponding to different sub-data streams are different.

[0032] S13. Cache multiple first RoCEv2 messages corresponding to each first sub-data stream into the sub-data stream queue corresponding to the corresponding source port, and for each sub-data stream queue, sequentially based on the five-tuple information of each first RoCEv2 message in the sub-data stream queue, send the first RoCEv2 message to the destination host device of the first RoCEv2 data stream.

[0033] Specifically, in the above step S12, the HRD processing module can divide the first RoCEv2 data stream into multiple first sub-data streams in various ways. For example, the HRD processing module can divide the first RoCEv2 data stream into multiple first sub-data streams based on the configured division rules. The specific number of the first sub-data streams and the number of RoCEv2 packets corresponding to each first sub-data stream can be configured in the division rules.

[0034] In addition, in this step, the HRD processing module can determine the source ports used by multiple first RoCEv2 packets corresponding to each first sub-data stream in the following ways:

[0035] For each first sub-data stream, randomly select an available port from the available ports on itself, and use the selected available port as the source port for the multiple first RoCEv2 packets corresponding to this first sub-data stream.

[0036] Of course, the HRD processing module can also determine the source ports used by multiple first RoCEv2 packets corresponding to each first sub-data stream in other ways, which will not be listed one by one here.

[0037] Specifically, in the above step S13, for any RoCEv2 packet in any sub-data stream queue, the HRD processing module can perform a hash operation on the five-tuple information of the first RoCEv2 packet according to a preset hash algorithm to obtain a hash result; and based on the corresponding relationship between each hash result stored locally and each output port, find the output port corresponding to the calculated hash result, and send the first RoCEv2 packet to the corresponding next-hop device through this output port, so that the next-hop device can continue to forward the first RoCEv2 packet to the destination host device.

[0038] Furthermore, in the embodiments of the present application, the HRD processing module can also perform the following operations:

[0039] After sending the first RoCEv2 packet to the destination host device, start a timeout timer;

[0040] If an acknowledgment packet sent by the destination host device for the first RoCEv2 packet is received within the timeout duration of the timeout timer, close the timeout timer;

[0041] When the acknowledgment packet carries the first timestamp when the HRD processing module sends the first RoCEv2 packet, calculate the RTT value of the path for transmitting the first RoCEv2 packet based on the first timestamp and the second timestamp when the acknowledgment packet is received, and assign the calculated RTT value to the RTT value corresponding to the sub-data stream queue;

[0042] If the first RoCEv2 packet is not the last first RoCEv2 packet in the sub-data flow queue and the calculated RTT value is greater than the first set threshold, then the unsent first RoCEv2 packets in the sub-data flow queue are cached into a sub-data flow queue corresponding to an RTT value not greater than the second set threshold, where the first set threshold is greater than the second set threshold; or,

[0043] When the number of first RoCEv2 packets sent by the HRD processing module cached in the destination host device is carried in the acknowledgment packet, if the number of packets is not greater than the set number, then the current packet sending rate is maintained; if the number of packets is greater than the set number, then the current packet sending rate is reduced according to a preset rule.

[0044] In this operation process, the HRD processing module will perform a subtraction operation on the second timestamp and the first timestamp to obtain the RTT value of the path for transmitting the first RoCEv2 packet.

[0045] For example, assume that the HRD processing module receives RoCEv2 data flow 1 sent by the processing module corresponding to the RC mode in the host device, and RoCEv2 data flow 1 is divided into 3 sub-data flows, namely sub-data flow 1, sub-data flow 2, and sub-data flow 3; and, each sub-data flow corresponds to 5 RoCEv2 packets.

[0046] Also assume that after the HRD processing module sends the first RoCEv2 packet corresponding to sub-data flow 1 to the destination host device, it starts a timeout timer, and, within the timeout duration of the timeout timer, it receives an acknowledgment packet sent by the destination host device for this RoCEv2 packet. At this time, the HRD processing module closes the timeout timer and finds that the acknowledgment packet carries the first timestamp when the HRD processing module sends this RoCEv2 packet. In this case, the HRD processing module performs a subtraction operation on the second timestamp when it receives the acknowledgment packet and the first timestamp, takes the operation result as the RTT value of the path for transmitting the first RoCEv2 packet, and assigns the operation result to the RTT value corresponding to the sub-data flow queue corresponding to sub-data flow 1.

[0047] Assume that the operation result is greater than the first set threshold, and, assume that the RTT value corresponding to the current sub-data flow queue of sub-data flow 1 is less than the second set threshold. Then, the HRD processing module will cache the 4 unsent first RoCEv2 packets in the sub-data flow queue caching the first RoCEv2 packets corresponding to sub-data flow 3 into the sub-data flow queue corresponding to sub-data flow 1.

[0048] It should be noted that for any first RoCEv2 packet in any sub-data stream queue, once the corresponding acknowledgment packet is received, the HRD processing module calculates the corresponding RTT value and assigns it as the RTT value corresponding to the sub-data stream queue. Therefore, the RTT value corresponding to the sub-data stream queue changes dynamically.

[0049] Further, it should be noted that in this operation process, initially, the HRD processing module sends the first RoCEv2 packets in the sub-data stream queue at the set sending rate.

[0050] When the HRD processing module reduces the current packet sending rate, the preset rules can be to reduce the current packet sending rate according to a set ratio, reduce the current packet sending rate according to a set value, etc.

[0051] In addition, for the HRD processing module, if the acknowledgment packet for the first RoCEv2 packet sent by the destination host device is not received within the timeout duration of the timeout timer, the first RoCEv2 packet is resent to the destination host device, and the timeout timer is restarted until the acknowledgment packet for the first RoCEv2 packet sent by the destination host device is received.

[0052] It should be noted that in the embodiments of the present application, the above timeout duration, first set threshold, second set threshold, and set quantity can all be set by the administrator according to network requirements and pre-configured on the HRD processing module.

[0053] Furthermore, in the embodiments of the present application, the HRD processing module can also perform the following operations:

[0054] When receiving a second RoCEv2 packet corresponding to the target sub-data stream of the second RoCEv2 data stream sent by the destination host device, if it is determined according to the service mode carried in the second RoCEv2 packet that the second RoCEv2 packet is a packet that does not require in-sequence delivery, the second RoCEv2 packet is sent to the processing module corresponding to the service mode carried in the second RoCEv2 packet for processing, and an acknowledgment packet indicating that the second RoCEv2 packet has been successfully received is sent to the destination host device;

[0055] If it is determined according to the service mode carried in the second RoCEv2 packet that the second RoCEv2 packet is a packet that requires in-sequence delivery, the second RoCEv2 packet is sent to the processing module corresponding to the service mode carried in the second RoCEv2 packet for processing, or,

[0056] When the number of packets in the cache queue corresponding to the service mode carried in the second RoCEv2 packet does not reach the preset number, cache the second RoCEv2 packet into the cache queue. When the number of packets in the cache queue reaches the preset number, sort the second RoCEv2 packets in the cache queue in ascending order of packet sequence numbers, and sequentially send each sorted second RoCEv2 packet to the corresponding processing module for processing.

[0057] By executing the above operation process, the HRD processing module can process the RoCEv2 data stream from the processing module corresponding to the RC mode, the processing module corresponding to the RD mode, the processing module corresponding to the UC mode, or the processing module corresponding to the UD mode in the host device, improving the applicability.

[0058] Specifically, in this operation process, the HRD processing module can determine whether the second RoCEv2 packet is a packet that needs to be in-sequence by the following method:

[0059] If the service mode carried in the second RoCEv2 packet is the RC mode or the RD mode, determine that the second RoCEv2 packet is a packet that needs to be in-sequence;

[0060] If the service mode carried in the second RoCEv2 packet is the UC mode or the UD mode, determine that the second RoCEv2 packet is a packet that does not need to be in-sequence.

[0061] It can be seen from the above technical solutions that in the embodiment of the present application, an HRD processing module is added in the host device, which is responsible for processing the RoCEv2 data stream from the processing module corresponding to the RC mode, the processing module corresponding to the RD mode, the processing module corresponding to the UC mode, or the processing module corresponding to the UD mode in the host device, dividing the RoCEv2 data stream into multiple sub-data streams, and dispersing the RoCEv2 packets corresponding to the sub-data streams to different paths for transmission. This packet processing method can achieve reliable but not in-sequence packet transmission without interface adaptation, and can also effectively utilize path resources, is convenient to operate, and has good applicability.

[0062] Based on the same inventive concept, the present application also provides a packet processing device, which is the HRD processing module applied to the host device, and its structural schematic diagram is as Figure 2 shown, and specifically includes:

[0063] A receiving unit 21, configured to receive a first RoCEv2 data stream sent by a processing module corresponding to a service mode supported by the host device in the host device, where the service mode is the RC mode, the RD mode, the UC mode, or the UD mode;

[0064] A determining unit 22, configured to divide the first RoCEv2 data stream into multiple first sub-data streams, and determine source ports used by multiple first RoCEv2 packets corresponding to each first sub-data stream based on available ports on itself, where source ports used by multiple first RoCEv2 packets corresponding to one sub-data stream are the same, and source ports used by multiple first RoCEv2 packets corresponding to different sub-data streams are different;

[0065] A cache sending unit 23, configured to cache multiple first RoCEv2 packets corresponding to each first sub-data stream into a sub-data stream queue corresponding to the corresponding source port, and for each sub-data stream queue, sequentially send the first RoCEv2 packet to a destination host device of the first RoCEv2 data stream based on five-tuple information of each first RoCEv2 packet in the sub-data stream queue.

[0066] Preferably, the determining unit is specifically configured to:

[0067] For each first sub-data stream, randomly select an available port from available ports on itself, and use the selected available port as the source port used by multiple first RoCEv2 packets corresponding to the first sub-data stream.

[0068] Preferably, the apparatus further includes:

[0069] An adjustment unit (not shown in Figure 2 ), configured to start a timeout timer after sending the first RoCEv2 packet to the destination host device;

[0070] If an acknowledgment packet for the first RoCEv2 packet sent by the destination host device is received within the timeout duration of the timeout timer, close the timeout timer;

[0071] When a first timestamp when the HRD processing module sends the first RoCEv2 packet is carried in the acknowledgment packet, calculate an RTT value of a path for transmitting the first RoCEv2 packet based on the first timestamp and a second timestamp when the acknowledgment packet is received, and assign the calculated RTT value to the RTT value corresponding to the sub-data stream queue;

[0072] If the first RoCEv2 packet is not the last first RoCEv2 packet in the sub-data stream queue and the calculated RTT value is greater than a first set threshold, cache the first RoCEv2 packets not sent in the sub-data stream queue into a sub-data stream queue whose corresponding RTT value is not greater than a second set threshold, where the first set threshold is greater than the second set threshold; or,

[0073] When the number of packets of the first RoCEv2 packet sent by the HRD processing module cached in the destination host device is carried in the acknowledgment packet, if the number of packets is not greater than the set number, the current packet sending rate is maintained; if the number of packets is greater than the set number, the current packet sending rate is reduced according to a preset rule.

[0074] Preferably, the cache sending unit 23 is further configured to:

[0075] If an acknowledgment packet for the first RoCEv2 packet sent by the destination host device is not received within the timeout duration of the timeout timer, the first RoCEv2 packet is resent to the destination host device, and the timeout timer is restarted until an acknowledgment packet for the first RoCEv2 packet sent by the destination host device is received.

[0076] Preferably, the apparatus further includes:

[0077] A processing unit ( Figure 2 not shown in the figure), when receiving a second RoCEv2 packet corresponding to a target sub-data stream of the second RoCEv2 data stream sent by the destination host device, if it is determined according to the service mode carried in the second RoCEv2 packet that the second RoCEv2 packet is a packet that does not require in-order delivery, the second RoCEv2 packet is sent to the processing module corresponding to the service mode carried in the second RoCEv2 packet for processing, and an acknowledgment packet indicating that the second RoCEv2 packet has been successfully received is sent to the destination host device;

[0078] If it is determined according to the service mode carried in the second RoCEv2 packet that the second RoCEv2 packet is a packet that requires in-order delivery, the second RoCEv2 packet is sent to the processing module corresponding to the service mode carried in the second RoCEv2 packet for processing, or

[0079] when the number of packets in the cache queue corresponding to the service mode carried in the second RoCEv2 packet does not reach the preset number, the second RoCEv2 packet is cached in the cache queue, and when the number of packets in the cache queue reaches the preset number, the second RoCEv2 packets in the cache queue are sorted in ascending order of packet sequence numbers, and each sorted second RoCEv2 packet is sequentially sent to the corresponding processing module for processing.

[0080] Preferably, the processing unit is specifically configured to determine whether the second RoCEv2 packet is a packet that requires in-order delivery in the following manner:

[0081] If the service mode carried in the second RoCEv2 packet is the RC mode or the RD mode, determine that the second RoCEv2 packet is a packet that requires in-order delivery.

[0082] If the service mode carried in the second RoCEv2 packet is the UC mode or the UD mode, determine that the second RoCEv2 packet is a packet that does not require in-order delivery.

[0083] As can be seen from the above technical solutions, in the embodiment of the present application, an HRD processing module is added in the host device, which is responsible for processing the RoCEv2 data stream from the processing module corresponding to the RC mode, the processing module corresponding to the RD mode, the processing module corresponding to the UC mode, or the processing module corresponding to the UD mode in the host device, dividing the RoCEv2 data stream into multiple sub-data streams, and dispersing the RoCEv2 packets corresponding to the sub-data streams to different paths for transmission. This packet processing method can achieve reliable but not in-order packet transmission without interface adaptation, and can also effectively utilize path resources, is convenient to operate, and has good applicability.

[0084] The embodiment of the present application also provides an electronic device, as Figure 3 shown, including a processor 31 and a machine-readable storage medium 32. The machine-readable storage medium 32 stores machine-executable instructions that can be executed by the processor 31. The processor 31 is prompted by the machine-executable instructions to implement the steps of the above packet processing method.

[0085] The above-mentioned machine-readable storage medium may include a random access memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory. Optionally, the machine-readable storage medium may also be at least one storage device located far from the aforementioned processor.

[0086] The above-mentioned processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; it may also be a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field-Programmable Gate Array, FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0087] In another embodiment provided by the present application, a computer-readable storage medium is further provided. A computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned message processing method are implemented.

[0088] The foregoing are only the preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included within the scope of protection of the present application.

Claims

1. A message processing method, characterized in that, The method is applied to a High-Performance Reliable Datagram (HRD) processing module in a host device, and the method includes: Receiving a first RoCEv2 data stream sent by a processing module corresponding to a service mode supported by the host device in the host device, where the service mode is a Reliable Connection (RC) mode, a Reliable Datagram (RD) mode, an Unreliable Connection (UC) mode, or an Unreliable Datagram (UD) mode; Dividing the first RoCEv2 data stream into multiple first sub-data streams, and determining source ports used by multiple first RoCEv2 packets corresponding to each first sub-data stream based on available ports on itself, where source ports used by multiple first RoCEv2 packets corresponding to one sub-data stream are the same, and source ports used by multiple first RoCEv2 packets corresponding to different sub-data streams are different; Caching multiple first RoCEv2 packets corresponding to each first sub-data stream into a sub-data stream queue corresponding to the corresponding source port, and for each sub-data stream queue, sequentially sending the first RoCEv2 packet to a destination host device of the first RoCEv2 data stream based on five-tuple information of each first RoCEv2 packet in the sub-data stream queue.

2. The method according to claim 1, wherein Determining source ports used by multiple first RoCEv2 packets corresponding to each first sub-data stream based on available ports on itself specifically includes: For each first sub-data stream, randomly selecting an available port from available ports on itself, and using the selected available port as the source port used by multiple first RoCEv2 packets corresponding to the first sub-data stream.

3. The method according to claim 1, characterized in that, The method further includes: After sending the first RoCEv2 packet to the destination host device, starting a timeout timer; If an acknowledgment packet for the first RoCEv2 packet sent by the destination host device is received within the timeout duration of the timeout timer, then closing the timeout timer; When a first timestamp when the HRD processing module sends the first RoCEv2 packet is carried in the acknowledgment packet, calculating an RTT value of a path for transmitting the first RoCEv2 packet based on the first timestamp and a second timestamp when the acknowledgment packet is received, and assigning the calculated RTT value as the RTT value corresponding to the sub-data stream queue; If the first RoCEv2 packet is not the last first RoCEv2 packet in the sub-data stream queue and the calculated RTT value is greater than a first set threshold, then caching unsent first RoCEv2 packets in the sub-data stream queue into a sub-data stream queue whose corresponding RTT value is not greater than a second set threshold, where the first set threshold is greater than the second set threshold; or When the number of packets of the first RoCEv2 packet sent by the HRD processing module cached by the destination host device is carried in the acknowledgment packet, if the number of packets is not greater than a set number, then maintaining the current packet sending rate; if the number of packets is greater than the set number, then reducing the current packet sending rate according to a preset rule.

4. The method according to claim 3, wherein The method further includes: If an acknowledgment message for the first RoCEv2 message sent by the destination host device is not received within the timeout duration of the timeout timer, the first RoCEv2 message is resent to the destination host device, and the timeout timer is restarted until an acknowledgment message for the first RoCEv2 message sent by the destination host device is received.

5. The method according to claim 1, wherein The method further includes: When receiving a second RoCEv2 message corresponding to a target sub-data stream of a second RoCEv2 data stream sent by the destination host device, if it is determined according to the service mode carried in the second RoCEv2 message that the second RoCEv2 message is a message that does not require in-sequence delivery, the second RoCEv2 message is sent to a processing module corresponding to the service mode carried in the second RoCEv2 message for processing, and an acknowledgment message indicating successful reception of the second RoCEv2 message is sent to the destination host device; if it is determined according to the service mode carried in the second RoCEv2 message that the second RoCEv2 message is a message that requires in-sequence delivery, the second RoCEv2 message is sent to a processing module corresponding to the service mode carried in the second RoCEv2 message for processing, or when the number of messages in the cache queue corresponding to the service mode carried in the second RoCEv2 message does not reach a preset number, the second RoCEv2 message is cached in the cache queue, and when the number of messages in the cache queue reaches the preset number, the second RoCEv2 messages in the cache queue are sorted in ascending order of message sequence numbers, and each sorted second RoCEv2 message is sequentially sent to a corresponding processing module for processing.

6. The method according to claim 5, characterized in that, The following method is used to determine whether the second RoCEv2 message is a message that requires in-sequence delivery: if the service mode carried in the second RoCEv2 message is the RC mode or the RD mode, it is determined that the second RoCEv2 message is a message that requires in-sequence delivery; if the service mode carried in the second RoCEv2 message is the UC mode or the UD mode, it is determined that the second RoCEv2 message is a message that does not require in-sequence delivery.

7. A message processing device, characterized in that, The high-performance reliable datagram HRD processing module applied to a host device, the device includes: a receiving unit, configured to receive a first RoCEv2 data stream sent by a processing module corresponding to a service mode supported by the host device in the host device, where the service mode is a reliable connection RC mode, a reliable datagram RD mode, an unreliable connection UC mode, or an unreliable datagram UD mode; A determination unit, configured to divide the first RoCEv2 data stream into multiple first sub-data streams, and determine source ports used by multiple first RoCEv2 packets corresponding to each first sub-data stream based on available ports on itself, wherein source ports used by multiple first RoCEv2 packets corresponding to one sub-data stream are the same, and source ports used by multiple first RoCEv2 packets corresponding to different sub-data streams are different; A cache sending unit, configured to cache multiple first RoCEv2 packets corresponding to each first sub-data stream into a sub-data stream queue corresponding to the corresponding source port, and for each sub-data stream queue, sequentially send the first RoCEv2 packet to a destination host device of the first RoCEv2 data stream based on five-tuple information of each first RoCEv2 packet in the sub-data stream queue.

8. The device according to claim 7, characterized in that, The apparatus further includes: An adjustment unit, configured to start a timeout timer after sending the first RoCEv2 packet to the destination host device; If an acknowledgement packet for the first RoCEv2 packet sent by the destination host device is received within the timeout duration of the timeout timer, the timeout timer is closed; When a first timestamp when the HRD processing module sends the first RoCEv2 packet is carried in the acknowledgement packet, if the first RoCEv2 packet is not the last first RoCEv2 packet in the sub-data stream queue, an RTT value of a path for transmitting the first RoCEv2 packet is calculated based on the first timestamp and a second timestamp when the acknowledgement packet is received, and the calculated RTT value is assigned as the RTT value corresponding to the sub-data stream queue; If the calculated RTT value is greater than a first set threshold, untransmitted first RoCEv2 packets in the sub-data stream queue are cached into a sub-data stream queue whose corresponding RTT value is not greater than a second set threshold, wherein the first set threshold is greater than the second set threshold; or, When the number of packets of the first RoCEv2 packet sent by the HRD processing module cached by the destination host device is carried in the acknowledgement packet, if the number of packets is not greater than a set number, the current packet sending rate is maintained; if the number of packets is greater than the set number, the current packet sending rate is reduced according to a preset rule.

9. The device according to claim 8, characterized in that, The cache sending unit is further configured to: If an acknowledgement packet for the first RoCEv2 packet sent by the destination host device is not received within the timeout duration of the timeout timer, the first RoCEv2 packet is resent to the destination host device, and the timeout timer is restarted until an acknowledgement packet for the first RoCEv2 packet sent by the destination host device is received.

10. The device according to claim 7, characterized in that, The apparatus further includes: A processing unit, when receiving a second RoCEv2 packet corresponding to a target sub-data stream of a second RoCEv2 data stream sent by the destination host device, if it is determined according to the service mode carried in the second RoCEv2 packet that the second RoCEv2 packet is a packet that does not require in-order delivery, then send the second RoCEv2 packet to a processing module corresponding to the service mode carried in the second RoCEv2 packet for processing, and send an acknowledgment packet to the destination host device to indicate that the second RoCEv2 packet has been successfully received; if it is determined according to the service mode carried in the second RoCEv2 packet that the second RoCEv2 packet is a packet that requires in-order delivery, then send the second RoCEv2 packet to a processing module corresponding to the service mode carried in the second RoCEv2 packet for processing, or when the number of packets in the cache queue corresponding to the service mode carried in the second RoCEv2 packet has not reached a preset number, cache the second RoCEv2 packet into the cache queue, and when the number of packets in the cache queue reaches the preset number, sort the second RoCEv2 packets in the cache queue in ascending order of packet sequence numbers, and sequentially send each sorted second RoCEv2 packet to the corresponding processing module for processing.

11. An electronic device, characterized in that, It includes a processor and a machine-readable storage medium, and the machine-readable storage medium stores machine-executable instructions that can be executed by the processor. The processor is prompted by the machine-executable instructions to implement the method steps described in any one of claims 1-6.

12. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, it implements the method steps described in any one of claims 1-6.

Citation Information

Patent Citations

  • Out-of-order data stream recombination method and forwarding equipment

    CN106230744A

  • Data transmission method and device

    CN108989237A

  • Message transmission method and device

    CN109691039A

  • Session information management method and device, switching equipment and medium

    CN113037859A

  • Network queue monitoring method and device, computer equipment and storage medium

    CN113411264A