A message processing method and device, electronic equipment and storage medium

CN120200983BActive Publication Date: 2026-09-04NEW H3C TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311723574.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-14
Publication Date
2026-09-04
Estimated Expiration
2043-12-14

AI Technical Summary

Technical Problem

[0005]但是,采用SRD模式需要修改主机设备的相关驱动程序、内核程序等,也需要重新适配SRD接口,操作起来不方便,适用性较差

Benefits of technology

[0016] In this embodiment, an HRD processing module is added to the host device. This module is responsible for processing RoCEv2 data streams from processing modules corresponding to RC mode, RD mode, UC mode, or UD mode within the host device. The RoCEv2 data stream is divided into multiple sub-data streams, and the RoCEv2 packets corresponding to these sub-data streams are distributed across different paths for transmission. This packet processing method does not require interface adaptation and can achieve reliable but not ordered packet transmission. Furthermore, it effectively utilizes path resources, is convenient to operate, and has good applicability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120200983B_ABST
    Figure CN120200983B_ABST
Patent Text Reader

Abstract

The application provides a message processing method and device, electronic equipment and storage medium. The method is applied to an HRD processing module in a host device, and comprises: receiving first RoCEv2 data streams sent by a processing module corresponding to a service mode supported by the host device; dividing the first RoCEv2 data streams 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 HRD processing module; caching the plurality of first RoCEv2 messages corresponding to each first sub-data stream into a sub-data stream queue corresponding to the source port, and for each sub-data stream queue, sequentially sending each first RoCEv2 message in the sub-data stream queue to a destination host device of the first RoCEv2 data streams based on five-tuple information of the first RoCEv2 message. 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 technology, and in particular to a message processing method, apparatus, electronic device and storage medium. Background Technology

[0002] RoCE (RDMA over Converged Ethernet) is an Ethernet-based RDMA technology. There are two versions of RoCE, one of which is RoCEv2. RoCEv2 is based on the Ethernet User Datagram Protocol (UDP), and host devices supporting RoCEv2 provide four service modes: Reliable Connection (RC), Reliable Datagram (RD), Unreliable Connection (UC), and Unreliable Datagram (UD).

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

[0004] In networks hosting HPC, AI, and other applications with "elephant streams," host devices using RC mode to transmit RoCEv2 data streams may experience issues such as unbalanced forwarding paths for RoCEv2 packets and poor scalability. To address this, a new service mode, Scalable Reliable Datagram (SRD), has been introduced in one application scenario. SRD mode does not preserve the packet order of RoCEv2 packets, sending them through as many network paths as possible to avoid path overload, thus offering better scalability.

[0005] However, adopting the SRD mode requires modifying the relevant drivers and kernel programs 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 related technologies, this application provides a message processing method, apparatus, electronic device, and storage medium.

[0007] According to a first aspect of the embodiments of this application, a message processing method is provided, the method being applied to an HRD processing module in a host device, the method comprising:

[0008] The host device receives a first RoCEv2 data stream sent by the processing module corresponding to the service mode supported by the host device, wherein the service mode is RC mode, RD mode, UC mode or mode ;

[0009] The first RoCEv2 data stream is divided into multiple first sub-data streams, and based on the available ports on each first sub-data stream, the source ports used by multiple first RoCEv2 packets corresponding to each first sub-data stream are determined. Among them, the source ports used by multiple first RoCEv2 packets corresponding to a sub-data stream are the same, and the source ports used by multiple first RoCEv2 packets corresponding to different sub-data streams are different.

[0010] Multiple first RoCEv2 packets corresponding to each first sub-data stream are cached in the sub-data stream queue corresponding to the source port. For each sub-data stream queue, the first RoCEv2 packet is sent to the destination host device of the first RoCEv2 data stream in turn based on the five-tuple information of each first RoCEv2 packet in the sub-data stream queue.

[0011] According to a second aspect of the embodiments of this application, a message processing apparatus is provided, wherein the HRD processing module applied in a host device includes:

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

[0013] The determining unit is used to divide the first RoCEv2 data stream into multiple first sub-data streams, and based on its own available ports, determine the source ports used by multiple first RoCEv2 messages corresponding to each first sub-data stream, wherein multiple first RoCEv2 messages corresponding to one sub-data stream use the same source port, and multiple first RoCEv2 messages corresponding to different sub-data streams use different source ports.

[0014] The buffer sending unit is used to buffer multiple first RoCEv2 packets corresponding to each first sub-data stream into the sub-data stream queue corresponding to the source port, and for each sub-data stream queue, send the first RoCEv2 packet to the destination host device of the first RoCEv2 data stream in turn 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 this application may include the following beneficial effects:

[0016] In this embodiment, an HRD processing module is added to the host device. This module is responsible for processing RoCEv2 data streams from processing modules corresponding to RC mode, RD mode, UC mode, or UD mode within the host device. The RoCEv2 data stream is divided into multiple sub-data streams, and the RoCEv2 packets corresponding to these sub-data streams are distributed across different paths for transmission. This packet processing method does not require interface adaptation and can achieve reliable but not ordered packet transmission. Furthermore, it effectively utilizes 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 exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this application, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] Figure 1 A flowchart illustrating a message processing method provided in an embodiment of this application;

[0020] Figure 2 This is a schematic diagram of the structure of a message processing device provided in an embodiment of this application;

[0021] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0022] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0023] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this 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” as 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 one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if” or “suppose” as used herein may be interpreted as “when…” or “when…”.

[0025] The embodiments of this application will now be described in detail.

[0026] 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 service mode mentioned above is RC mode, RD mode, UC mode, or UD mode.

[0029] It should be noted that the specific acquisition process of the first RoCEv2 data stream on the processing module side corresponding to the service mode supported by the host device is existing technology and will not be described in detail here.

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

[0031] In this step, multiple first RoCEv2 messages corresponding to a sub-data stream use the same source port, and multiple first RoCEv2 messages corresponding to different sub-data streams use different source ports.

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

[0033] Specifically, in step S12 above, 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 partitioning rules. The specific number of first sub-data streams and the number of RoCEv2 messages corresponding to each first sub-data stream can be configured in the partitioning rules.

[0034] Additionally, in this step, the HRD processing module can determine the source port used by multiple first RoCEv2 messages corresponding to each first sub-data stream in the following way:

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

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

[0037] Specifically, in step S13 above, 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 find the corresponding output port of the calculated hash result in the correspondence between each hash result and each output port stored locally, and send the first RoCEv2 packet to the corresponding next-hop device through the output port, so that the next-hop device can continue to forward the first RoCEv2 packet to the destination host device.

[0038] Furthermore, in this embodiment of the application, the HRD processing module may also perform the following operations:

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

[0040] If an acknowledgment message for the first RoCEv2 message is received from the destination host device within the timeout period of the timeout timer, then the timeout timer is turned off.

[0041] When the acknowledgment message carries the first timestamp of when the HRD processing module sent the first RoCEv2 message, the RTT value of the path for transmitting the first RoCEv2 message is calculated based on the first timestamp and the second timestamp of when the acknowledgment message is received, and the calculated RTT value is assigned as the RTT value corresponding to the sub-data stream queue.

[0042] If the first RoCEv2 message is not the last first RoCEv2 message in the sub-data stream queue, and the calculated RTT value is greater than a first preset threshold, then the unsent first RoCEv2 message in the sub-data stream queue is cached in a sub-data stream queue whose corresponding RTT value is not greater than a second preset threshold, where the first preset threshold is greater than the second preset threshold; or,

[0043] When the confirmation message carries the number of the first RoCEv2 message sent by the HRD processing module of the destination host device cache, if the number of messages is not greater than the set number, the current message sending rate is maintained; if the number of messages is greater than the set number, the current message sending rate is reduced according to the preset rules.

[0044] In this operation process, the HRD processing module will subtract the second timestamp from the first timestamp to obtain the RTT value of the path through which the first RoCEv2 message was transmitted.

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

[0046] Suppose that after the HRD processing module sends the first RoCEv2 message corresponding to sub-data stream 1 to the destination host device, it starts a timeout timer. Within the timeout period, it receives an acknowledgment message for the RoCEv2 message from the destination host device. At this time, the HRD processing module stops the timeout timer and finds that the acknowledgment message carries the first timestamp when the HRD processing module sent the RoCEv2 message. In this case, the HRD processing module subtracts the first timestamp from the second timestamp when it receives the acknowledgment message, uses the result as the RTT value of the path for transmitting the first RoCEv2 message, and assigns the result as the RTT value corresponding to the sub-data stream queue of sub-data stream 1.

[0047] If the result of the operation is greater than the first set threshold, and if the RTT value of the sub-data stream queue corresponding to the current sub-data stream 1 is less than the second set threshold, then the HRD processing module will cache the four unsent first RoCEv2 messages in the sub-data stream queue of the first RoCEv2 message corresponding to the cached sub-data stream 3 into the sub-data stream queue corresponding to the sub-data stream 1.

[0048] It should be noted that for any first RoCEv2 message in any sub-data stream queue, once the corresponding acknowledgment message is received, the HRD processing module will calculate the corresponding RTT value and assign it as the RTT value for that sub-data stream queue. Therefore, the RTT value for that sub-data stream queue is dynamically changing.

[0049] It should be further noted that in this operation process, initially, the HRD processing module sends the first RoCEv2 message in the sub-data stream queue according to the set sending rate.

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

[0051] In addition, for the HRD processing module, if it does not receive an acknowledgment message for the first RoCEv2 message from the destination host device within the timeout period of the timeout timer, it will resend the first RoCEv2 message to the destination host device and restart the timeout timer until it receives an acknowledgment message for the first RoCEv2 message from the destination host device.

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

[0053] Furthermore, in this embodiment of the application, the HRD processing module may also perform the following operations:

[0054] When a second RoCEv2 message corresponding to the target sub-data stream of the second RoCEv2 data stream sent by the destination host device is received, if it is determined from the service mode carried in the second RoCEv2 message that the second RoCEv2 message is a message that does not need to be ordered, then the second RoCEv2 message is sent to the processing module corresponding to the service mode carried in the second RoCEv2 message for processing, and an acknowledgment message is sent to the destination host device to indicate that the second RoCEv2 message has been successfully received.

[0055] If the second RoCEv2 message is determined to be a message requiring order preservation based on the service mode carried in the second RoCEv2 message, then the second RoCEv2 message is sent to the processing module corresponding to the service mode carried in the second RoCEv2 message for processing, or...

[0056] When the number of packets in the cache queue corresponding to the service mode carried in the second RoCEv2 packet has not reached the preset number, the second RoCEv2 packet is cached in the cache queue. 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 number, and each sorted second RoCEv2 packet is sent to the corresponding processing module for processing in turn.

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

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

[0059] If the service mode carried in the second RoCEv2 message is RC mode or RD mode, then the second RoCEv2 message is determined to be a message that needs to be ordered.

[0060] If the service mode carried in the second RoCEv2 message is UC mode or UD mode, then the second RoCEv2 message is determined to be a message that does not require order preservation.

[0061] As can be seen from the above technical solutions, in this embodiment, an HRD processing module is added to the host device to process RoCEv2 data streams from the processing modules corresponding to RC mode, RD mode, UC mode, or UD mode in the host device. The RoCEv2 data stream is divided into multiple sub-data streams, and the RoCEv2 packets corresponding to the sub-data streams are distributed to different paths for transmission. This packet processing method does not require interface adaptation and can achieve reliable but not ordered packet transmission. Furthermore, it effectively utilizes path resources, is convenient to operate, and has good applicability.

[0062] Based on the same inventive concept, this application also provides a message processing apparatus, wherein the HRD processing module applied in the host device is shown in the schematic diagram below. Figure 2 As shown, it specifically includes:

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

[0064] The determining unit 22 is used to divide the first RoCEv2 data stream into multiple first sub-data streams, and determine the source port used by multiple first RoCEv2 messages corresponding to each first sub-data stream based on its own available ports. 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.

[0065] The buffer sending unit 23 is used to buffer multiple first RoCEv2 packets corresponding to each first sub-data stream into the sub-data stream queue corresponding to the source port, and for each sub-data stream queue, send the first RoCEv2 packet to the destination host device of the first RoCEv2 data stream in turn based on the five-tuple information of each first RoCEv2 packet in the sub-data stream queue.

[0066] Preferably, the determining unit is specifically used for:

[0067] For each first sub-data stream, randomly select an available port from its available ports, and use the selected available port as the source port for multiple first RoCEv2 messages corresponding to that first sub-data stream.

[0068] Preferably, the device further includes:

[0069] Adjustment unit ( Figure 2 (not shown in the image), used to start a timeout timer after the first RoCEv2 message is sent to the destination host device;

[0070] If an acknowledgment message for the first RoCEv2 message is received from the destination host device within the timeout period of the timeout timer, then the timeout timer is turned off.

[0071] When the acknowledgment message carries the first timestamp of when the HRD processing module sent the first RoCEv2 message, the RTT value of the path for transmitting the first RoCEv2 message is calculated based on the first timestamp and the second timestamp of when the acknowledgment message is received, and the calculated RTT value is assigned as the RTT value corresponding to the sub-data stream queue.

[0072] If the first RoCEv2 message is not the last first RoCEv2 message in the sub-data stream queue, and the calculated RTT value is greater than a first preset threshold, then the unsent first RoCEv2 message in the sub-data stream queue is cached in a sub-data stream queue whose corresponding RTT value is not greater than a second preset threshold, wherein the first preset threshold is greater than the second preset threshold; or...

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

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

[0075] If no acknowledgment message for the first RoCEv2 message is received from the destination host device within the timeout period 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 is received from the destination host device.

[0076] Preferably, the device further includes:

[0077] Processing unit ( Figure 2 (Not shown in the image) is used to, 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 from the service mode carried in the second RoCEv2 message that the second RoCEv2 message is a message that does not require order preservation, send the second RoCEv2 message to the processing module corresponding to the service mode carried in the second RoCEv2 message for processing, and send an acknowledgment message to the destination host device to indicate that the second RoCEv2 message has been successfully received;

[0078] If the service mode carried in the second RoCEv2 message indicates that the second RoCEv2 message is a message requiring order preservation, then the second RoCEv2 message is sent to the processing module corresponding to the service mode carried in the second RoCEv2 message for processing, or...

[0079] When the number of packets in the cache queue corresponding to the service mode carried in the second RoCEv2 packet has not reached the preset number, the second RoCEv2 packet is cached in the cache queue. 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 number, and each sorted second RoCEv2 packet is sent to the corresponding processing module for processing in turn.

[0080] Preferably, the processing unit is specifically used to determine whether the second RoCEv2 message is a message that requires order preservation by means of the following method:

[0081] If the service mode carried in the second RoCEv2 message is RC mode or RD mode, then the second RoCEv2 message is determined to be a message that needs to be ordered.

[0082] If the service mode carried in the second RoCEv2 message is UC mode or UD mode, then the second RoCEv2 message is determined to be a message that does not require order preservation.

[0083] As can be seen from the above technical solutions, in this embodiment, an HRD processing module is added to the host device to process RoCEv2 data streams from the processing modules corresponding to RC mode, RD mode, UC mode, or UD mode in the host device. The RoCEv2 data stream is divided into multiple sub-data streams, and the RoCEv2 packets corresponding to the sub-data streams are distributed to different paths for transmission. This packet processing method does not require interface adaptation and can achieve reliable but not ordered packet transmission. Furthermore, it effectively utilizes path resources, is convenient to operate, and has good applicability.

[0084] This application also provides an electronic device, such as... Figure 3 As shown, it includes a processor 31 and a machine-readable storage medium 32, the machine-readable storage medium 32 storing machine-executable instructions that can be executed by the processor 31, the processor 31 being prompted by the machine-executable instructions to implement the steps of the above-described message processing method.

[0085] The aforementioned machine-readable storage medium may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the machine-readable storage medium may also be at least one storage device located remotely from the aforementioned processor.

[0086] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0087] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described message processing method.

[0088] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this 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: The host device receives a first RoCEv2 data stream sent by the processing module corresponding to the service mode supported by the host device, wherein the service mode is reliable connection RC mode, reliable datagram RD mode, unreliable connection UC mode, or unreliable datagram UD mode. The first RoCEv2 data stream is divided into multiple first sub-data streams, and based on the available ports on each first sub-data stream, the source ports used by multiple first RoCEv2 packets corresponding to each first sub-data stream are determined. Among them, the source ports used by multiple first RoCEv2 packets corresponding to a sub-data stream are the same, and the source ports used by multiple first RoCEv2 packets corresponding to different sub-data streams are different. Multiple first RoCEv2 packets corresponding to each first sub-data stream are cached in the sub-data stream queue corresponding to the source port. For each sub-data stream queue, the first RoCEv2 packet is sent 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. After sending the first RoCEv2 message to the destination host device, start the timeout timer; If an acknowledgment message for the first RoCEv2 message is received from the destination host device within the timeout period of the timeout timer, then the timeout timer is turned off. When the acknowledgment message carries the first timestamp of when the HRD processing module sent the first RoCEv2 message, the RTT value of the path for transmitting the first RoCEv2 message is calculated based on the first timestamp and the second timestamp of when the acknowledgment message is received, and the calculated RTT value is assigned as the RTT value corresponding to the sub-data stream queue. If the first RoCEv2 message is not the last first RoCEv2 message in the sub-data stream queue, and the calculated RTT value is greater than a first preset threshold, then the unsent first RoCEv2 message in the sub-data stream queue is cached in a sub-data stream queue whose corresponding RTT value is not greater than a second preset threshold, wherein the first preset threshold is greater than the second preset threshold; or... When the confirmation message carries the number of first RoCEv2 messages sent by the HRD processing module cached by the destination host device, if the number of messages is not greater than a set number, the current message sending rate is maintained; if the number of messages is greater than the set number, the current message sending rate is reduced according to a preset rule.

2. The method according to claim 1, characterized in that, Based on its own available ports, the source ports used by multiple first RoCEv2 messages corresponding to each first sub-data stream are determined, specifically including: For each first sub-data stream, randomly select an available port from its available ports, and use the selected available port as the source port for multiple first RoCEv2 messages corresponding to that first sub-data stream.

3. The method according to claim 1, characterized in that, The method further includes: If no acknowledgment message for the first RoCEv2 message is received from the destination host device within the timeout period 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 is received from the destination host device.

4. The method according to claim 1, characterized in that, The method further includes: When a second RoCEv2 message corresponding to a target sub-data stream of a second RoCEv2 data stream sent by the destination host device is received, if it is determined from the service mode carried in the second RoCEv2 message that the second RoCEv2 message is a message that does not need to be ordered, then the second RoCEv2 message is sent to the processing module corresponding to the service mode carried in the second RoCEv2 message for processing, and an acknowledgment message indicating that the second RoCEv2 message has been successfully received is sent to the destination host device; If the service mode carried in the second RoCEv2 message indicates that the second RoCEv2 message is a message requiring order preservation, then the second RoCEv2 message is sent to the processing module corresponding to the service mode carried in the second RoCEv2 message 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 the preset number, the second RoCEv2 packet is cached in the cache queue. 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 number, and each sorted second RoCEv2 packet is sent to the corresponding processing module for processing in turn.

5. The method according to claim 4, characterized in that, The method to determine whether the second RoCEv2 message is a message that requires order preservation is as follows: If the service mode carried in the second RoCEv2 message is RC mode or RD mode, then the second RoCEv2 message is determined to be a message that needs to be ordered. If the service mode carried in the second RoCEv2 message is UC mode or UD mode, then the second RoCEv2 message is determined to be a message that does not require order preservation.

6. A message processing apparatus, characterized in that, A high-performance reliable datagram (HRD) processing module for use in host equipment, the device comprising: The receiving unit is configured to receive a first RoCEv2 data stream sent by the processing module corresponding to the service mode supported by the host device in the host device, wherein 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. The determining unit is used to divide the first RoCEv2 data stream into multiple first sub-data streams, and based on its own available ports, determine the source ports used by multiple first RoCEv2 messages corresponding to each first sub-data stream, wherein multiple first RoCEv2 messages corresponding to one sub-data stream use the same source port, and multiple first RoCEv2 messages corresponding to different sub-data streams use different source ports. The buffer sending unit is used to buffer multiple first RoCEv2 packets corresponding to each first sub-data stream into the sub-data stream queue corresponding to the source port, and for each sub-data stream queue, send the first RoCEv2 packet to the destination host device of the first RoCEv2 data stream in turn based on the five-tuple information of each first RoCEv2 packet in the sub-data stream queue. The adjustment unit is used to start a timeout timer after sending the first RoCEv2 message to the destination host device; If an acknowledgment message for the first RoCEv2 message is received from the destination host device within the timeout period of the timeout timer, then the timeout timer is turned off. When the acknowledgment message carries the first timestamp of when the HRD processing module sent the first RoCEv2 message, if the first RoCEv2 message is not the last first RoCEv2 message in the sub-data stream queue, then based on the first timestamp and the second timestamp of when the acknowledgment message is received, the RTT value of the path that transmitted the first RoCEv2 message is calculated, 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 preset threshold, then the first RoCEv2 packet that has not been sent in the sub-data stream queue is buffered into a sub-data stream queue whose corresponding RTT value is not greater than a second preset threshold, wherein the first preset threshold is greater than the second preset threshold; or... When the confirmation message carries the number of first RoCEv2 messages sent by the HRD processing module cached by the destination host device, if the number of messages is not greater than a set number, the current message sending rate is maintained; if the number of messages is greater than the set number, the current message sending rate is reduced according to a preset rule.

7. The apparatus according to claim 6, characterized in that, The buffer sending unit is further configured to: If no acknowledgment message for the first RoCEv2 message is received from the destination host device within the timeout period 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 is received from the destination host device.

8. The apparatus according to claim 6, characterized in that, The device further includes: The processing unit is configured to, upon 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 from the service mode carried in the second RoCEv2 message that the second RoCEv2 message is a message that does not require order preservation, send the second RoCEv2 message to the processing module corresponding to the service mode carried in the second RoCEv2 message for processing, and send an acknowledgment message to the destination host device to indicate that the second RoCEv2 message has been successfully received; If the service mode carried in the second RoCEv2 message indicates that the second RoCEv2 message is a message requiring order preservation, then the second RoCEv2 message is sent to the processing module corresponding to the service mode carried in the second RoCEv2 message 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 the preset number, the second RoCEv2 packet is cached in the cache queue. 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 number, and each sorted second RoCEv2 packet is sent to the corresponding processing module for processing in turn.

9. An electronic device, characterized in that, The method includes a processor and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, which are prompted by the machine-executable instructions to perform the method steps of any one of claims 1-5.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method steps of any one of claims 1-5.

Citation Information

Patent Citations

  • Message transmission method and device

    CN109691039A