Roce protocol message data transmission method and device, equipment and medium
By extracting and encapsulating RoCE protocol messages in the gateway device and combining ECN and PFC mechanisms, the problem of decreased network throughput and increased latency when RoCE protocol messages are transmitted in wide area networks is solved, achieving lossless transmission and meeting the high-concurrency and low-latency requirements of high-performance computing and big data analysis.
Patent Information
- Application Number
- CN202311864900.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-30
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2043-12-30
AI Technical Summary
The existing TCP/IP network architecture cannot meet the high concurrency and low latency requirements of scenarios such as high-performance computing and big data analysis. When RoCE protocol messages are transmitted in wide area networks, there are problems of decreased network throughput and increased latency, especially when traditional wide area networks do not support ECN and PFC mechanisms.
By extracting and encapsulating RoCE protocol messages in the gateway device, Ethernet frame payload data is encapsulated into transport layer protocol messages and transmitted over a wide area network. Combined with ECN, PFC and sliding window mechanisms, the buffer space usage parameters are monitored in real time, and corresponding congestion response mechanisms, such as CNP messages, ECN field updates and pause messages, are enabled to ensure lossless transmission.
It achieves lossless transmission of RoCE protocol messages in wide area networks, avoiding message loss and out-of-order delivery, and meeting the high throughput and low latency requirements of distributed computing scenarios.
Smart Images

Figure CN118413582B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer networks, and in particular to a RoCE protocol message data transmission method, device, equipment and medium. BACKGROUND
[0002] In recent years, in the AI (artificial intelligence) large model training, HPC (high performance computing) application data migration, distributed database data synchronization and other business scenarios, the demand for high throughput and low latency of the network is gradually highlighted. However, the existing TCP / IP software and hardware architecture cannot meet the needs of high-performance computing, big data analysis and other I / O (input / output) high concurrency and low latency applications. Because the traditional TCP / IP network communication needs to send messages through the kernel, this communication method has a high overhead of data movement and data replication.
[0003] RDMA (Remote Direct Memory Access) technology is generated to solve the delay of server data processing in network transmission. RDMA technology can directly access memory data through the network interface without the intervention of the operating system kernel, realizing high throughput and low latency network communication, especially suitable for use in large-scale parallel computer clusters. At present, the industry widely uses RoCE (RDMA over Converged Ethernet, a network protocol that allows the use of remote direct memory access over Ethernet) protocol to carry RDMA message transmission. The use of RoCE protocol requires network support for ECN (Explicit Congestion Notification) mechanism and PFC (Priority-based Flow Control) mechanism.
[0004] However, because the traditional wide area network does not support the ECN mechanism and the PFC mechanism, and often has problems such as packet loss and out-of-order, there will be problems of network throughput reduction and network latency increase when directly transmitting RoCE protocol message, which is difficult to meet the application requirements of wide area network RDMA technology in distributed computing scenarios.
[0005] At present, there is no method for transmitting RoCE protocol message data in a wide area network. SUMMARY
[0006] The present application provides a RoCE protocol message data transmission method, device, equipment and medium to solve the defect that there is no method for transmitting RoCE protocol message data in a wide area network in the prior art.
[0007] The application provides a RoCE protocol message data transmission method, which is applied to a gateway device and comprises the following steps: obtaining a first RoCE protocol message to be sent in a layer 2 network; extracting data from the first RoCE protocol message to obtain first Ethernet frame payload data of the first RoCE protocol message; performing encapsulation processing on the first Ethernet frame payload data to generate a first transport layer protocol message; buffering the first transport layer protocol message to a message sending queue; and sending the first transport layer protocol message in the message sending queue to a target gateway device.
[0008] According to the RoCE protocol message data transmission method provided by the application, after the first transport layer protocol message in the message sending queue is sent to the target gateway device, the following steps are further included: receiving a second transport layer protocol message sent by the target gateway device; extracting data from the second transport layer protocol message to obtain second Ethernet frame payload data encapsulated in the second transport layer protocol message; performing encapsulation processing on the second Ethernet frame payload data to generate a second RoCE protocol message; and sending the second RoCE protocol message to the layer 2 network.
[0009] According to the RoCE protocol message data transmission method provided by the application, the following steps are further included: monitoring a usage parameter of a buffer space of the message sending queue; the usage parameter comprises one or more of a buffer space usage amount, a buffer space usage frequency and a change value of the buffer space usage amount; if the buffer space usage amount of the message sending queue exceeds a first preset threshold, or the buffer space usage frequency of the message sending queue exceeds a second preset threshold, or the change value of the buffer space usage amount of the message sending queue exceeds a third preset threshold, a source address corresponding to the first transport layer protocol message in the message sending queue is determined; and a CNP message is sent to the source address based on a first preset probability, so that a network device corresponding to the source address learns that network congestion occurs.
[0010] According to the RoCE protocol message data transmission method provided by the application, the following steps are further included: monitoring a usage parameter of a buffer space of the message sending queue; the usage parameter comprises one or more of a buffer space usage amount, a buffer space usage frequency and a change value of the buffer space usage amount; if the buffer space usage amount of the message sending queue exceeds a first preset threshold, or the buffer space usage frequency of the message sending queue exceeds a second preset threshold, or the change value of the buffer space usage amount of the message sending queue exceeds a third preset threshold, an ECN field in the first transport layer protocol message is updated based on a second preset probability; and the updated ECN field is used to mark that network congestion occurs.
[0011] The RoCE protocol message data transmission method provided by the application further includes: when a transport layer protocol message is received, judging whether an ECN field in the transport layer protocol message is used to indicate network congestion; if the ECN field in the transport layer protocol message is used to indicate network congestion, sending a CNP message to a source address of the transport layer protocol message, so that a network device corresponding to the source address learns that network congestion occurs.
[0012] The RoCE protocol message data transmission method provided by the application further includes: monitoring a use parameter of a cache space of a message sending queue; the use parameter includes one or more of a cache space usage amount, a cache space usage frequency, and a change value of the cache space usage amount; if the cache space usage amount of the message sending queue exceeds a fourth preset threshold, or the cache space usage frequency of the message sending queue exceeds a fifth preset threshold, or the change value of the cache space usage amount of the message sending queue exceeds a sixth preset threshold, determining a previous hop gateway device corresponding to a first transport layer protocol message in the message sending queue; sending a pause message to the previous hop gateway device, so that the previous hop gateway device pauses data sending.
[0013] The RoCE protocol message data transmission method provided by the application further includes: establishing at least two communication links with the previous hop gateway device; based on the communication links, sending the pause message to the previous hop gateway device.
[0014] The application further provides a RoCE protocol message data transmission device, which includes: an acquisition module, used to acquire a first RoCE protocol message to be sent in a layer 2 network; an extraction module, used to extract data of the first RoCE protocol message to obtain first Ethernet frame payload data of the first RoCE protocol message; an encapsulation module, used to encapsulate and process the first Ethernet frame payload data to generate a first transport layer protocol message; a cache module, used to cache the first transport layer protocol message to a message sending queue; and a sending module, used to send the first transport layer protocol message in the message sending queue to a target gateway device.
[0015] The application further provides a gateway device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the RoCE protocol message data transmission method of any of the above when executing the program.
[0016] The application further provides a non-transient computer readable storage medium, which stores a computer program, and the computer program is executable on the processor to implement the RoCE protocol message data transmission method of any of the above.
[0017] The application provides a RoCE protocol message data transmission method, device, equipment and medium, which is applied to a gateway device and comprises the following steps: obtaining a first RoCE protocol message to be sent in a two-layer network; extracting data from the first RoCE protocol message to obtain first Ethernet frame payload data of the first RoCE protocol message; performing encapsulation processing on the first Ethernet frame payload data to generate a first transport layer protocol message; caching the first transport layer protocol message to a message sending queue; and sending the first transport layer protocol message in the message sending queue to a target gateway device. In the above manner, the first RoCE protocol message to be sent in the two-layer network is extracted to obtain the first Ethernet frame payload data of the first RoCE protocol message, and the first Ethernet frame payload data is encapsulated into the first transport layer protocol message. Since the transport layer protocol message can be transmitted under a wide area network, the Ethernet frame payload data of the RoCE protocol message can be directly transmitted under the wide area network after being encapsulated into the transport layer protocol message. The first transport layer protocol message is cached to the message sending queue, and the first transport layer protocol message in the message sending queue is sent to the target gateway device, so that the RoCE protocol message data can be transmitted under the wide area network. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0019] Figure 1 is one of the flowcharts of the RoCE protocol message data transmission method provided by the application;
[0020] Figure 2 is the second flowchart of the RoCE protocol message data transmission method provided by the application;
[0021] Figure 3 is the structural schematic diagram of the RoCE protocol message data transmission device provided by the application;
[0022] Figure 4 is the structural schematic diagram of the gateway device provided by the application. DETAILED DESCRIPTION
[0023] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions will be described clearly and completely below in conjunction with the accompanying drawings in the present application. Obviously, the described embodiments are only some, but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work belong to the scope of protection of the present application.
[0024] Referring to Figure 1 , Figure 1 is one of flow diagrams of the RoCE protocol message data transmission method provided by the present application. In the embodiment, a gateway device is deployed at both ends (the sending end and the receiving end) of the RoCE protocol message data transmission through the wide-area lossy network. The RoCE protocol message data transmission method is applied to the gateway device, and includes steps S110 to S150, which are specifically as follows.
[0025] S110: Obtain a first RoCE protocol message to be sent in a Layer 2 network.
[0026] Generally, the RoCE protocol message is transmitted in the Layer 2 network based on the Ethernet ring protocol. The network device can adopt a cascading, tree, star, ring or hybrid networking mode to form a Layer 2 network.
[0027] Specifically, when serving as the sending end, the gateway device can obtain the first RoCE protocol message to be sent in the local Layer 2 network, so as to subsequently send the first RoCE protocol message to the gateway device of the receiving end.
[0028] Among them, the gateway device of the receiving end is a target gateway device; the first RoCE protocol message can be understood as a RoCE protocol message that needs to be sent or forwarded by the sending end to the receiving end.
[0029] S120: Data extraction is performed on the first RoCE protocol message to obtain first Ethernet frame payload data of the first RoCE protocol message.
[0030] Generally, for each RoCE protocol message, the Ethernet frame payload data in the RoCE protocol message is the data required to be transmitted by the RoCE protocol message, so the Ethernet frame payload data is extracted for subsequent encapsulation.
[0031] Specifically, data extraction is performed on the first RoCE protocol message to obtain first Ethernet frame payload data of the first RoCE protocol message.
[0032] S130: The first Ethernet frame payload data is encapsulated to generate a first transport layer protocol message.
[0033] Specifically, the first Ethernet frame payload data is encapsulated into a payload data part of a reliable transport layer protocol packet to generate a first transport layer protocol packet.
[0034] Preferably, after the first Ethernet frame payload data is encapsulated into the payload data part of the reliable transport layer protocol packet, a DSCP (Differentiated Services Code Point) field of an outer IP (Internet Protocol) packet header of the transport layer protocol packet can be set according to a queue mapping relationship pre-configured by the gateway device.
[0035] The DSCP field is used to identify the priority of the packet, and setting the DSCP field of the outer IP packet header of the transport layer protocol packet can enable the gateway device to transmit the packet according to the priority of the packet, so as to ensure that the packet with high priority can be processed as soon as possible.
[0036] S140: cache the first transport layer protocol packet to a packet sending queue.
[0037] Specifically, the first transport layer protocol packet is cached to the packet sending queue and waits to be sent.
[0038] S150: send the first transport layer protocol packet in the packet sending queue to the target gateway device.
[0039] Specifically, after the target gateway device is determined, the local gateway device can establish a long connection with the target gateway device by using a reliable transport layer protocol, and the long connection is used to realize the communication between the local gateway device and the target gateway device in the wide-area lossless network, so as to provide guarantee for the underlying transmission of subsequent packets.
[0040] The transport layer protocol used to establish the long connection includes a TCP (Transmission Control Protocol) protocol, a QUIC (Quick UDP Internet Connections) protocol, and a multi-path version of the QUIC protocol, such as an MP-TCP (Multi-Path TCP) protocol and an MP-QUIC protocol (Multi-Path QUIC protocol).
[0041] Further, after the local gateway device and the target gateway device establish the long connection, the local gateway device can send the first transport layer protocol packet in the packet sending queue to the target gateway device through the long connection.
[0042] The embodiment provides a RoCE protocol message data transmission method, which is applied to a gateway device and comprises the following steps: obtaining a first RoCE protocol message to be sent in a layer 2 network; performing data extraction on the first RoCE protocol message to obtain first Ethernet frame payload data of the first RoCE protocol message; performing encapsulation processing on the first Ethernet frame payload data to generate a first transport layer protocol message; buffering the first transport layer protocol message to a message sending queue; and sending the first transport layer protocol message in the message sending queue to a target gateway device. In the foregoing manner, the first RoCE protocol message to be sent in the layer 2 network is subjected to data extraction to obtain the first Ethernet frame payload data of the first RoCE protocol message, the first Ethernet frame payload data is encapsulated into the first transport layer protocol message, the transport layer protocol message can be transmitted in a wide area network, and therefore the Ethernet frame payload data of the RoCE protocol message can be directly transmitted in the wide area network after being encapsulated into the transport layer protocol message; the first transport layer protocol message is buffered to the message sending queue, and the first transport layer protocol message in the message sending queue is sent to the target gateway device, so that the RoCE protocol message data can be transmitted in the wide area network.
[0043] In some embodiments, after the first transport layer protocol message in the message sending queue is sent to the target gateway device, the method further comprises the following steps: receiving a second transport layer protocol message sent by the target gateway device; performing data extraction on the second transport layer protocol message to obtain second Ethernet frame payload data encapsulated in the second transport layer protocol message; performing encapsulation processing on the second Ethernet frame payload data to generate a second RoCE protocol message; and sending the second RoCE protocol message to the layer 2 network.
[0044] For each gateway device, the gateway device can serve as a sending end and a receiving end. After a long connection is established between the local gateway device and other gateway devices, the other gateway devices can also send data to the local gateway device.
[0045] After the local gateway device sends the first transport layer protocol message in the message sending queue to the target gateway device, the receiving end can also transmit data to the sending end.
[0046] Specifically, after a long connection is established between the local gateway device and the target gateway device, the target gateway device can send a second transport layer protocol message to the local gateway device.
[0047] The target gateway device can obtain a second RoCE protocol packet to be sent in the layer 2 network at the end thereof, extract data from the second RoCE protocol packet, and obtain second Ethernet frame payload data of the second RoCE protocol packet; perform encapsulation processing on the second Ethernet frame payload data to generate a second transport layer protocol packet; cache the second transport layer protocol packet in a packet sending queue; and send the second transport layer protocol packet in the packet sending queue to the gateway device at the local end.
[0048] Further, the gateway device at the local end can receive the second transport layer protocol packet sent by the target gateway device; extract data from the second transport layer protocol packet to obtain the second Ethernet frame payload data encapsulated in the second transport layer protocol packet.
[0049] Further, the second Ethernet frame payload data is encapsulated to re-encapsulate the second Ethernet frame payload data into a RoCE protocol packet to generate a second RoCE protocol packet; and the second RoCE protocol packet is sent to the layer 2 network through an Ethernet interface of the gateway device at the local end.
[0050] Preferably, after the second RoCE protocol packet is generated, a CoS (Class of Service) field in an Ethernet header of the second RoCE protocol packet can be set according to a queue mapping relationship pre-configured by the gateway device at the local end.
[0051] The CoS field is used to identify a service class and a priority, and the CoS field in the Ethernet header of the RoCE protocol packet is set so that the network device can process the RoCE protocol packet according to the priority to ensure that the packet with a high priority can be processed as soon as possible.
[0052] The method provided by the embodiment for transmitting RoCE protocol packet data can be used for each gateway device to serve as a sending end and a receiving end, and after receiving a transport layer protocol packet sent by a gateway device (another gateway device) at the opposite end, the transport layer protocol packet can be extracted to obtain Ethernet frame payload data encapsulated in the transport layer protocol packet, the Ethernet frame payload data is re-encapsulated into a RoCE protocol packet, and the RoCE protocol packet is sent to a layer 2 network, thereby realizing reception of the RoCE protocol packet in a wide-area lossless network.
[0053] In some embodiments, the method further comprises: monitoring a usage parameter of the buffer space of the message sending queue; the usage parameter comprises one or more of a buffer space usage amount, a buffer space usage frequency, and a change value of the buffer space usage amount; and determining the source address corresponding to the first transport layer protocol message in the message sending queue if the buffer space usage amount of the message sending queue exceeds a first preset threshold, or the buffer space usage frequency of the message sending queue exceeds a second preset threshold, or the change value of the buffer space usage amount of the message sending queue exceeds a third preset threshold.
[0054] Referring to Figure 2 , Figure 2 is a flowchart of a method for transmitting RoCE protocol message data according to an embodiment of the present application.
[0055] In order to avoid message loss or message disorder during the transmission of protocol message data (DATA), and to achieve lossless transmission of RoCE protocol message data in a wide-area lossy network, the ECN (Explicit Congestion Notification) mechanism and the PFC (Priority-based Flow Control) mechanism need to be supported.
[0056] It should be noted that in a wide-area lossy network, the transmission rate of messages needs to be adjusted according to the actual network conditions: when the network resources are sufficient and the network is not congested, the gateway device can obtain multiple transport layer protocol messages from the message sending queue at the same time for sending; when the network resources are insufficient and the network is congested, the gateway device needs to reduce the number of transport layer protocol messages sent, or even suspend the sending of transport layer protocol messages, until the network is no longer congested, so as to avoid continuously increasing the data transmission amount in the network when the network is congested, and to avoid occupying more network resources, further exacerbating network congestion.
[0057] When the network is congested, transport layer protocol messages are continuously generated, and at this time, the transport layer protocol messages generated by the gateway device will be continuously buffered in the message sending queue, or the number of messages sent is reduced, resulting in an increase in the number of transport layer protocol messages in the message sending queue.
[0058] As Figure 2As shown, in order to cope with network congestion, the ECN mechanism and the PFC mechanism need to be supported: when network congestion occurs, the transport layer protocol packets in the message sending queue continue to increase, and continue to occupy the cache space of the message sending queue; when the consumption of the cache space of the message sending queue reaches the preset threshold, i.e. the PFC flow control water line, the receiving end gateway device needs to send a PFC Pause frame or other congestion notification message to the upstream device (sending end gateway device), so that the upstream device learns that network congestion occurs after receiving the PFC Pause frame or other congestion notification message, and needs to pause the sending of the transport layer protocol packets in the message sending queue and buffer the packets in the message sending queue for waiting. Similarly, when network congestion occurs, the gateway device egress (Egress port) will also be congested due to the decrease in the number of messages sent, and the transport layer protocol packets will trigger the ECN water line (ECN flow control water line) when passing through the gateway device egress, updating the ECN field in the transport layer protocol packet, which is used to indicate that network congestion occurs, so that the receiving end network device learns that network congestion occurs according to the ECN field in the transport layer protocol packet when receiving the transport layer protocol packet.
[0059] The PFC Pause frame mechanism supports millisecond (ms) level feedback.
[0060] As shown in the Figure 2 In the sending end gateway device and the receiving end gateway device, the PFC water line and the ECN water line are set according to the size of the message sending queue cache space, and the corresponding congestion coping mechanism is enabled when the consumption of the message sending queue cache space reaches the PFC water line or the ECN water line.
[0061] Preferably, when data transmission is performed in a wide-area lossy network, the transport layer protocol can be a TCP protocol or a QUIC protocol, and the TCP protocol and the QUIC protocol support the sliding window mechanism, which is an important mechanism for coping with network congestion. Therefore, in order to better cope with network congestion and realize lossless transmission of the wide-area lossy network, the ECN mechanism, the PFC mechanism and the sliding window mechanism can be used at the same time.
[0062] As shown in the Figure 2 The receiving end gateway is provided with a TCP / QUIC receiving window, and the sending end gateway is provided with a TCP / QUIC sending window. When network congestion occurs, the receiving end gateway and the sending end gateway can dynamically adjust the window size of the TCP / QUIC receiving window and the TCP / QUIC sending window according to the network congestion situation, adjust the data transmission amount, and avoid further aggravating network congestion.
[0063] Specifically, there can be multiple message sending queues, and the gateway device can monitor the usage of the cache space of each message sending queue in real time to obtain the usage parameter of the cache space of the message sending queue.
[0064] The usage parameter includes one or more of the following: cache space usage, cache space usage frequency, and change value of the cache space usage.
[0065] Further, for each message sending queue, if the cache space usage of the message sending queue exceeds a first preset threshold, or the cache space usage frequency of the message sending queue exceeds a second preset threshold, or the change value of the cache space usage of the message sending queue exceeds a third preset threshold, it indicates that the transport layer protocol messages in the message sending queue are increasing, and network congestion may occur. At this time, the PFC congestion response mechanism can be enabled.
[0066] The first preset threshold, the second preset threshold, and the third preset threshold are determined based on the PFC water line.
[0067] Further, the source address corresponding to the first transport layer protocol message in the message sending queue is determined.
[0068] It can be understood that each gateway device can act as a sending end, a receiving end, and an intermediate forwarding end, so the first transport layer protocol message can be obtained by the gateway device from other gateway devices, and the source address corresponding to the first transport layer protocol message is used to point to the upstream device of the gateway device.
[0069] Specifically, in the PFC congestion response mechanism of the embodiment, the gateway device needs to send a CNP (Congestion Notification Packet, fast CNP congestion notification) message to the upstream device (i.e., the source address corresponding to the first transport layer protocol message) based on a first preset probability, so that the upstream device learns that network congestion occurs after receiving the CNP (Congestion Notification Packet, fast CNP congestion notification) message.
[0070] The method for transmitting RoCE protocol message data provided in the embodiment monitors the usage parameter of the cache space of the message sending queue in real time, and enables the PFC congestion response mechanism when the usage parameter exceeds the preset threshold, thereby avoiding message loss or message disorder during protocol message data transmission, and realizing lossless transmission of RoCE protocol message data in a wide-area lossy network.
[0071] In some embodiments, the method further comprises: monitoring a usage parameter of the buffer space of the message sending queue; the usage parameter comprises one or more of a buffer space usage amount, a buffer space usage frequency, and a change value of the buffer space usage amount; and if the buffer space usage amount of the message sending queue exceeds a first preset threshold, or the buffer space usage frequency of the message sending queue exceeds a second preset threshold, or the change value of the buffer space usage amount of the message sending queue exceeds a third preset threshold, then updating the ECN field in the first transport layer protocol message based on a second preset probability; and wherein the updated ECN field is used to indicate that network congestion has occurred.
[0072] Specifically, there can be multiple message sending queues, and the gateway device can monitor the usage of the buffer space of each message sending queue in real time, and obtain a usage parameter of the buffer space of the message sending queue.
[0073] The usage parameter comprises one or more of a buffer space usage amount, a buffer space usage frequency, and a change value of the buffer space usage amount.
[0074] Further, for each message sending queue, if the buffer space usage amount of the message sending queue exceeds a first preset threshold, or the buffer space usage frequency of the message sending queue exceeds a second preset threshold, or the change value of the buffer space usage amount of the message sending queue exceeds a third preset threshold, it indicates that the transport layer protocol messages in the message sending queue are increasing, and network congestion can occur, and at this time the ECN congestion response mechanism can be enabled.
[0075] The first preset threshold, the second preset threshold, and the third preset threshold are determined based on the ECN waterline.
[0076] Further, the ECN field in the first transport layer protocol message is updated based on a second preset probability.
[0077] The updated ECN field is used to indicate that network congestion has occurred.
[0078] Specifically, in the ECN congestion response mechanism of the present embodiment, the gateway device at the local end needs to update and set the ECN field in the first transport layer protocol message waiting to be sent in the message sending queue to "11" based on a second preset probability.
[0079] In the ECN congestion response mechanism, the ECN field in the message is "11", which indicates that the message sending is congested, and network congestion has occurred.
[0080] In some embodiments, further comprising: determining, when the transport layer protocol packet is received, whether the ECN field in the transport layer protocol packet is used to indicate that the network is congested; and sending a CNP message to a source address of the transport layer protocol packet to make the network device corresponding to the source address know that the network is congested, if the ECN field in the transport layer protocol packet is used to indicate that the network is congested.
[0081] It can be understood that each gateway device can act as a sending end, a receiving end and an intermediate forwarding end. When the transport layer protocol packet is received by the local gateway device, it is also necessary to determine whether the ECN field in the transport layer protocol packet is used to indicate that the network is congested.
[0082] Specifically, if the ECN field in the transport layer protocol packet is used to indicate that the network is congested, i.e., the ECN field in the packet is "11", the source address of the transport layer protocol packet is determined; a CNP message is sent to the source address of the transport layer protocol packet to make the network device corresponding to the source address know that the network is congested; and the ECN field in the first transport layer protocol packet waiting to be sent in the packet sending queue is updated and set to "10" or "01".
[0083] In the ECN congestion response mechanism, the ECN field in the packet is "10" or "01", which means that the ECN congestion response mechanism is enabled or started, which can reduce the RTT (Round Trip Time) of RoCE protocol congestion control.
[0084] The RoCE protocol packet data transmission method provided in the embodiment monitors the use parameter of the cache space of the packet sending queue in real time, and enables the ECN congestion response mechanism when the use parameter exceeds the preset threshold, so as to avoid packet loss or packet disorder and other situations in the protocol packet data transmission process, and realize the lossless transmission of RoCE protocol packet data in a wide area loss network.
[0085] In some embodiments, further comprising: monitoring the use parameter of the cache space of the packet sending queue; the use parameter includes one or more of the cache space usage, the cache space usage frequency, and the change value of the cache space usage; determining the last hop gateway device corresponding to the first transport layer protocol packet in the packet sending queue, if the cache space usage of the packet sending queue exceeds a fourth preset threshold, or the cache space usage frequency of the packet sending queue exceeds a fifth preset threshold, or the change value of the cache space usage of the packet sending queue exceeds a sixth preset threshold; and sending a pause message to the last hop gateway device to make the last hop gateway device pause data sending.
[0086] Specifically, there can be multiple message sending queues, and the gateway device can monitor the usage of the cache space of each message sending queue in real time to obtain the usage parameter of the cache space of the message sending queue.
[0087] The usage parameter includes one or more of the cache space usage, the cache space usage frequency, and the change value of the cache space usage.
[0088] Further, for each message sending queue, if the cache space usage of the message sending queue exceeds a fourth preset threshold, or the cache space usage frequency of the message sending queue exceeds a fifth preset threshold, or the change value of the cache space usage of the message sending queue exceeds a sixth preset threshold, it indicates that the transport layer protocol messages in the message sending queue are increasing, and network congestion may occur. At this time, the congestion response mechanism can be enabled.
[0089] Optionally, the fourth preset threshold, the fifth preset threshold, and the sixth preset threshold are determined based on a PFC water line or an ECN water line.
[0090] Further, the last hop gateway device corresponding to the first transport layer protocol message in the message sending queue is determined.
[0091] It can be understood that each gateway device can act as a sending end, a receiving end, and an intermediate forwarding end. In order to cope with network congestion, when the gateway device acts as an intermediate forwarding end, the corresponding last hop gateway device corresponding to the transport layer protocol message should be notified to suspend data transmission to avoid exacerbating the congestion of the local gateway device and network congestion.
[0092] Specifically, after determining the last hop gateway device corresponding to the first transport layer protocol message in the message sending queue, the local gateway device needs to send a suspension message to the last hop gateway device to make the last hop gateway device suspend data transmission to avoid further exacerbating network congestion.
[0093] The method provided by the embodiment can monitor the usage parameter of the cache space of the message sending queue in real time, notify the corresponding last hop gateway device corresponding to the transport layer protocol message to suspend data transmission when the usage parameter exceeds the preset threshold, avoid further exacerbating network congestion, and avoid message loss or message disorder during the transmission of the protocol message data, thereby realizing lossless transmission of the RoCE protocol message data in a wide area lossy network.
[0094] In some embodiments, sending the suspension message to the last hop gateway device includes establishing at least two communication links with the last hop gateway device, and sending the suspension message to the last hop gateway device based on the communication links.
[0095] The RoCE protocol message data transmission method provided in the embodiment is to ensure that the pause message can be received by the upper hop gateway device, at least two communication links are established between the gateway device and the upper hop device, when the pause message transmission fails due to congestion of a communication link, the redundant communication link can be responsible for the transmission of the pause message, so as to reduce the possibility that the upper hop gateway device cannot stop message sending in time due to the pause message being discarded or delayed, and avoid further aggravating network congestion.
[0096] The application further provides a RoCE protocol message data transmission device. Figure 3 , Figure 3 FIG. 1 is a structural schematic diagram of the RoCE protocol message data transmission device provided by the application. In the embodiment, the RoCE protocol message data transmission device comprises an acquisition module 310, an extraction module 320, an encapsulation module 330, a cache module 340 and a sending module 350.
[0097] The acquisition module 310 is used for acquiring a first RoCE protocol message to be sent in a layer 2 network.
[0098] The extraction module 320 is used for performing data extraction on the first RoCE protocol message to obtain first Ethernet frame payload data of the first RoCE protocol message.
[0099] The encapsulation module 330 is used for performing encapsulation processing on the first Ethernet frame payload data to generate a first transport layer protocol message.
[0100] The cache module 340 is used for caching the first transport layer protocol to a message sending queue.
[0101] The sending module 350 is used for sending the first transport layer protocol message in the message sending queue to a target gateway device.
[0102] In some embodiments, the RoCE protocol message data transmission device further comprises a receiving module and a delivery module.
[0103] The receiving module is used for receiving a second transport layer protocol message sent by the target gateway device.
[0104] The extraction module 320 is used for performing data extraction on the second transport layer protocol message to obtain second Ethernet frame payload data encapsulated in the second transport layer protocol message.
[0105] The encapsulation module 330 is used for performing encapsulation processing on the second Ethernet frame payload data to generate a second RoCE protocol message.
[0106] The delivery module is used for sending the second RoCE protocol message to the layer 2 network.
[0107] In some embodiments, the RoCE protocol message data transmission device further comprises a congestion control module.
[0108] The congestion control module is configured to monitor a usage parameter of the cache space of the message sending queue; the usage parameter comprises one or more of a cache space usage amount, a cache space usage frequency, and a change value of the cache space usage amount; if the cache space usage amount of the message sending queue exceeds a first preset threshold, or the cache space usage frequency of the message sending queue exceeds a second preset threshold, or the change value of the cache space usage amount of the message sending queue exceeds a third preset threshold, the source address corresponding to the first transport layer protocol message in the message sending queue is determined; and a CNP message is sent to the source address based on a first preset probability, so that the network device corresponding to the source address learns that network congestion occurs.
[0109] In some embodiments, the congestion control module is configured to monitor a usage parameter of the cache space of the message sending queue; the usage parameter comprises one or more of a cache space usage amount, a cache space usage frequency, and a change value of the cache space usage amount; if the cache space usage amount of the message sending queue exceeds a first preset threshold, or the cache space usage frequency of the message sending queue exceeds a second preset threshold, or the change value of the cache space usage amount of the message sending queue exceeds a third preset threshold, the ECN field in the first transport layer protocol message is updated based on a second preset probability; and the updated ECN field is used to mark that network congestion occurs.
[0110] In some embodiments, the congestion control module is configured to, when receiving a transport layer protocol message, judge whether the ECN field in the transport layer protocol message is used to mark that network congestion occurs; if the ECN field in the transport layer protocol message is used to mark that network congestion occurs, a CNP message is sent to the source address of the transport layer protocol message, so that the network device corresponding to the source address learns that network congestion occurs.
[0111] In some embodiments, the congestion control module is configured to monitor a usage parameter of the cache space of the message sending queue; the usage parameter comprises one or more of a cache space usage amount, a cache space usage frequency, and a change value of the cache space usage amount; if the cache space usage amount of the message sending queue exceeds a fourth preset threshold, or the cache space usage frequency of the message sending queue exceeds a fifth preset threshold, or the change value of the cache space usage amount of the message sending queue exceeds a sixth preset threshold, the last hop gateway device corresponding to the first transport layer protocol message in the message sending queue is determined; and a pause message is sent to the last hop gateway device, so that the last hop gateway device pauses data sending.
[0112] In some embodiments, the congestion control module is configured to establish at least two communication links with the last hop gateway device; and a pause message is sent to the last hop gateway device based on the communication links.
[0113] The application also provides a gateway device. Please refer to Figure 4 , Figure 4 is a structural schematic diagram of the gateway device provided by the application, as shown in Figure 4 The gateway device can include a processor 410, a communications interface 420, a memory 430 and a communications bus 440, wherein the processor 410, the communications interface 420 and the memory 430 complete mutual communication through the communications bus 440. The processor 410 can invoke the logical instructions in the memory 430 to execute the RoCE protocol message data transmission method.
[0114] In addition, the logical instructions in the memory 430 described above can be realized in the form of a software functional unit and sold or used as an independent product, which can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the application essentially or the part of the prior art that contributes to the technical solutions or the part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in the various embodiments of the application. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk and various program code storage media.
[0115] The application also provides a non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the RoCE protocol message data transmission method provided by the above-mentioned methods.
[0116] The device embodiments described above are only schematic, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e. they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment. Those skilled in the art can understand and implement it without creative labor.
[0117] Those skilled in the art can clearly understand the technical solutions of the various embodiments from the above description of the embodiments, and the various embodiments can be implemented by means of software with the necessary general hardware platforms, and of course, can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part of the prior art that makes a contribution, can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0118] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for transmitting RoCE protocol message data, characterized in that, Applied to gateway devices, including: Obtain the first RoCE protocol message to be sent in the Layer 2 network; Data is extracted from the first RoCE protocol message to obtain the first Ethernet frame payload data of the first RoCE protocol message. The payload data of the first Ethernet frame is encapsulated to generate a first transport layer protocol message; the first transport layer protocol message is a QUIC protocol message. Cache the first transport layer protocol message to the message sending queue; Send the first transport layer protocol message in the message sending queue to the target gateway device; After sending the first transport layer protocol message in the message sending queue to the target gateway device, the method further includes: Receive the second transport layer protocol message sent by the target gateway device; Data is extracted from the second transport layer protocol message to obtain the second Ethernet frame payload data encapsulated in the second transport layer protocol message; The second Ethernet frame payload data is encapsulated to generate a second RoCE protocol message; Send the second RoCE protocol message to the Layer 2 network; Also includes: Monitor the usage parameters of the buffer space of the message sending queue; the usage parameters include one or more of the following: buffer space usage amount, buffer space usage frequency, and change value of buffer space usage amount; If the cache space usage of the message sending queue exceeds a first preset threshold, or the cache space usage frequency of the message sending queue exceeds a second preset threshold, or the change value of the cache space usage of the message sending queue exceeds a third preset threshold, then the source address corresponding to the first transport layer protocol message in the message sending queue is determined. Based on a first preset probability, a CNP message is sent to the source address so that the network device corresponding to the source address is aware that network congestion has occurred. The first preset threshold, the second preset threshold, and the third preset threshold are determined based on the PFC waterline.
2. The method for transmitting RoCE protocol message data according to claim 1, characterized in that, Also includes: Monitor the usage parameters of the buffer space of the message sending queue; the usage parameters include one or more of the following: buffer space usage amount, buffer space usage frequency, and change value of buffer space usage amount; If the cache space usage of the message sending queue exceeds a first preset threshold, or the cache space usage frequency of the message sending queue exceeds a second preset threshold, or the change value of the cache space usage of the message sending queue exceeds a third preset threshold, then based on the second preset probability, the ECN field in the first transport layer protocol message is updated; wherein, the updated ECN field is used to indicate that network congestion has occurred.
3. The method for transmitting RoCE protocol message data according to claim 1, characterized in that, Also includes: Upon receiving a transport layer protocol message, determine whether the ECN field in the transport layer protocol message is used to indicate that network congestion has occurred; If the ECN field in the transport layer protocol message is used to indicate that network congestion has occurred, a CNP message is sent to the source address of the transport layer protocol message so that the network device corresponding to the source address is aware that network congestion has occurred.
4. The method for transmitting RoCE protocol message data according to claim 1, characterized in that, Also includes: Monitor the usage parameters of the buffer space of the message sending queue; the usage parameters include one or more of the following: buffer space usage amount, buffer space usage frequency, and change value of buffer space usage amount; If the cache space usage of the message sending queue exceeds the fourth preset threshold, or the cache space usage frequency of the message sending queue exceeds the fifth preset threshold, or the change value of the cache space usage of the message sending queue exceeds the sixth preset threshold, then the previous hop gateway device corresponding to the first transport layer protocol message in the message sending queue is determined. A pause message is sent to the upstream gateway device to cause the upstream gateway device to pause data transmission.
5. The method for transmitting RoCE protocol message data according to claim 4, characterized in that, Sending a pause message to the upstream gateway device includes: Establish at least two communication links with the upstream gateway device; Based on the communication link, a pause message is sent to the previous hop gateway device.
6. A RoCE protocol message data transmission device, characterized in that, include: The acquisition module is used to acquire the first RoCE protocol message to be sent in the Layer 2 network; The extraction module is used to extract data from the first RoCE protocol message to obtain the first Ethernet frame payload data of the first RoCE protocol message. An encapsulation module is used to encapsulate the payload data of the first Ethernet frame and generate a first transport layer protocol message. The first transport layer protocol message is a QUIC protocol message; The caching module is used to cache the first transport layer protocol message to the message sending queue; The sending module is used to send the first transport layer protocol message in the message sending queue to the target gateway device; The receiving module is used to receive the second transport layer protocol message sent by the target gateway device; the extraction module is used to extract data from the second transport layer protocol message to obtain the second Ethernet frame payload data encapsulated in the second transport layer protocol message. The encapsulation module is used to encapsulate the second Ethernet frame payload data to generate a second RoCE protocol message; the sending module is used to send the second RoCE protocol message to the Layer 2 network. A congestion control module is used to monitor the usage parameters of the buffer space of the packet sending queue. These usage parameters include one or more of the following: buffer space usage amount, buffer space usage frequency, and change in buffer space usage. If the buffer space usage of the packet sending queue exceeds a first preset threshold, or the buffer space usage frequency of the packet sending queue exceeds a second preset threshold, or the change in buffer space usage of the packet sending queue exceeds a third preset threshold, then the source address corresponding to the first transport layer protocol packet in the packet sending queue is determined. Based on a first preset probability, a CNP message is sent to the source address so that the network device corresponding to the source address is aware that network congestion has occurred. The first preset threshold, the second preset threshold, and the third preset threshold are determined based on the PFC waterline.
7. A gateway device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method for transmitting RoCE protocol message data as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for transmitting RoCE protocol message data as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Data transmission method and device, computing equipment and storage medium
CN113497767A
Network congestion notification method and device and storage medium
CN117221225A
Method and system for a multi-stream tunneled marker-based protocol data unit aligned protocol
US20060101225A1