Message processing method and network equipment

By determining whether the message meets the preset conditions in the cloud network, assisting Bond routing decisions, allowing partial disorder and dynamic balance, it solves the network congestion caused by hash polarization and improves bandwidth utilization and network performance.

CN120729795APending Publication Date: 2025-09-30HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410381429.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

In cloud scenarios, uneven Bond routing (such as hash polarization) can cause network congestion and reduced bandwidth utilization.

Method used

By determining whether the message meets the preset conditions, it assists in Bond routing decisions, allowing partial disorder and dynamic balancing. For example, by determining whether the message contains disorder attributes, sending it through a specific queue or device, or providing the hash digest in advance, it can select a port with no network congestion to send the message.

Benefits of technology

This solves the network congestion caused by uneven Bond routing and improves bandwidth utilization and network performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120729795A_ABST
    Figure CN120729795A_ABST
Patent Text Reader

Abstract

The invention provides a message processing method and network equipment, and can be applied to a message processing system in a cloud field scene, the message processing system comprises a virtual machine, an open source virtual switch and at least two ports, and the message processing method comprises the following steps: obtaining a target message sent by the virtual machine, and judging whether the target message meets a preset condition, the preset condition is used for representing that sending of the target message is not limited by the tuple hash calculation result, and if yes, the target message is sent to the port meeting the requirement. According to the method and the device, whether the target message meets the preset condition or not is judged to assist the Bond to carry out the routing decision, only the message meeting the preset condition (for example, the message contains a message out-of-order attribute / is located in a special queue / is located in special equipment and the like) can be sent to any port without congestion (that is, the message meets the requirement) without being limited by the calculated Hash value, and the message sending efficiency is improved. Therefore, the problem of network congestion caused by uneven Bond routing (such as Hash polarization) is solved, the bandwidth is increased, and the bandwidth utilization rate is improved at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a message processing method and network device. Background Art

[0002] In cloud scenarios, computing node network design often uses an Open Virtual Switch (OVS) solution, where network interfaces are typically connected to the switch using network adapter bonding (NIC bonding). Bonding can also be called link aggregation, port bonding, or interface bonding.

[0003] Bond is a network technology that combines multiple physical network interfaces (such as Ethernet interfaces) into a single virtual logical interface. When data packets (e.g., messages) are transmitted through this logical interface, they are distributed to each physical network interface using an internal algorithm (e.g., a hash function) to achieve load balancing. This fully utilizes the bandwidth of each physical network interface and improves overall network throughput. Bond interfaces support different modes, including Balance Round Robin, Active Backup, Balance XOR, and Broadcast.

[0004] In cloud scenarios, dynamic link aggregation strategies (IEEE 802.3ad) are often employed to ensure availability, bandwidth expansion and balancing, and message order preservation. Under this strategy, egress selection is typically based on the message tuple hash. This approach requires direct memory access (DMA) of messages from the virtual machine (VM), followed by bond routing based on the message tuple information, ultimately sending the message to different ports. Because the tuple information of a DMA message cannot be predicted before it is sent, this can lead to short-term hash polarization, resulting in physical link congestion (for example, when the PCIe bandwidth is greater than the bandwidth of a single port), leading to bandwidth loss and ultimately reduced network utilization. Summary of the Invention

[0005] The present application provides a method for processing messages and a network device for solving the problem of network congestion caused by uneven Bond routing (such as hash polarization), which leads to bandwidth loss or reduced bandwidth utilization, thereby improving network performance.

[0006] Based on this, the embodiments of the present application provide the following technical solutions:

[0007] On the first aspect, the present application first provides a method for processing a message, which can be applied to a message processing system, which includes a VM, an OVS and at least two ports. The method is specifically applied to the OVS in the system, and the method specifically includes: first, obtaining the message sent by the VM, the current message can be called a target message, which can be one or more, and the present application does not limit this. Afterwards, further determine whether the target message meets the preset conditions, and the preset conditions are used to characterize that the sending of the target message is not restricted by the tuple hash calculation result. If it is determined that the target message meets the preset conditions, the target message is sent to a port that meets the requirements (that is, one of the at least two ports in the above system).

[0008] In the above-mentioned embodiment of the present application, by judging whether the target message meets the preset conditions, Bond is assisted in making routing decisions. Only messages that meet the preset conditions (such as messages with disordered attributes / located in a special queue / located on a special device, etc.) can be sent to any port that is not congested (i.e., meets the requirements) without being restricted by the hash value calculation results, thereby solving the network congestion caused by uneven Bond routing (such as hash polarization), increasing bandwidth, and improving bandwidth utilization.

[0009] In a possible implementation manner of the first aspect, one implementation form of determining whether the target message meets the preset condition may be: determining whether the target message includes preset out-of-order attribute characters.

[0010] In the above-mentioned embodiment of the present application, the existence of descriptor-level messages allows partial disorder and dynamic balancing during message transmission. For the traffic on this interface, OVS is responsible for dynamically balancing this traffic to alleviate the network congestion problem caused by uneven Bond routing in the cloud network.

[0011] In a possible implementation manner of the first aspect, another implementation form of determining whether the target message meets the preset condition may be: determining whether the target message is sent via the first queue in the VM.

[0012] In the above-mentioned embodiment of the present application, a method for implementing the queue-level out-of-order enabling solution is specifically described, so that partial out-of-order (i.e., messages passing through the first queue can be out of order) and dynamic balancing are allowed during the message sending process. For the traffic on this interface, OVS is responsible for dynamic balancing of this traffic to alleviate the network congestion problem caused by uneven Bond routing in the cloud network.

[0013] In a possible implementation manner of the first aspect, another implementation form of determining whether the target packet meets the preset condition may be: determining whether the target packet is received via a second queue in the OVS.

[0014] In the above embodiment of the present application, another implementation method of the queue-level out-of-order enabling solution is specifically described. In this case, the queue is located on OVS and has flexibility.

[0015] In a possible implementation manner of the first aspect, another implementation form of determining whether the target message meets the preset condition may be: determining whether the target message is sent via the first device.

[0016] In the above-mentioned embodiment of the present application, a method for implementing the device-level out-of-order enabling solution is specifically described, so that partial out-of-order (that is, the messages passing through the first device can be out of order) and dynamic balancing are allowed during the message sending process. For the traffic on this interface, OVS is responsible for dynamically balancing this traffic to alleviate the network congestion problem caused by uneven Bond routing in the cloud network.

[0017] In a possible implementation of the first aspect, the first device is deployed between the VM and the OVS, and is configured to receive a target message and send the target message to the OVS.

[0018] In the above implementation of the present application, the first device can be deployed as an independent device between the VM and OVS to decouple the functions of each device and realize modularization of functions.

[0019] In a possible implementation of the first aspect, the first device may also be located inside the OVS, and be configured to receive a target message sent by the VM.

[0020] In the above-mentioned implementation manner of the present application, the first device can be coupled in the OVS to reduce the number of information interactions between devices and save time.

[0021] In a possible implementation manner of the first aspect, the port that meets the requirements may be a port on which the network is not congested.

[0022] In the above-mentioned embodiment of the present application, a specific form of a port that meets the requirements is specifically described and is feasible.

[0023] In a possible implementation of the first aspect, each of the at least two ports corresponds to a storage area (eg, a memory, a physical storage module, etc.), and each storage area is used to store messages to be sent to the corresponding port.

[0024] In the above-mentioned embodiment of the present application, a storage area is added before each port for storing the corresponding messages to be sent, thereby increasing the buffer space of the messages.

[0025] In a possible implementation manner of the first aspect, the method further includes: judging whether the corresponding port meets the requirement (eg, whether the network is congested) based on the remaining storage space of each storage area.

[0026] In the above-mentioned implementation manner of the present application, it is feasible to determine whether the corresponding port meets the requirements based on the remaining storage space in the storage area.

[0027] The second aspect of the present application also provides a method for processing a message, which can be applied to a message processing system, which includes a VM, an OVS, and at least two ports. The method is specifically applied to the OVS in the system, and the method specifically includes: first, obtaining the hash digest of the target message sent by the VM, and then determining the port to which the target message is to be sent based on the hash digest. The port can be called the target port, and the target port is one of the at least two ports mentioned above. Finally, the target message is processed according to the congestion situation of the target port. For example, if the network of the target port is not congested, then after receiving the target message, the target message is directly sent to the target port.

[0028] In the above implementation of the present application, the virtual network card can be informed of the hash digest of its network message in advance through the descriptor. Messages can be filtered and differentiated based on this digest, and Quality of Service (QoS) scheduling can be performed based on the congestion of the Bond port, thereby improving bandwidth utilization.

[0029] In a possible implementation of the second aspect, a method for processing the target message according to the congestion of the target port may be: if the network of the target port is congested, then other subsequent messages are processed first and the sending of the target message is delayed.

[0030] In the above-mentioned embodiment of the present application, it is specifically described that if the target port is congested, other messages are processed instead, and the target message is delayed in being sent to the target port, which is flexible.

[0031] A third aspect of the present application provides a network device having the functionality to implement the method of the first aspect or any possible implementation of the first aspect, or having the functionality to implement the method of the second aspect or any possible implementation of the second aspect. The functionality may be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned functionality.

[0032] The fourth aspect of the present application provides a network device, which may include a memory, a processor, and a bus system, wherein the memory is used to store a computer program (also referred to as a program, computer-readable instructions), and the processor is used to call the program stored in the memory to execute the method of the first aspect of the embodiment of the present application or any possible implementation of the first aspect, or to execute the method of the second aspect of the embodiment of the present application or any possible implementation of the second aspect.

[0033] In a fifth aspect, the present application provides a computer-readable storage medium having instructions stored therein. When the instructions are executed on a computer, the computer can execute the method of the first aspect or any possible implementation of the first aspect, or the computer can execute the method of the second aspect or any possible implementation of the second aspect.

[0034] In a sixth aspect, the present application provides a computer program or a computer program product containing instructions. When the computer program or computer program product runs on a computer, it enables the computer to execute the method of the above-mentioned first aspect or any possible implementation of the first aspect, or enables the computer to execute the above-mentioned second aspect or any possible implementation of the second aspect.

[0035] The seventh aspect of the present application provides a chip, which includes at least one processor and at least one interface circuit, the interface circuit is coupled to the processor, the at least one interface circuit is used to perform transceiver functions, and send instructions to at least one processor, the at least one processor is used to run a computer program or instruction, which has the function of implementing the method of the first aspect or any possible implementation of the first aspect, or, it has the function of implementing the method of the second aspect or any possible implementation of the second aspect, the function can be implemented by hardware, or by software, or by a combination of hardware and software, the hardware or software includes one or more modules corresponding to the above functions. In addition, the interface circuit is used to communicate with other modules outside the chip.

[0036] In some implementations of the present application, some of the one or more processors may implement some steps of the above method through dedicated hardware. For example, processing involving a neural network model may be implemented by a dedicated neural network processor or a graphics processor.

[0037] The method provided in the embodiment of the present application can be implemented by one chip or by multiple chips working together. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic diagram of the system architecture provided in an embodiment of the present application;

[0039] Figure 2 A flowchart of a method for processing a message provided in an embodiment of the present application;

[0040] Figure 3 A schematic diagram of the structure of the queue-level out-of-order enabling solution provided in an embodiment of the present application;

[0041] Figure 4 Another structural diagram of the queue-level out-of-order enabling solution provided in an embodiment of the present application;

[0042] Figure 5 A schematic diagram of the structure of the device-level out-of-order enabling solution provided in an embodiment of the present application;

[0043] Figure 6 Another structural diagram of the device-level out-of-order enabling solution provided in an embodiment of the present application;

[0044] Figure 7 Another flowchart of the message processing method provided in an embodiment of the present application;

[0045] Figure 8 A schematic diagram of a network device provided in an embodiment of the present application;

[0046] Figure 9 A schematic diagram of another network device provided in an embodiment of the present application;

[0047] Figure 10 A schematic diagram of the structure of a network device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The embodiments of the present application provide a message processing method and a network device for solving the problem of network congestion caused by uneven Bond routing (such as hash polarization), which in turn causes bandwidth loss or reduced bandwidth utilization, thereby improving network performance.

[0049] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0050] In order to better understand the solutions of the embodiments of the present application, the following first introduces the relevant terms and concepts that may be involved in the embodiments of the present application. It should be understood that the interpretation of the relevant terms and concepts may be limited by the specific circumstances of the embodiments of the present application, but it does not mean that the present application is limited to only such specific circumstances. The specific circumstances of different embodiments may also vary, which is not specifically limited here.

[0051] (1)OVS

[0052] OVS is a commonly used network acceleration technology in current cloud networks. Its principle is that after the first packet passes through the slow path, the matching relationship (match) and related actions (action) for packet processing are transmitted to the data path, which is commonly called the flow table or fast table. Subsequent packets can then be quickly forwarded through the data path. In OVS network offload acceleration scenarios, the fast path is usually assisted by hardware, and the fast table matching is also based on flow tuple information.

[0053] (2) Tuple

[0054] Tuples are a fundamental concept in relational databases. A relation is a table, each row in the table (that is, each record in the database) is a tuple, and each column is an attribute. In a two-dimensional table, a tuple is also called a row.

[0055] Tuples are immutable (i.e., they cannot be modified, added, or deleted) and can be sliced. Tuples themselves are immutable, but if they contain other mutable elements, those elements can be changed. For example, if a list is applied to a tuple, the values ​​in the list can be changed.

[0056] (3) Transmit Packet Steering (XPS)

[0057] XPS is a mechanism that automatically selects a send queue when sending data packets on a multi-queue network interface card. Typically, the central processing unit (CPU) records the packet's queue selection result to guide subsequent packet transmission and prevent out-of-order transmission.

[0058] (4) Receive Side Scaling (RSS)

[0059] RSS is a network driver technology that efficiently distributes network receive processing across multiple CPUs in a multiprocessor system. Also known as multi-queue receive, RSS distributes network receive processing across multiple hardware-based receive queues, allowing multiple CPUs to process inbound network traffic. RSS can be used to alleviate receive interrupt processing bottlenecks caused by an overloaded single CPU and reduce network latency.

[0060] Its function is to issue a hash function with a predefined hash key on each incoming packet (the calculated hash value is used to determine which port to send it to). The hash function uses the packet's IP address, protocol (e.g., User Datagram Protocol (UDP), Transmission Control Protocol (TCP), etc.), and port (e.g., a 5-tuple) as the key and calculates the hash value. If configured, the RSS hash function can only use 2, 3, or 4 tuples to create the key.

[0061] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0062] First, the system architecture used in the embodiment of the present application is described. Figure 1 , Figure 1 A schematic diagram of the system architecture provided in an embodiment of the present application. The system architecture can also be referred to as a message processing system. Specifically, the system architecture includes one or more VMs 101, OVS 102, and at least two physical network ports 103 (hereinafter referred to as ports 103). VM 101 is used to send messages to OVS 102, and OVS 102 sends the received messages to a port that meets the requirements (e.g., the network is not congested) based on the method described in the embodiment of the present application.

[0063] It should be noted that in some embodiments of the present application, in order to determine whether each port is congested more promptly, each port can also be equipped with a storage area 104 (such as memory), and the storage area 104 corresponds to the port 103 one-to-one and is used to store messages to be sent to the corresponding port.

[0064] The method of the embodiment of the present application is mainly applied to the network device / network driver of the cloud scene computing node, such as the above Figure 1 In the OVS102 in the corresponding embodiment, it is mainly achieved by embedding corresponding fields in the network card driver.

[0065] It should be noted that, in the embodiments of this application, Figure 1 The system architecture is for illustration only and does not limit the deployment of each unit / module.

[0066] Based on the above system architecture, the following describes the message processing method provided by the embodiment of the present application. This method is applied in the cloud scenario. For details, please refer to Figure 2 , Figure 2A flow chart of a method for processing a message provided in an embodiment of the present application specifically includes the following steps:

[0067] 201. Obtain the target message sent by the VM.

[0068] First, the network device obtains a message sent by the VM. The current message can be called a target message, which can be one or more. This application does not limit this. For ease of explanation, the following description is based on the example of a message currently being processed as the target message.

[0069] 202. Determine whether the target message meets the preset conditions. If so, execute step 203; if not, execute step 204.

[0070] Afterwards, it is further determined whether the target message meets the preset condition, if so, step 203 is executed, if not, step 204 is executed. The preset condition is used to indicate that the sending of the target message is not restricted by the tuple hash calculation result.

[0071] It should be noted that, in some embodiments of the present application, the manner of determining whether the target message meets the preset conditions may include but is not limited to the following forms:

[0072] A. Determine whether the target message contains the preset out-of-order attribute characters.

[0073] Whether the preset conditions are met can be determined by determining whether the target message contains the preset out-of-order attribute character. This approach can also be called a message descriptor-level out-of-order enabling solution. As an example, a user can use two or more descriptors to select multipath enablement. At least one of these descriptors supports out-of-order, meaning that the message contains the preset out-of-order attribute character. Messages containing the preset out-of-order attribute character are not affected by the tuple hash calculation result.

[0074] For example, assuming that message a does not contain the preset out-of-order attribute characters (hereinafter referred to as traditional messages), then after tuple hash calculation, the port corresponding to message a is assumed to be port 1, then message a must be sent to port 1; if message a contains the preset out-of-order attribute characters (hereinafter referred to as descriptor-level messages), then message a will not be subject to the restrictions of tuple hash calculation (that is, the restriction that message a must be sent to port 1), and can be sent to any port that meets the requirements. For example, assuming that port 1 is congested and port 2 is not congested, then message a can be sent to port 2 where the network is not congested.

[0075] It should be noted that in some embodiments of the present application, the multi-path selection method can be presented to the user through a driver, so that the user can use the advantages of multi-path in the cloud to conduct business in ordinary Ethernet messages, that is, the user decides whether to add preset out-of-order attribute characters to traditional messages; the multi-path selection method can also be presented in the form of conditional triggering. When the preset conditions are met, the preset out-of-order attribute characters are added to the corresponding message. This application does not specifically limit this.

[0076] As an example, the code field of a descriptor-level message may look like this:

[0077] struct virtq_desc{

[0078] / *Address(guest-physical).* /

[0079] le64 addr;

[0080] / *Length.* /

[0081] le32 len;

[0082] / *The flags* /

[0083] le16 reorder_enable;

[0084] / *Next field if flags&NEXT* /

[0085] le16 next;

[0086] };

[0087] Among them, Address is the address of the message, Length is the length of the message, The flags is an attribute of the message, and out-of-order attribute characters can be embedded here. Next field if flags&NEXT is another attribute of the message and is not described here.

[0088] In summary, the existence of descriptor-level messages allows for partial disorder and dynamic balancing during message transmission. For the traffic on this interface, OVS is responsible for dynamic balancing of this traffic.

[0089] B. Determine whether the target message is sent or received via a preset specific queue.

[0090] Whether the preset conditions are met can be determined by determining whether the target message is sent or received via a preset specific queue. This approach can also be called a queue-level out-of-order enabling solution. As an example, a user can use multiple queues for multipath enabling selection. At least one of the queues is an out-of-order queue (i.e., a preset specific queue). Messages sent or received via this preset specific queue are not affected by the tuple hash calculation result.

[0091] It should be noted that in some embodiments of the present application, whether a message is sent or received by the preset specific queue can be determined based on the location of the device where the preset specific queue is located. The following are introduced respectively:

[0092] a. The preset specific queue is located on the VM.

[0093] If the preset specific queue is located on the VM, the specific queue can be called the first queue (which can be recorded as Q0). For details, please refer to Figure 3 , Figure 3 A structural diagram of the queue-level out-of-order enabling solution provided in an embodiment of the present application. Each VM has two queues, one of which is the first queue Q0 (with the ability to send packets out of order), and the other is the traditional queue Q1 (without the ability to send packets out of order). The message generated on the VM can be sent to OVS via the first queue Q0 or via the traditional queue Q1. If the message is sent to OVS via the first queue Q0, the corresponding message is not restricted by the tuple hash calculation and can be sent to any port that meets the requirements; if the message is sent to OVS via the traditional queue Q1, the corresponding message is restricted by the tuple hash calculation and must be sent to the corresponding port determined after the hash calculation.

[0094] For example, assuming that message b is sent via the traditional queue Q1, then based on the tuple hash calculation, the port corresponding to message b is assumed to be port 2, so message b must be sent to port 2; if message b is sent via the first queue Q0, then message b is not subject to the restriction of tuple hash calculation (that is, the restriction that message b must be sent to port 2) and can be sent to any port that meets the requirements. For example, assuming that the network of port 2 is congested and the network of port 3 is not congested, then message b can be sent to port 3 where the network is not congested.

[0095] It should be noted that in the embodiment of the present application, each first queue Q0 may include one or more sub-queues, and each traditional queue Q1 may also include one or more sub-queues, which is not limited in the present application.

[0096] b. The preset specific queue is located on OVS.

[0097] If the preset specific queue is located on OVS, then the specific queue can be called the second queue (which can be recorded as Q0'). For details, please refer to Figure 4 , Figure 4 Another structural diagram of the queue-level out-of-order enabling solution provided in an embodiment of the present application, similarly, each VM corresponds to two queues, one of which is the second queue Q0' (with the ability to send packets out of order), and the other is the traditional queue Q1 (without the ability to send packets out of order). The messages generated on the VM can be received via the second queue Q0' on the OVS, or via the traditional queue Q1 on the OVS. If the message is received via the second queue Q0', the corresponding message is not restricted by the tuple hash calculation, and the message can be sent to any port that meets the requirements; if the message is received via the traditional queue Q1, the corresponding message is restricted by the tuple hash calculation, and the message must be sent to the corresponding port determined after the hash calculation.

[0098] For example, assuming that message c is sent via the traditional queue Q1, then based on the tuple hash calculation, the port corresponding to message c is assumed to be port 3, so message c must be sent to port 3; if message c is sent via the second queue Q0', then message c is not subject to the restriction of tuple hash calculation (that is, the restriction that message c must be sent to port 3) and can be sent to any port that meets the requirements. For example, assuming that the network at port 3 is congested and the network at port 4 is not congested, then message c can be sent to port 4 where the network is not congested.

[0099] Similarly, it should be noted that, in the embodiment of the present application, each second queue Q0' may include one or more sub-queues, and each traditional queue Q1 may also include one or more sub-queues, which is not limited in the present application.

[0100] It should be noted that in some embodiments of the present application, the multi-path selection method can be presented to the user through a driver, so that the user can use the advantages of multi-path in the cloud to carry out business in ordinary Ethernet messages, that is, the user decides whether the message is sent or received by a traditional queue or by a preset specific queue; the multi-path selection method can also be presented in the form of conditional triggering. When the preset conditions are met, the trigger message automatically selects which queue to send or receive. This application does not specifically limit this.

[0101] In summary, the queue-level out-of-order enabling solution allows partial out-of-order (i.e., packets in a preset specific queue can be out-of-order) and dynamic balancing during packet sending. For the traffic on this interface, OVS is responsible for dynamic balancing of this traffic.

[0102] C. Determine whether the target message is sent via a preset specific device.

[0103] Whether the preset condition is met can be determined by judging whether the target message is sent via a preset specific device. The preset specific device can be referred to as the first device. This approach can also be referred to as a device-level out-of-order enabling solution. As an example, a user can use multiple devices to enable multipath selection. At least one of them is a device that supports out-of-order (i.e., a preset specific device). Messages sent via the preset specific device can be unaffected by the tuple hash calculation result.

[0104] It should be noted that in the embodiment of the present application, each VM corresponds to two devices, one of which is the first device vNIC0 (with the ability to send packets out of order) and the other is the traditional device vNIC1 (without the ability to send packets out of order). The message generated on the VM can be sent via the first device vNIC0 or the traditional device vNIC1. If the message is sent via the first device vNIC0, the corresponding message is not restricted by the tuple hash calculation and can be sent to any port that meets the requirements; if the message is sent via the traditional device vNIC1, the corresponding message is restricted by the tuple hash calculation and must be sent to the corresponding port determined by the hash calculation.

[0105] For example, assuming that message d is sent via the traditional device vNIC1, then based on the tuple hash calculation, the port corresponding to message d is assumed to be port 4, then message d must be sent to port 4; if message d is sent via the first device vNIC0, then message d is not subject to the restriction of tuple hash calculation (that is, the restriction that message d must be sent to port 4), and can be sent to any port that meets the requirements. For example, assuming that port 4 is congested and port 5 is not congested, then message d can be sent to port 5 where the network is not congested.

[0106] It should be noted that in some embodiments of the present application, the first device vNIC0 is deployed as an independent device between VS and OVS, and is used to receive the target message sent by the VM and send the target message to OVS. Figure 5 , Figure 5 A structural diagram of a device-level out-of-order enabling solution provided in an embodiment of the present application, wherein the first device vNIC0 is deployed as an independent device between VS and OVS to receive target messages sent by VM.

[0107] It should also be noted that in some embodiments of the present application, the first device vNIC0 may also be located inside the OVS to receive the target message sent by the VM. Figure 6 , Figure 6This is another structural diagram of the device-level out-of-order enabling solution provided in an embodiment of the present application, wherein the first device vNIC0 is coupled with OVS to receive target messages sent by the VM.

[0108] It should also be noted that in some embodiments of the present application, the multi-path selection method can be presented to the user through a driver, so that the user can use the advantages of multi-path in the cloud to carry out business in ordinary Ethernet messages, that is, the user decides whether the message is sent by a traditional device or by a preset specific device; the multi-path selection method can also be presented in the form of a conditional trigger. When the preset conditions are met, the trigger message automatically selects which device to send. This application does not specifically limit this.

[0109] In summary, the device-level out-of-order enabling solution allows partial out-of-order (i.e., packets passing through a preset specific device can be out of order) and dynamic balancing during packet transmission. For the traffic on this interface, OVS is responsible for dynamic balancing of this traffic.

[0110] 203. Send the target message to a port that meets the requirements.

[0111] Finally, the network device sends the target message to a port that meets the requirements, wherein the port that meets the requirements is one of the at least two ports in the system.

[0112] It should be noted that, in some implementations of the present application, the port that meets the requirements may be: a port where the network is not congested.

[0113] It should also be noted that in some embodiments of the present application, since each of the at least two ports mentioned above corresponds to a storage area (e.g., memory), it is possible to determine whether the corresponding port meets the requirements based on the remaining storage space in each storage area, for example, to determine whether the corresponding port is about to generate network congestion.

[0114] 204. After waiting for at least one port to meet the requirements, send the target message to the port that meets the requirements.

[0115] If each port in the system does not meet the requirements, for example, there is network congestion, then wait until at least one port meets the requirements (for example, the network congestion is relieved), and then send the target message to the port that meets the requirements (for example, the port after the network congestion is relieved).

[0116] Based on the above system architecture, another method for message processing provided by the embodiment of the present application is introduced below. This method is applied in the cloud scenario. This method can also be called the message descriptor advance notification hash summary scheme. For details, please refer to Figure 7 , Figure 7Another flow chart of the message processing method provided in an embodiment of the present application specifically includes the following steps:

[0117] 701. Obtain a hash digest of the target message sent by the VM.

[0118] First, the VM generates a hash digest of the target message to be sent, and then the network device receives the hash digest of the target message sent by the VM, that is, the OVS receives its hash digest before receiving the target message.

[0119] 702. Determine the target port to which the target message is to be sent according to the hash digest.

[0120] Afterwards, the port to which the target message is to be sent is determined according to the hash digest. The port may be referred to as a target port, which is one of the at least two ports in the above system.

[0121] 703. Process the target message according to the congestion condition of the target port.

[0122] Finally, the target message is processed based on the congestion of the target port. For example, if the network of the target port is not congested, the target message is directly sent to the target port after receiving it; if the network of the target port is congested, other subsequent messages are processed first, and the target message is delayed.

[0123] As an example, the code field of the message descriptor that tells in advance about the hash digest scheme may look like this:

[0124] struct virtq_desc{

[0125] / *Address(guest-physical).* /

[0126] le64 addr;

[0127] / *Length.* /

[0128] le32 len;

[0129] / *The flags* /

[0130] le16 hash_digest;

[0131] / *Next field if flags&NEXT* /

[0132] le16 next;

[0133] };

[0134] In summary, in the scheme where the packet descriptor informs the hash digest in advance, the user can inform the vNIC of the hash digest of the network packet in advance through the descriptor. The vNIC can then filter and differentiate packets based on this digest and perform QoS scheduling based on the congestion status of the bond port.

[0135] From the above Figure 2 and Figure 7 As can be seen from the corresponding embodiments, the core of this application is to embed the order preservation / hash digest or priority field in the network message descriptor to assist Bond in making routing decisions. Its advantages include:

[0136] 1) The availability of order preservation (or multipath selection) is presented to users through the driver, allowing them to leverage the advantages of multipathing in the cloud to conduct business in ordinary Ethernet packets.

[0137] 2) Users can control multipathing without relying on specific packet types (e.g., TCP / UDP) or priorities such as DSCP / TOS.

[0138] 3) By differentiating between users’ order-preserving and non-order-preserving requirements, network bandwidth can be more fully utilized.

[0139] 4) Different pricing rates can be applied to multipath and non-multipath messages to achieve higher network utilization.

[0140] 5) The destination of user messages can be calculated in advance through hash digest, thereby more effectively utilizing Bond bandwidth.

[0141] On the basis of the above embodiments, in order to better implement the above solutions of the embodiments of the present application, the following also provides related devices for implementing the above solutions. Figure 8 , Figure 8 A schematic diagram of a network device provided in an embodiment of the present application, the network device 800 may specifically include: an acquisition module 801, a judgment module 802 and a sending module 803, wherein the acquisition module 801 is used to obtain a target message sent by the VM; the judgment module 802 is used to judge whether the target message meets a preset condition, and the preset condition is used to characterize that the sending of the target message is not restricted by the tuple hash calculation result; the sending module 803 is used to send the target message to a qualified port when it is determined that the target message meets the preset condition, and the qualified port is one of the at least two ports.

[0142] In one possible design, the judgment module 802 is specifically used to determine whether the target message contains preset out-of-order attribute characters.

[0143] In one possible design, the judgment module 802 is further specifically used to determine whether the target message is sent via the first queue in the VM.

[0144] In one possible design, the judgment module 802 is further configured to: judge whether the target message is received via the second queue in the OVS.

[0145] In one possible design, the judgment module 802 is further specifically used to determine whether the target message is sent via the first device.

[0146] In one possible design, the first device is deployed between the VM and the OVS, and is configured to receive the target message and send the target message to the OVS.

[0147] In one possible design, the first device is located in the OVS and is used to receive the target message.

[0148] In one possible design, the ports that meet the requirements include: ports where the network is not congested.

[0149] In one possible design, each of the at least two ports corresponds to a storage area, and each storage area is used to store messages to be sent to the corresponding port.

[0150] In one possible design, the judgment module 802 is further used to: judge whether the corresponding port meets the requirements based on the remaining storage space of each storage area.

[0151] It should be noted that the information interaction, execution process, etc. between the modules / units in the network device 800 are the same as those in the above-mentioned Figure 2 The corresponding method embodiments are based on the same concept. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.

[0152] The present application also provides a network device, see Figure 9 , Figure 9 A schematic diagram of another network device provided in an embodiment of the present application, wherein the network device 900 may specifically include: an acquisition module 901, a determination module 902, and a processing module 903, wherein the acquisition module 901 is used to obtain a hash digest of a target message sent by the VM; the determination module 902 is used to determine a target port to which the target message is to be sent based on the hash digest, and the target port is one of the at least two ports; and the processing module 903 is used to process the target message according to the congestion condition of the target port.

[0153] In one possible design, the processing module 903 is specifically used to delay sending the target message when there is network congestion at the target port.

[0154] It should be noted that the information interaction, execution process, etc. between the modules / units in the network device 900 are the same as those in the above-mentioned Figure 7 The corresponding method embodiments are based on the same concept. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.

[0155] Next, another network device provided by the embodiment of the present application is introduced. Figure 10 , Figure 10 A schematic diagram of a network device provided in an embodiment of the present application, wherein the network device 1000 may be deployed with Figure 8 The network device 800 described in the corresponding embodiment is used to implement Figure 8 The functions of the network device 800 in the corresponding embodiment, or the network device 1000 may be deployed with Figure 9 The network device 900 described in the corresponding embodiment is used to implement Figure 9 The functions of the network device 900 in the corresponding embodiment. Specifically, the network device 1000 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 1022 and memories 1032, and one or more storage media 1030 (for example, one or more mass storage devices) storing application programs 1042 or data 1044. Among them, the memories 1032 and the storage media 1030 can be temporary storage or permanent storage. The program stored in the storage medium 1030 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the network device 1000. Furthermore, the central processing unit 1022 can be configured to communicate with the storage medium 1030 to execute a series of instruction operations in the storage medium 1030 on the network device 1000.

[0156] The network device 1000 may also include one or more power supplies 1026, one or more wired or wireless network interfaces 1050, one or more input and output interfaces 1058, and / or one or more operating systems 1041, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0157] In the embodiment of the present application, the central processing unit 1022 is used to execute Figure 2 or Figure 7The steps performed by the network device in the corresponding embodiment. For example, the central processor 1022 can be used to: obtain the target message sent by the VM, and determine whether the target message meets the preset conditions. If so, send the target message to the port that meets the requirements.

[0158] It should be noted that the specific manner in which the CPU 1022 performs the above steps is the same as that in the present application. Figure 2 or Figure 7 The corresponding method embodiments are based on the same concept, and the technical effects they bring are also the same as the above-mentioned embodiments of this application. For specific contents, please refer to the description in the method embodiments shown above in this application, and will not be repeated here.

[0159] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.

[0160] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general-purpose hardware, and of course can also be implemented by means of dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. In general, all functions performed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits, or dedicated circuits. However, for the present application, software program implementation is a better implementation method in most cases. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.

[0161] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0162] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a training device or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, a computer, a training device or a data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

Claims

1. A method for processing a message, characterized in that: The method is applied to a message processing system, the message processing system including a virtual machine, an open source virtual switch (OVS), and at least two ports. The method is specifically applied to the OVS, including: Obtaining a target message sent by the virtual machine; Determining whether the target message satisfies a preset condition, where the preset condition is used to indicate that the sending of the target message is not restricted by a tuple hash calculation result; If so, the target message is sent to a port that meets the requirements, and the port that meets the requirements is one of the at least two ports.

2. The method according to claim 1, characterized in that Determining whether the target message meets a preset condition includes: Determine whether the target message contains preset out-of-order attribute characters.

3. The method according to claim 1, characterized in that Determining whether the target message meets a preset condition includes: Determine whether the target message is sent via the first queue in the virtual machine.

4. The method according to claim 1, wherein Determining whether the target message meets a preset condition includes: Determine whether the target message is received via the second queue in the OVS.

5. The method according to claim 1, wherein Determining whether the target message meets a preset condition includes: Determine whether the target message is sent via the first device.

6. The method according to claim 5, characterized in that The first device is deployed between the virtual machine and the OVS, and is configured to receive the target message and send the target message to the OVS.

7. The method according to claim 5, characterized in that The first device is located in the OVS and is configured to receive the target message.

8. The method according to any one of claims 1 to 7, characterized in that The ports that meet the requirements include: A port where the network is not congested.

9. The method according to any one of claims 1 to 8, characterized in that Each of the at least two ports corresponds to a storage area, and each storage area is used to store messages to be sent to the corresponding port.

10. The method according to claim 9, characterized in that The method further comprises: Whether the corresponding port meets the requirement is determined based on the remaining storage space of each storage area.

11. A method for processing a message, characterized in that: The method is applied to a message processing system, the message processing system including a virtual machine, an OVS, and at least two ports. The method is specifically applied to the OVS, including: Get the hash summary of the target message sent by the virtual machine; Determine, according to the hash digest, a target port to which the target message is to be sent, where the target port is one of the at least two ports; The target message is processed according to the congestion condition of the target port.

12. The method according to claim 11, characterized in that The processing of the target message according to the congestion condition of the target port includes: When network congestion occurs at the target port, sending of the target message is delayed.

13. A network device, characterized in that: The network device is included in a message processing system, which includes a virtual machine, an OVS, and at least two ports. The network device is specifically included in the OVS, including: An acquisition module, configured to acquire a target message sent by the virtual machine; a judgment module, configured to judge whether the target message satisfies a preset condition, wherein the preset condition is used to indicate that the sending of the target message is not restricted by a tuple hash calculation result; The sending module is configured to send the target message to a port that meets the requirements when it is determined that the target message meets a preset condition, and the port that meets the requirements is one of the at least two ports.

14. The device according to claim 13, characterized in that The judgment module is specifically used to: Determine whether the target message contains preset out-of-order attribute characters.

15. The device according to claim 13, characterized in that The judgment module is further configured to: Determine whether the target message is sent via the first queue in the virtual machine.

16. The device according to claim 13, characterized in that The judgment module is further configured to: Determine whether the target message is received via the second queue in the OVS.

17. The device according to claim 13, characterized in that The judgment module is further configured to: Determine whether the target message is sent via the first device.

18. The device according to claim 17, characterized in that The first device is deployed between the virtual machine and the OVS, and is configured to receive the target message and send the target message to the OVS.

19. The device according to claim 17, characterized in that The first device is located in the OVS and is configured to receive the target message.

20. The device according to any one of claims 13 to 19, characterized in that The ports that meet the requirements include: A port where the network is not congested.

21. The device according to any one of claims 13 to 20, characterized in that Each of the at least two ports corresponds to a storage area, and each storage area is used to store messages to be sent to the corresponding port.

22. The device according to claim 21, characterized in that The judgment module is further configured to: Whether the corresponding port meets the requirement is determined based on the remaining storage space of each storage area.

23. A network device, characterized in that: The network device is included in a message processing system, which includes a virtual machine, an OVS, and at least two ports. The network device is specifically included in the OVS, including: An acquisition module, used to obtain the hash summary of the target message sent by the virtual machine; a determining module, configured to determine a target port to which the target message is to be sent according to the hash digest, wherein the target port is one of the at least two ports; A processing module is used to process the target message according to the congestion condition of the target port.

24. The device according to claim 23, characterized in that The processing module is specifically used to: When network congestion occurs at the target port, sending of the target message is delayed.

25. A network device, characterized in that: The method comprises a memory and a processor, wherein the memory is used to store computer-readable instructions, and the processor is used to read the computer-readable instructions and implement the method according to any one of claims 1 to 12.

26. A computer storage medium, characterized in that Computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the method according to any one of claims 1 to 12 is implemented.

27. A computer program product, characterized in that The computer program product includes computer-readable instructions, and when the computer-readable instructions are executed by a processor, the method according to any one of claims 1 to 12 is implemented.

28. A chip comprising a processor and a data interface, characterized in that: The processor reads instructions stored in the memory through the data interface and executes the method according to any one of claims 1 to 12.