Message forwarding method and device, network equipment, medium and product

By receiving service messages in the network equipment of the intelligent computing center and identifying their characteristics, packet-by-packet load sharing technology is adopted for messages that meet preset conditions, which solves the problems of load unevenness and bandwidth imbalance in the prior art, and improves link utilization and network performance.

CN120186076APending Publication Date: 2025-06-20PURPLE MOUNTAIN LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510344312.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

The prior art can easily lead to uneven load on the forwarding path in the data flow of the intelligent computing center, resulting in low effective network bandwidth and large delay jitter. The packet-by-package load sharing technology only supports specific service messages, and other messages still need to go through the flow sharing.

Method used

By receiving service messages and determining their message characteristics, including network transmission features, memory operation features and routing adaptability features, when the message features meet the preset message configuration features, the service messages are forwarded by packet-by-packet load sharing method.

Benefits of technology

It reduces the problem of link bandwidth imbalance caused by unbalanced traffic of service packets, effectively improving link utilization and network performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120186076A_ABST
    Figure CN120186076A_ABST
Patent Text Reader

Abstract

The invention discloses a message forwarding method and device, network equipment, a medium and a product. The method comprises the following steps: receiving a service message, and determining message characteristics of the service message; the message features comprise a network transmission feature, a memory operation feature and a routing adaptability feature; and when the message feature satisfies a preset message configuration feature, forwarding the service message in a packet-by-packet load sharing mode. According to the message forwarding method provided by the embodiment of the invention, the specific message meeting the preset message configuration characteristics is accurately identified, and the specific message is forwarded in a packet-by-packet load sharing mode, so that the problem of unbalanced link bandwidth caused by unbalanced traffic of the service message can be reduced, and the user experience is improved. Therefore, the link utilization rate and the network performance are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and in particular, to a method, device, network device, medium, and product for packet forwarding. Background Art

[0002] The data flow in the intelligent computing center is complex and changeable. The existing per-flow load balancing technology is likely to cause uneven load on the forwarding path, resulting in low effective network bandwidth and large delay jitter. Once the network performance is poor, it will affect the quality and speed of AI training.

[0003] Although the per-packet load balancing technology can solve the problem of uneven link load, it requires the end-side network card, such as an RDMA (Remote Direct Memory Access) intelligent network card, to support the out-of-order recombination function. At the same time, the RDMA intelligent network card only supports out-of-order recombination for READ packets and WRITE packets with the adaptive routing (AR) flag bit set, that is, it only supports out-of-order recombination for specific service packets, and does not support packets with other characteristics. Therefore, other packets still need to go through per-flow load sharing. Therefore, how to reasonably select the load balancing method for packet forwarding has become an urgent technical problem to be solved. Summary of the Invention

[0004] The present invention provides a method, device, network device, medium, and product for packet forwarding, so as to implement forwarding of specific service packets that meet the preset packet configuration characteristics by using the per-packet load balancing method, which can reduce the problem of uneven link bandwidth caused by uneven service packet traffic, thereby effectively improving the link utilization rate and network performance.

[0005] According to one aspect of the present invention, a method for packet forwarding is provided. The method includes:

[0006] Receiving a service packet and determining the packet characteristics of the service packet; wherein the packet characteristics include network transmission characteristics, memory operation characteristics, and routing adaptability characteristics;

[0007] When the packet characteristics meet the preset packet configuration characteristics, forwarding the service packet by using the per-packet load balancing method.

[0008] According to another aspect of the present invention, a packet forwarding device is provided. The device includes:

[0009] A packet characteristic determination module, configured to receive a service packet and determine the packet characteristics of the service packet; wherein the packet characteristics include network transmission characteristics, memory operation characteristics, and routing adaptability characteristics;

[0010] The first message forwarding module is used to forward service messages in a per-packet load sharing manner when the message characteristics meet the preset message configuration characteristics.

[0011] According to another aspect of the present invention, a network device is provided, and the network device includes:

[0012] At least one processor; and

[0013] A memory communicatively connected to the at least one processor; wherein,

[0014] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the message forwarding method according to any embodiment of the present invention.

[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, and the computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the message forwarding method according to any embodiment of the present invention when executed by a processor.

[0016] According to another aspect of the present invention, a computer program product is provided, and the computer program product includes a computer program, and the computer program implements the message forwarding method according to any embodiment of the present invention when executed by a processor.

[0017] A message forwarding method provided by an embodiment of the present invention includes receiving a service message and determining the message characteristics of the service message; the message characteristics include network transmission characteristics, memory operation characteristics, and routing adaptability characteristics; when the message characteristics meet the preset message configuration characteristics, the service message is forwarded in a per-packet load sharing manner. This message forwarding method can accurately identify specific messages that meet the preset message configuration characteristics and forward them in a per-packet load sharing manner, which can reduce the problem of unbalanced link bandwidth caused by unbalanced service message traffic, thereby effectively improving link utilization and network performance.

[0018] A message forwarding device, a network device, a computer-readable storage medium, and a computer program product provided by an embodiment of the present invention also have the above technical effects.

[0019] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. Description of the Drawings

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0021] Figure 1 is a flowchart of a message forwarding method provided in Embodiment 1 of the present invention;

[0022] Figure 2 is a flowchart of a message forwarding method provided in Embodiment 2 of the present invention;

[0023] Figure 3 is a schematic diagram of a message forwarding system provided in Embodiment 3 of the present invention;

[0024] Figure 4 is a flowchart of a message forwarding method provided in Embodiment 3 of the present invention;

[0025] Figure 5 is a schematic diagram of a networking logic provided in Embodiment 3 of the present invention;

[0026] Figure 6 is a schematic diagram of a link sharing effect provided in Embodiment 3 of the present invention;

[0027] Figure 7 is another schematic diagram of a link sharing effect provided in Embodiment 3 of the present invention;

[0028] Figure 8 is yet another schematic diagram of a link sharing effect provided in Embodiment 3 of the present invention;

[0029] Figure 9 is a schematic diagram of the structure of a message forwarding device provided in Embodiment 4 of the present invention;

[0030] Figure 10 is a schematic diagram of the structure of a network device for implementing the message forwarding method of the embodiments of the present invention. Detailed Embodiments

[0031] To enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, rather than all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.

[0032] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of the present invention are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0033] Embodiment 1

[0034] Figure 1 The accompanying drawing is a flowchart of a packet forwarding method provided for Embodiment 1 of the present invention. This embodiment is applicable to the case where specific service packets that meet preset packet configuration characteristics are forwarded in a per-packet load sharing manner. This method can be executed by a packet forwarding device, which can be implemented in the form of hardware and / or software. The packet forwarding device can be configured in a network device, which can include but is not limited to routers, switches, etc. As Figure 1 shown, a packet forwarding method provided in Embodiment 1 specifically includes the following steps:

[0035] S110. Receive a service packet and determine the packet characteristics of the service packet; wherein, the packet characteristics include network transmission characteristics, memory operation characteristics, and routing adaptability characteristics.

[0036] Among them, the service packet can be a three-layer forwarding packet, that is, a type of packet that performs routing selection and forwarding according to the destination Internet Protocol (IP) address of the packet at the network layer. In one embodiment, the service packet can include RoCEv2 (RDMA over Converged Ethernet version 2) packets.

[0037] The network transmission characteristics are mainly used to describe information such as the protocol type, source, and destination of the packet, and can include but are not limited to: source IP address, source port, destination IP address, destination port, transport layer protocol type (such as UDP, TCP, etc.), source Media Access Control (MAC) address, destination MAC address, etc.

[0038] The memory operation feature is mainly used to describe the operation behavior of packets in memory. For example, it can be an RDMA operation type, where the RDMA operation type can include Read operation, Write operation, etc., and the RDMA operation type can be represented by the RoCEv2 operation code, that is, the opcode field (a field in the RoCEv2 packet).

[0039] The routing adaptability feature is mainly used to describe the routing selection behavior of packets, for dynamically adjusting paths and load balancing. It can include, but is not limited to, the setting status of the adaptive routing flag bit (Adaptive Routing bit, ARbit) in the RoCEv2 packet. The AR bit can be used to indicate whether the packet supports dynamic routing adjustment. Exemplarily, when AR bit = 1, it means the packet supports adaptive routing, and the network device can dynamically adjust the routing path of the packet according to the real-time network status; when AR bit = 0, it means the packet does not support adaptive routing and needs to be forwarded according to the static routing policy.

[0040] In the embodiment of the present invention, the network device can receive the service packet to be forwarded, and obtain the corresponding packet features, namely network transmission feature, memory operation feature, and routing adaptability feature, by parsing the service packet. Among them, the service packet can be a three-layer forwarding packet.

[0041] It should be understood that the packet forwarding method provided by the embodiment of the present invention mainly aims at three-layer forwarding packets. For two-layer (data link layer) forwarding packets, the network device can make a forwarding decision according to the pre-learned MAC address table and the destination MAC address of the service packet to be forwarded. The specific process can refer to the two-layer packet forwarding method in the prior art and will not be described in detail here.

[0042] S120. When the packet features meet the preset packet configuration features, forward the service packet in a per-packet load sharing manner.

[0043] Among them, the preset message configuration feature can be understood as the message feature possessed by a specific type of service message that is pre-configured and forwarded in a packet-by-packet load sharing manner. For different message forwarding scenarios, different preset message configuration features can be pre-configured, which may specifically include, but are not limited to: preset transport layer protocol type, preset destination port, preset RDMA operation type, preset AR flag position setting status, preset destination IP address, preset IP protocol type, preset Multiprotocol Label Switching (MPLS) label information, etc. Exemplarily, when the RDMA smart network card on the end side only supports the out-of-order reordering function for RoCEv2 READ and WRITE messages of a specific RDMA operation type, the corresponding preset message configuration features may include: preset transport layer protocol type, preset destination port, preset RDMA operation type, and preset AR flag position setting status.

[0044] The packet-by-packet load sharing method (hereinafter referred to as packet-by-packet sharing for short) is a technology for load balancing in units of packets (packets). By independently distributing the packets in the network to multiple paths for transmission, compared with the flow-by-flow load sharing method (hereinafter referred to as flow-by-flow sharing for short), it can achieve the effective utilization of network resources and the balanced distribution of traffic. Usually, there is a problem of packet out-of-order in the packet-by-packet load sharing method, but the out-of-order problem can be solved by a network card on the end side that supports out-of-order reordering. In an actual network, flow-by-flow sharing and packet-by-packet sharing can be combined to meet the needs of different service traffic.

[0045] In the embodiment of the present invention, after obtaining the message features of the service message to be forwarded, the network device can match them with the pre-configured preset message configuration features. When all the message features match the preset message configuration features successfully, the service message can be forwarded by packet-by-packet sharing. For example, the polling algorithm, random algorithm, weighted polling algorithm, minimum load algorithm, etc. can be called to determine the best target forwarding link, and the service message is shared to the target forwarding link for forwarding. It can be understood that for service messages that do not meet the preset message configuration features, flow-by-flow sharing forwarding can continue to be used.

[0046] A packet forwarding method provided by an embodiment of the present invention receives a service packet and determines the packet characteristics of the service packet; the packet characteristics include network transmission characteristics, memory operation characteristics, and routing adaptability characteristics; when the packet characteristics meet the preset packet configuration characteristics, the service packet is forwarded in a per-packet load sharing manner. This packet forwarding method can accurately identify specific packets that meet the preset packet configuration characteristics and forward them in a per-packet load sharing manner, which can reduce the problem of unbalanced link bandwidth caused by unbalanced service packet traffic, thereby effectively improving the link utilization rate and network performance.

[0047] Embodiment 2

[0048] Figure 2 It is a flowchart of a packet forwarding method provided by Embodiment 2 of the present invention, which is further optimized and extended based on the above embodiment and can be combined with each optional technical solution in the above embodiment. As Figure 2 shown, a packet forwarding method provided by Embodiment 2 of the present invention specifically includes the following steps:

[0049] S210. Receive a service packet and determine the packet characteristics of the service packet; wherein, the packet characteristics include network transmission characteristics, memory operation characteristics, and routing adaptability characteristics.

[0050] S220. Perform a routing query according to the destination Internet protocol address in the network transmission characteristics to determine the first target weighted cost multiple path routing group corresponding to the service packet.

[0051] Among them, weighted cost multiple path routing (WCMP) is an algorithm that can flexibly determine network routing according to path weights. It can assign different weights to different paths according to link state information such as actual link bandwidth, delay, and congestion status to optimize the equal weight distribution of traditional equal-cost multi-path routing (ECMP), which can optimize traffic scheduling and improve the bandwidth utilization rate of the link. The WCMP group can contain multiple member links and corresponding link information, such as the next-hop address and weight of the link.

[0052] In an embodiment of the present invention, after receiving a service packet (three-layer forwarding packet), the network device can use the destination IP address of the packet to perform a routing query, find the corresponding routing entry, and then determine the first target WCMP group corresponding to the service packet based on the WCMP group information associated with the routing entry.

[0053] Further, based on the above embodiment of the invention, S220 specifically includes the following steps:

[0054] S2201. Query the preset routing table according to the destination Internet protocol address to obtain the target routing entry;

[0055] S2202. Extract the target hardware weighted cost multipath routing group index from the target routing entry;

[0056] S2203. Query the corresponding first target weighted cost multipath routing group in the preset weighted cost multipath routing group table according to the target hardware weighted cost multipath routing group index.

[0057] Among them, the preset routing table may refer to the data structure used to store routing information in a network device. The routing entries stored in the table record the mapping relationships between different destination IP addresses or IP address segments and routing information such as the next-hop address, outgoing interface, and hardware WCMP group index, which can help the device determine the forwarding path of the packet.

[0058] The hardware WCMP group index may refer to the unique identifier used to identify and manage the WCMP group in the switching chip. Its main functions include associating the path weights defined by software with the hardware forwarding logic through the index value to achieve fast search for the forwarding link and traffic scheduling. Among them, the switching chip is the core integrated circuit or application-specific integrated circuit (ASIC) used for packet forwarding, routing selection, and traffic control in a network device.

[0059] The preset WCMP group table may refer to the pre-configured data structure used to store the mapping relationship between the hardware WCMP group index and the corresponding WCMP group information.

[0060] In the embodiment of the present invention, the process of determining the first target WCMP group corresponding to the service packet is as follows: first, query the preset routing table according to the destination IP address of the service packet. For example, the longest prefix match (LPM) algorithm can be called to find the longest target routing entry that matches the destination IP address in the preset routing table; then, based on the target hardware WCMP group index extracted from the target routing entry, find the corresponding first target WCMP group in the pre-configured preset WCMP group table. For example, the preset WCMP group table can be a hash table, and the target hardware WCMP group index can be used as the key, and the corresponding value, that is, the first target WCMP group, can be found in the preset WCMP group table. The first target WCMP group contains multiple member links and the corresponding link information, such as the next-hop address and weight of the link.

[0061] S230, matching the items to be matched corresponding to the message features with the preset transport layer protocol type, preset destination port, preset remote direct memory access operation type and preset adaptive routing flag position state in the preset message configuration features respectively; wherein the items to be matched include: the transport layer protocol type and destination port in the network transmission feature, the remote direct memory access operation type in the memory operation feature and the adaptive routing flag position state in the routing adaptability feature.

[0062] Among them, the RDMA operation type can be represented by the RoCEv2 operation code, i.e., opcode, to identify the type of RDMA operation. The preset transport layer protocol type may include the User Datagram Protocol (UDP), which may be represented by protocol number 17. The preset destination port may include the default port number 4791 used by the RoCEv2 protocol, which is used to identify RoCEv2 traffic. The preset RDMA operation type may include a Read operation and a Write operation, and the corresponding opcodes may include, but are not limited to: 10 (RDMA_WRITE), 13 (RDMA_READ_FIRST), 14 (RDMA_READ_MIDDLE), 15 (RDMA_READ_LAST), etc. The preset AR bit setting state may include AR bit=1, i.e., the message supports adaptive routing, and the network device can dynamically adjust the path.

[0063] In an embodiment of the present invention, after receiving a service message to be forwarded, the network device can obtain corresponding network transmission characteristics, memory operation characteristics and routing adaptability characteristics from the service message, and record the transport layer protocol type, destination port, RDMA operation type and AR bit setting state therein as items to be matched, and then match the items to be matched with the preset transport layer protocol type, preset destination port, preset RDMA operation type and preset AR bit setting state in the preset message configuration characteristics, so as to obtain corresponding matching results.

[0064] S240. When all items to be matched are successfully matched, determine the first target member link corresponding to the service message according to the weight of each member link in the first target weighted cost multi-path routing group, and share the service message to the first target member link for forwarding; wherein the weight of the member link is determined in advance based on the weighted cost multi-path routing algorithm.

[0065] Among them, the weight of each member link in the WCMP group (member weight) can be used to characterize the traffic allocation ratio of each member link. The larger the weight, the greater the probability that the corresponding link is shared with traffic. The member weight can be determined based on the WCMP algorithm. Specifically, the WCMP algorithm can be called to calculate the cost value corresponding to each link according to the preset cost calculation rules, such as cost calculation functions, for the collected network link state information, such as link weight, delay, congestion state, etc. Then, the cost values corresponding to each link are normalized to the corresponding link weights. Further, the link weights can be converted into the corresponding member weights.

[0066] In the embodiment of the present invention, the process of forwarding a specific packet using the per-packet WCMP sharing algorithm can be as follows: When all the items to be matched of the service packet are successfully matched with the preset packet configuration characteristics, the currently to-be-forwarded service packet can be determined as a specific packet, and the pre-configured per-packet WCMP sharing algorithm can be called to forward the packet. Specifically, based on the weights of each member link in the first target WCMP group, the first target member link corresponding to the currently to-be-forwarded service packet can be determined. For example, the member link with the largest member weight in the current first target WCMP group can be used as the first target member link. Finally, the service packet can be distributed to the first target member link for forwarding. In the embodiment of the present invention, by using per-packet WCMP sharing forwarding for specific service packets that meet the preset packet configuration characteristics, the packet forwarding efficiency can be improved, the link bandwidth allocation can be made more reasonable and balanced, and thus the overall performance of the network can be enhanced.

[0067] Further, based on the above embodiment of the invention, the packet forwarding method provided in this embodiment further includes:

[0068] When the packet characteristics do not meet the preset packet configuration characteristics, the per-flow load sharing method is used to forward the service packet.

[0069] In the embodiment of the present invention, when the network device detects that the packet characteristics of the current service packet do not meet the preset packet configuration characteristics, that is, the service packet does not belong to a specific packet, the per-flow sharing method can be used to forward the packet. By using the per-flow sharing method, the packets belonging to the same data stream can be uniformly shared to the same path for forwarding, which can avoid the problem of packet disorder, and at the same time can reduce the complexity of packet forwarding and the hardware overhead.

[0070] Further, based on the above embodiment of the invention, when the packet characteristics do not meet the preset packet configuration characteristics, using the per-flow load sharing method to forward the service packet includes:

[0071] Determine the second target weighted cost multi-path routing group corresponding to the service packet;

[0072] When at least one of the items to be matched corresponding to the message feature does not match the preset message configuration feature, extract the source Internet protocol address, source port, destination Internet protocol address, destination port, and transport layer protocol type in the network transmission feature as the message quintuple; where the items to be matched include: the transport layer protocol type and destination port in the network transmission feature, the remote direct memory access operation type in the memory operation feature, and the status of the adaptive routing flag bit in the routing adaptability feature.

[0073] Call a preset hash function to determine the target hash value corresponding to the message quintuple.

[0074] Determine the second target member link corresponding to the service message according to the target hash value and the weights of the member links in the second target weighted cost multipath routing group, and distribute the service message to the second target member link for forwarding; where the weights of the member links are determined in advance based on the weighted cost multipath routing algorithm.

[0075] Among them, the preset hash function may include but is not limited to: CRC32, MD5, SHA-1, etc.

[0076] In the embodiment of the present invention, the process of forwarding non-specific messages using the per-flow WCMP sharing algorithm may be as follows: first, determine the second target WCMP group corresponding to the current service message, where the determination method of the second target WCMP group may refer to the determination process of the first target WCMP group in the above embodiment, which will not be elaborated here; then, the message quintuple of the service message, that is, the source IP address, source port, destination IP address, destination port, and transport layer protocol type, can be extracted, and then a preset hash function such as CRC32 is called to map the message quintuple to a target hash value with a fixed length; then, according to the weights of the member links in the second target WCMP group and the calculated target hash value, the second target member link to which the service message should be forwarded can be confirmed. For example, the target hash value can be mapped to an interval related to the link weight, and the corresponding second target member link can be selected according to the interval where the target hash value falls; finally, the service message can be distributed to the determined second target member link for forwarding.

[0077] Further, on the basis of the above-mentioned embodiment of the invention, after receiving the service message, it further includes:

[0078] Match the destination media access control address in the network transmission feature with the preset media access control address.

[0079] When the destination media access control address matches the preset media access control address, determine that the service message is a three-layer forwarding message.

[0080] Among them, the preset MAC address may be the MAC address corresponding to the network device for receiving and processing service packets. For example, it may be the MAC address of the receiving network card.

[0081] In the embodiment of the present invention, after receiving a service packet, the network device can extract the destination MAC address corresponding to the service packet and match the destination MAC address with its own preset MAC address. If the match is successful, it is determined that the current service packet is a three-layer forwarding packet, and subsequently, the packet forwarding method proposed in the embodiment of the present invention will be used to forward the packet.

[0082] Further, on the basis of the above-mentioned embodiment of the invention, before determining the packet characteristics of the service packet, it further includes:

[0083] Read the packet forwarding policy configuration information in the preset configuration file;

[0084] Configure the corresponding user-defined function and access control list according to the packet forwarding policy configuration information, so that service packets meeting the preset packet configuration characteristics are forwarded in a per-packet load sharing manner, and service packets not meeting the preset packet configuration characteristics are forwarded in a per-flow load sharing manner.

[0085] Among them, the preset configuration file contains configuration information related to the packet forwarding policy, and the preset configuration file can store the configuration information in formats such as YAML and JSON.

[0086] The packet forwarding policy configuration information can be understood as the configuration information set for the correct and efficient forwarding of service packets in the network. By using the packet forwarding policy configuration information, the user-defined function (User Defined Function, UDF) and the access control list (Access Control List, ACL) can be configured, so that the network device can forward service packets using the corresponding packet forwarding policy.

[0087] The user-defined function UDF can be a function customized by the user according to specific service requirements. For example, by configuring the UDF, it can dynamically determine the packet processing method according to the matching result of the ACL, that is, it can select per-packet WCMP sharing or per-flow WCMP sharing according to the packet characteristics of the service packet.

[0088] In the access control list ACL, multiple ACL rules can be configured according to service requirements. Each ACL rule contains a matching condition and a corresponding operation. An example of an ACL rule is as follows: config acl - rule add -- priority 100 -- ip - protocol 17 -- l4 - dst - port 4791 -- rocev2 - opcode 10 -- rocev2 - ar 1 -- per - packet - wcmp - enable true acl_l3 acl_rule_7. This ACL rule can be interpreted as: matching the transport layer protocol type (ip - protocol 17), destination port (l4 - dst - port 4791), RDMA operation type (rocev2 - opcode 10), and AR bit set status (rocev2 - ar 1) of the packet, and enabling per - packet WCMP sharing for the packets that match the rule.

[0089] In the embodiment of the present invention, before the network device forwards the service packet, the network device needs to configure the UDF and ACL required for executing the packet forwarding policy. Specifically, the network device can read the pre - configured preset configuration file, extract the packet forwarding policy configuration information from it, and then configure the UDF and ACL according to the packet forwarding policy configuration information. For example, it can configure the corresponding ACL rules according to the preset packet configuration characteristics in the packet forwarding policy configuration information, configure the corresponding UDF according to the per - packet WCMP sharing rule, per - flow WCMP sharing rule, and different ACL rule matching results in the packet forwarding policy configuration information, so as to finally achieve that the specific service packets that meet the preset packet configuration characteristics use per - packet WCMP sharing, and the service packets that do not meet the preset packet configuration characteristics use per - flow WCMP sharing. By pre - configuring the UDF and ACL in the embodiment of the present invention, it can be realized to dynamically adjust the load - balancing policy according to the network link state and packet characteristics, and achieve the optimal network performance.

[0090] Further, on the basis of the above - mentioned embodiment of the invention, before determining the packet characteristics of the service packet, it further includes:

[0091] Associating the target service packets belonging to the same routing prefix with the target weighted - cost multipath routing group to configure a preset routing table associated with the target weighted - cost multipath routing group.

[0092] Among them, the Route Prefix is a key parameter used by the network layer to identify the target network range. It consists of two parts: the network address and the prefix length, and is in the format of network address / prefix length. For example, 192.168.1.0 / 24. If the network parts and prefix lengths of multiple IP addresses are exactly the same, they have the same route prefix. For example, 192.168.1.1 / 24 and 192.168.1.2 / 24 have the same route prefix 192.168.1.0 / 24.

[0093] In the embodiment of the present invention, when configuring the preset routing table, different route prefixes can be associated and stored with the corresponding hardware WCMP index groups, so that the target service packets belonging to the same route prefix will share the same routing entry, that is, share the same WCMP group for packet forwarding. That is, both the per-flow service and the per-packet service with the same route prefix are forwarded through the same WCMP group. Compared with the prior art where the per-flow service and the per-packet service respectively use different WCMP groups for packet forwarding, this solution can save a large amount of chip WCMP resources.

[0094] A packet forwarding method provided by an embodiment of the present invention determines a first target WCMP group corresponding to a service packet by performing a routing query using the target IP address of the service packet; then matches the transport layer protocol type, destination port, RDMA operation type, and AR bit setting status of the service packet with a preset packet configuration feature to accurately identify whether the currently to-be-forwarded packet is a specific service packet; in the case of determining that it is a specific service packet, determines a first target member link corresponding to the service packet according to the weights of the member links in the first target WCMP group, and distributes the service packet to the first target member link for forwarding. In this way, by accurately identifying specific packets that meet the preset packet configuration feature and forwarding them in a per-packet load sharing manner, it is possible to reduce the problem of uneven link bandwidth caused by uneven service packet traffic, make the link bandwidth utilization more reasonable and uniform, and thus effectively improve the link utilization rate and network performance.

[0095] Embodiment III

[0096] Figure 3 It is a schematic diagram of a packet forwarding system provided by Embodiment III of the present invention. As Figure 3 shown, the packet forwarding system includes: an ISIS (Intermediate System to Intermediate System) protocol module, a ZEBRA module, and a SONIC forwarding routing module. The functions and interaction processes of each module are as follows:

[0097] (1) The functions of the ISIS protocol module include:

[0098] ① Link state information collection: Subscribe to the kernel through the ZEBRA module to obtain information such as link bandwidth and routing SwitchID, and dynamically update the network topology; among them, the routing SwitchID can be introduced through redistribution and route map.

[0099] ② Global LSP generation and flooding: Package the link state and routing information of this device into a global LSP (Link State Protocol) data packet and flood it within the domain, so that other devices in the network can obtain the relevant network information of this device, thereby ensuring the synchronization of the entire network topology.

[0100] ③ ECMP path bandwidth calculation: Based on parameters such as link bandwidth, call the ECMP algorithm to calculate the path bandwidth pathBW of the ECMP route, and notify the calculated path bandwidth pathBW to the ZEBRA module.

[0101] (2) The functions of the ZEBRA module include:

[0102] ① Kernel message subscription: Subscribe to kernel interface messages and notify the link bandwidth in the network to the ISIS protocol module.

[0103] ② Routing processing: Receive relevant routing information (such as the calculation result of the ECMP route path bandwidth, etc.) from the ISIS protocol module, and perform comprehensive routing processing work, such as analyzing, filtering, and determining priorities for the routing information, etc., to determine the optimal routing strategy

[0104] ③ Routing synchronization: Synchronize the processed routing information to the APPL_DB (a database in the SONIC system) through the fpmsyncd process for use by the SONIC forwarding routing module.

[0105] (3) The functions of the SONIC forwarding routing module include:

[0106] ① WCMP group creation: According to the routing information in the APPL_DB, call the RouteOrch component in the SWSS (SONIC Switch State Service) container (a component in the SONIC system) to complete the creation of the WCMP group.

[0107] ② ECMP group configuration: According to the per-flow WCMP sharing method, call SAI (Switch Abstraction Interface) to create a WCMP group, and write relevant information such as the next-hop address and weight corresponding to each member link into the ASIC_DB (Application Specific Integrated Circuit Database, a database in the SONIC system); when adding ECMP members, convert the previously calculated path bandwidth pathBW into a member weight Weight, and write it into the ASIC_DB by calling the SAI interface to provide specific path weight information for subsequent packet forwarding.

[0108] ③ Routing configuration distribution: Subscribe to the information about the ECMP group and ECMP members in the ASIC_DB, and then distribute these routing configuration information to the switching chip, so that the switching chip can perform actual forwarding operations on the packets according to the preset routing policy and weight information.

[0109] Based on the above packet forwarding system, Figure 4 It is a flowchart of a packet forwarding method provided in Embodiment 3 of the present invention. On the basis of the above embodiment, an implementation manner of a packet forwarding method is provided, which can achieve precise identification of specific service packets and per-packet WCMP sharing forwarding. Other packets still go through per-flow WCMP sharing forwarding. By combining per-flow sharing and per-packet sharing, the requirements of different service flows can be met, and the link utilization rate and network performance can be effectively improved.

[0110] As Figure 4 shown, a packet forwarding method provided in Embodiment 3 of the present invention specifically includes the following steps:

[0111] S310. Analyze the received service packet to obtain packet characteristics.

[0112] In the embodiment of the present invention, the packet characteristics may include network transmission characteristics, memory operation characteristics, and routing adaptability characteristics. Among them, the network transmission characteristics may include: source IP address, source port, destination IP address, destination port, transport layer protocol type, source MAC address, destination MAC address, etc.; the memory operation characteristics may include: RoCEv2 operation code, etc.; the routing adaptability characteristics may include: AR bit setting status, etc.

[0113] S320. Perform layer 2 processing on the analyzed service packet to determine whether the service packet is a layer 3 forwarding packet.

[0114] S330. When it is determined that the service packet is a three-layer forwarding packet, perform a routing query based on the destination IP address of the service packet to determine the target WCMP group corresponding to the service packet.

[0115] S340. Determine whether the packet characteristics of the service packet meet the preset packet configuration characteristics.

[0116] In the embodiment of the present invention, the transport layer protocol type (protocol number), destination port, RDMA operation type (opcode), and AR bit setting status of the RoceV2 service packet can be matched through pre-configured UDF, so as to determine whether the currently to-be-forwarded service packet is a specific packet that meets the preset packet configuration characteristics. If it is a specific packet, execute S350; otherwise, execute S360.

[0117] S350. Determine that the load sharing method of the service packet is per-packet WCMP sharing forwarding, and distribute the service packet to the first target member link in the target WCMP group for forwarding.

[0118] S360. Determine that the load sharing method of the service packet is per-flow WCMP sharing forwarding, and distribute the service packet to the second target member link in the target WCMP group for forwarding.

[0119] Among them, the specific implementation process of determining the first target member link in the target WCMP group for per-packet WCMP sharing forwarding of the service packet, and determining the second target member link in the target WCMP group for per-flow WCMP sharing forwarding of the service packet can refer to the above embodiments and will not be elaborated here.

[0120] To further describe the packet forwarding method provided by the embodiment of the present invention, Figure 5 FIG. is a schematic diagram of a networking logic provided by the third embodiment of the present invention. Based on Figure 5 the networking example shown below, the configuration and distribution process of the packet forwarding policy will be introduced respectively.

[0121] First, Figure 5 network devices T0, T1, T2, S0, and S1 are all configured with UDF to identify specific service packets to enable per-packet WCMP sharing. The ACL table can be configured first, and then the ACL rules can be configured. The rules match the UDP protocol (protocol number 17), destination port 4791, and specific RDMA packets with the AR bit set, enabling per-packet WCMP sharing. If there are fragmented packets, it is only necessary to allocate the Rocev2 Opcode field that matches the Read fragmented packet and the Write fragmented packet. The ACL table, that is, an example of the ACL rules, is as follows:

[0122] 1) Configure the acl-table and bind the ingress interface:

[0123] config acl-table add acl_l3 -- type L3V4 -- stage ingress -- ports Ethernet4 -- policy-desc l3

[0124] 2) Configure acl-rule to match UDP protocol, destination port 4791, and specific RDMA packets with AR bit set, enabling per-packet WCMP

[0125] config acl-rule add -- priority 100 -- ip-protocol 17 -- l4-dst-port 4791 -- rocev2-opcode 10 -- rocev2-ar 1 -- per-packet-wcmp-enable true acl_l3 acl_rule_7 (RDMA write)

[0126] config acl-rule add -- priority 100 -- ip-protocol 17 -- l4-dst-port 4791 -- rocev2-opcode 13 -- rocev2-ar 1 -- per-packet-wcmp-enable true acl_l3 acl_rule_8 (RDMA Read First)

[0127] config acl-rule add -- priority 100 -- ip-protocol 17 -- l4-dst-port 4791 -- rocev2-opcode 14 -- rocev2-ar 1 -- per-packet-wcmp-enable true acl_l3 acl_rule_9 (RDMA Read Middle)

[0128] config acl-rule add -- priority 100 -- ip-protocol 17 -- l4-dst-port 4791 -- rocev2-opcode 15 -- rocev2-ar 1 -- per-packet-wcmp-enable true acl_l3 acl_rule_10 (RDMA Read Last)

[0129] Secondly, the far-end TOR (Top of Rack) on the protocol plane, i.e., the GPU (Graphics Processing Unit) network card in device T2, advertises routes. That is, it floods within the domain while carrying the system_id (unique identifier of the network device) and link bandwidth information. The local protocol plane of device T0 will calculate the ECMP member bandwidth weight pathBW based on the global topology and send the relevant routing information to the APPL_DB database. The following is an example of a routing entry:

[0130]

[0131] The pathBW and system_id fields are added to the routing entry to create a WCMP group. Specific AR service packets are identified through UDF to enable per-packet WCMP sharing. The Orchagent process in the SWSS container subscribes to the APPL_DB database messages. After subscribing to the routing table creation message, it writes the relevant routing information to the ASIC_DB through the SAI interface and creates a per-flow WCMP group through the sai_next_hop_group_api->create_next_hop_group with the following extended types. Here, specific service packets identified by UDF use per-packet WCMP sharing; other services still use per-flow WCMP sharing. The following are examples of different types of next-hop groups:

[0132]

[0133]

[0134] Finally, the syncd container subscribes to the ASIC_DB, which is implemented by calling the chip manufacturer's SAI. Finally, a WCMP chip entry is created through the API (Application Programming Interface) of the SDK (Software Development Kit) provided by the manufacturer. After the WCMP chip entry is successfully created, it will start to affect the forwarding behavior of the network device. Thereafter, when the network device receives a service packet, it will select the optimal forwarding path according to the information in the WCMP entry, thus achieving traffic load balancing and efficient transmission.

[0135] The packet forwarding method provided in this embodiment can be implemented in the white-box SONIC network operating system. When implementing, the configuration information is first read from the configuration file corresponding to the network device and synchronized to SAI, and the SAI and the underlying chip cooperate to complete the per-packet and per-flow WCMP functions. Since both the SONIC system and SAI are open-source, shared, and open projects, applying the two to the adaptive routing data plane forwarding function can improve the compatibility and maintainability of this function.

[0136] Next, specific experiments are combined to verify the implementation effect of this solution.

[0137] First, in the initial state scenario, when a Rocev2 Write packet is sent and the Rocev2 AR bit of this packet is set, the data flow can be evenly shared among ECMP members, and the link sharing effect is as Figure 6 shown.

[0138] Second, when the downstream link goes down (such as network congestion, etc.), the protocol plane recalculates the link bandwidth weights, issues the APPL_DB, and the forwarding plane completes the table entry update; the data flow is shared according to the latest weights. Specifically, the protocol plane first collects the link bandwidth, then finds the link bottleneck, and finally distributes the bandwidth to the redundant links to calculate the WCMP group member weights of this node. The link sharing effect is as Figure 7 shown, and it can be seen that the bandwidth sharing of each link in the WCMP group considers the end-to-end full-path bandwidth for reasonable allocation.

[0139] Finally, when the downstream link recovers, the protocol plane recalculates the link bandwidth weights, issues the APPL_DB, and the forwarding plane completes the table entry update; the data flow is shared according to the latest weights. The link sharing effect is as Figure 8 shown.

[0140] Furthermore, compared with the matching routing prefix scheme, this solution can save a large number of ACL rules. This solution obtains the per-packet WCMP group through the LPM routing longest matching chip process of the routing itself, and uses UDF to change the sharing method, so that specific AR service packets are shared by per-packet WCMP, and other services still use per-flow WCMP for sharing. Only a few rules are needed to make specific AR services use per-packet WCMP for sharing, which can make full use of the link bandwidth and improve the training efficiency of the intelligent computing network.

[0141] At the same time, compared with the matching routing prefix scheme, there will also be a little change in this solution for non-AR services, that is, the per-flow and per-packet services with the same prefix both use the same WCMP group, the WCMP weight of the per-packet AR service changes, and the traffic forwarding weight of the per-flow non-AR service will also change accordingly. Through experiments, it is verified that when the full-rate bandwidth traffic uses per-flow WCMP for sharing, the per-flow non-AR service does not experience packet loss when the WCMP weight ratio changes significantly.

[0142] From the above implementation steps, distribution process, and implementation effects, it can be seen that this solution can achieve the global adaptive routing forwarding plane function only through a few ACL rules and its own routing function, making the link bandwidth allocation more reasonable and uniform, and improving the link bandwidth utilization efficiency.

[0143] Embodiment 4

[0144] Figure 9 FIG. is a schematic structural diagram of a packet forwarding device provided in Embodiment 4 of the present invention. As Figure 9 shown, the device includes:

[0145] A packet feature determination module 41, configured to receive a service packet and determine the packet features of the service packet; wherein, the packet features include network transmission features, memory operation features, and routing adaptability features;

[0146] A first packet forwarding module 42, configured to forward the service packet in a per-packet load sharing manner when the packet features meet the preset packet configuration features.

[0147] Further, based on the above invention embodiments, the first packet forwarding module 42 includes:

[0148] A first target weighted cost multi-path routing group determination unit, configured to perform a routing query according to the destination Internet protocol address in the network transmission features, and determine a first target weighted cost multi-path routing group corresponding to the service packet;

[0149] A feature matching unit, configured to respectively match the items to be matched corresponding to the packet features with the preset transport layer protocol type, preset destination port, preset remote direct memory access operation type, and preset adaptive routing flag position status in the preset packet configuration features; wherein, the items to be matched include: the transport layer protocol type and destination port in the network transmission features, the remote direct memory access operation type in the memory operation features, and the adaptive routing flag position status in the routing adaptability features;

[0150] A first packet forwarding unit, configured to, when all the items to be matched are successfully matched, determine a first target member link corresponding to the service packet according to the weights of the member links in the first target weighted cost multi-path routing group, and distribute the service packet to the first target member link for forwarding; wherein, the weights of the member links are determined in advance based on the weighted cost multi-path routing algorithm.

[0151] Further, based on the above invention embodiments, the first target weighted cost multi-path routing group determination unit is specifically configured to:

[0152] Query the preset routing table according to the destination Internet protocol address to obtain the target routing entry;

[0153] Extract the target hardware weighted cost multipath routing group index from the target routing entry;

[0154] Query the corresponding first target weighted cost multipath routing group in the preset weighted cost multipath routing group table according to the target hardware weighted cost multipath routing group index.

[0155] Further, on the basis of the above-mentioned invention embodiment, the packet forwarding device further includes:

[0156] A second packet forwarding module, configured to forward service packets in a per-flow load sharing manner when the packet characteristics do not meet the preset packet configuration characteristics.

[0157] Further, on the basis of the above-mentioned invention embodiment, the second packet forwarding module includes:

[0158] A second target weighted cost multipath routing group determination unit, configured to determine the second target weighted cost multipath routing group corresponding to the service packet;

[0159] A five-tuple extraction unit, configured to extract the source Internet protocol address, source port, destination Internet protocol address, destination port, and transport layer protocol type in the network transmission characteristics as the packet five-tuple when at least one of the items to be matched corresponding to the packet characteristics does not match the preset packet configuration characteristics; wherein, the items to be matched include: the transport layer protocol type and destination port in the network transmission characteristics, the remote direct memory access operation type in the memory operation characteristics, and the adaptive routing flag bit status in the routing adaptability characteristics;

[0160] A hash calculation unit, configured to call a preset hash function to determine the target hash value corresponding to the packet five-tuple;

[0161] A second packet forwarding unit, configured to determine the second target member link corresponding to the service packet according to the target hash value and the weights of the member links in the second target weighted cost multipath routing group, and distribute the service packet to the second target member link for forwarding; wherein, the weights of the member links are determined in advance based on the weighted cost multipath routing algorithm.

[0162] Further, on the basis of the above-mentioned invention embodiment, the packet forwarding device further includes:

[0163] A configuration information reading module, configured to read the packet forwarding policy configuration information in the preset configuration file before determining the packet characteristics of the service packet;

[0164] A configuration module is used to configure corresponding user-defined functions and access control lists according to message forwarding policy configuration information, so that service messages meeting preset message configuration characteristics are forwarded in a per-packet load sharing manner, and service messages not meeting preset message configuration characteristics are forwarded in a per-flow load sharing manner.

[0165] The message forwarding device provided by the embodiments of the present invention can execute the message forwarding method provided by any embodiment of the present invention, and has function modules and beneficial effects corresponding to the execution of the method.

[0166] Embodiment Five

[0167] Figure 10 FIG. shows a schematic structural diagram of a network device 50 that can be used to implement the embodiments of the present invention. The network device is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The network device can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device (such as a helmet, glasses, a watch, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0168] As Figure 10 shown, the network device 50 includes at least one processor 51, and a memory communicatively connected to the at least one processor 51, such as a read-only memory (ROM) 52, a random access memory (RAM) 53, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 51 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 52 or the computer program loaded from the storage unit 58 into the random access memory (RAM) 53. In the RAM 53, various programs and data required for the operation of the network device 50 can also be stored. The processor 51, the ROM 52, and the RAM 53 are connected to each other through a bus 54. The input / output (I / O) interface 55 is also connected to the bus 54.

[0169] Multiple components in the network device 50 are connected to the I / O interface 55, including: an input unit 56, such as a keyboard, a mouse, etc.; an output unit 57, such as various types of displays, speakers, etc.; a storage unit 58, such as a disk, an optical disc, etc.; and a communication unit 59, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 59 allows the network device 50 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0170] The processor 51 may be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 51 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 51 executes the various methods and processes described above, such as the packet forwarding method.

[0171] In some embodiments, the packet forwarding method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 58. In some embodiments, part or all of the computer program may be loaded and / or installed onto the network device 50 via the ROM 52 and / or the communication unit 59. When the computer program is loaded into the RAM 53 and executed by the processor 51, one or more steps of the packet forwarding method described above may be performed. Alternatively, in other embodiments, the processor 51 may be configured to execute the packet forwarding method by any other suitable means (e.g., by means of firmware).

[0172] The various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems on a chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs executable and / or interpretable on a programmable system including at least one programmable processor, which may be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0173] In some embodiments, the message forwarding method may be implemented as a computer program, which is invisibly included in a computer program product. When the computer program is executed by a processor, it implements the message forwarding method of the present invention. A computer program product can be understood as a software product that mainly implements its solution through a computer program. The computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, so that when the computer program is executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, executed partially on the machine as an independent software package and partially on a remote machine, or executed entirely on a remote machine or server.

[0174] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0175] To provide interaction with a user, the systems and techniques described herein can be implemented on a network device that has: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the network device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0176] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.

[0177] The computing system can include clients and servers. The clients and servers are generally far from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0178] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.

[0179] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A message forwarding method, characterized in that: The method comprises: Receive a service message and determine message characteristics of the service message; wherein the message characteristics include network transmission characteristics, memory operation characteristics and routing adaptability characteristics; When the message characteristics meet the preset message configuration characteristics, the service message is forwarded in a packet-by-packet load sharing manner.

2. The method according to claim 1, characterized in that When the message feature meets the preset message configuration feature, the service message is forwarded in a packet-by-packet load sharing manner, including: Performing a routing query according to the destination Internet Protocol address in the network transmission characteristics to determine a first target weighted cost multi-path routing group corresponding to the service message; Matching the items to be matched corresponding to the message features with the preset transport layer protocol type, the preset destination port, the preset remote direct memory access operation type and the preset adaptive routing flag position bit state in the preset message configuration feature respectively; wherein the items to be matched include: the transport layer protocol type and the destination port in the network transmission feature, the remote direct memory access operation type in the memory operation feature and the adaptive routing flag position bit state in the routing adaptability feature; When all the items to be matched are matched successfully, the first target member link corresponding to the business message is determined according to the weight of each member link in the first target weighted cost multi-path routing group, and the business message is shared to the first target member link for forwarding; wherein the weight of the member link is determined in advance based on the weighted cost multi-path routing algorithm.

3. The method according to claim 2, characterized in that The performing of routing query according to the destination Internet Protocol address in the network transmission characteristics to determine the first target weighted cost multi-path routing group corresponding to the service message includes: Querying a preset routing table according to the destination Internet Protocol address to obtain a target routing entry; Extracting a target hardware weighted cost multipath routing group index from the target routing entry; According to the target hardware weighted cost multi-path routing group index, the corresponding first target weighted cost multi-path routing group is searched in a preset weighted cost multi-path routing group table.

4. The method according to claim 1, characterized in that: Also includes: When the message feature does not meet the preset message configuration feature, the service message is forwarded in a flow-by-flow load sharing manner.

5. The method according to claim 4, characterized in that When the message feature does not meet the preset message configuration feature, forwarding the service message in a flow-by-flow load sharing manner includes: Determine a second target weighted cost multipath routing group corresponding to the service message; When at least one of the items to be matched corresponding to the message feature does not match the preset message configuration feature, extract the source Internet Protocol address, source port, destination Internet Protocol address, destination port and transport layer protocol type in the network transmission feature as a message quintuple; wherein the items to be matched include: the transport layer protocol type and destination port in the network transmission feature, the remote direct memory access operation type in the memory operation feature, and the adaptive routing flag position state in the routing adaptability feature; Calling a preset hash function to determine a target hash value corresponding to the message quintuple; According to the target hash value and the weight of each member link in the second target weighted cost multipath routing group, determine the second target member link corresponding to the business message, and share the business message to the second target member link for forwarding; wherein the weight of the member link is determined in advance based on the weighted cost multipath routing algorithm.

6. The method according to claim 1, characterized in that Before determining the message feature of the service message, the method further includes: Read the message forwarding policy configuration information in the preset configuration file; The corresponding user-defined functions and access control lists are configured according to the message forwarding policy configuration information, so that the service messages that meet the preset message configuration characteristics are forwarded using a packet-by-packet load sharing method, and the service messages that do not meet the preset message configuration characteristics are forwarded using a flow-by-flow load sharing method.

7. A message forwarding method and device, characterized in that: The device comprises: A message feature determination module, used to receive a service message and determine the message features of the service message; wherein the message features include network transmission features, memory operation features and routing adaptability features; The first message forwarding module is used to forward the service message in a packet-by-packet load sharing manner when the message feature meets the preset message configuration feature.

8. A network device, characterized in that: The network equipment includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the message forwarding method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the message forwarding method according to any one of claims 1 to 6 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the message forwarding method according to any one of claims 1 to 6.