Message forwarding method, electronic device, computer readable medium and computer program product
By adding a new target ECMP group to the routing device and using preset ACL rules and hash calculations, the network congestion problem caused by elephant flows was solved, and efficient forwarding of elephant flows and improved network stability were achieved.
Patent Information
- Application Number
- CN202511073609.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-10-17
AI Technical Summary
In wide-area lossless scenarios, the ultra-large bandwidth traffic of elephant flows is forwarded through a single link, causing network congestion. Existing technologies cannot effectively share the load, affecting network stability and user experience.
A new target ECMP group is added to the routing device. The elephant flow is identified by the preset ACL rules and redirected to the target ECMP group for forwarding. The target ECMP group contains at least two links with a bandwidth greater than the default ECMP group, and uses the target field and five-tuple information for hash calculation to share traffic.
It reduces the risk of network congestion, improves network stability and bandwidth utilization, and ensures network compatibility and stability under complex traffic models.
Smart Images

Figure CN120811991A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of communication, and particularly relates to a message forwarding method, an electronic device, a computer readable medium and a computer program product. BACKGROUND
[0002] ECMP (Equal-Cost Multi-Path) is a routing next hop exit effect of load balancing exit, generally uses a hash algorithm to perform exit lookup according to five tuple information of a message, so as to realize the effect of load sharing. In a wide area lossless scene, a RDMA (remote direct memory access) end will issue various flows, which include elephant flows. The elephant flow sends a flow with super large bandwidth, such as a flow with an interface bandwidth ratio of about 80%. The elephant flow with a single field change only walks a single link forwarding, which is easy to cause network congestion. SUMMARY
[0003] The present disclosure provides a message forwarding method, an electronic device, a computer readable medium and a computer program product.
[0004] In a first aspect, an embodiment of the present disclosure provides a message forwarding method, comprising:
[0005] receiving first flow;
[0006] in response to determining that the first flow is an elephant flow at a flow entrance of a default equal cost multi-path (ECMP) group, redirecting the first flow to a target ECMP group for forwarding; wherein the target ECMP group is an equal cost multi-path group for forwarding elephant flow; and the target ECMP group includes at least two first links, and a bandwidth of at least one of the first links is greater than a bandwidth of each link in the default ECMP group.
[0007] In a second aspect, an embodiment of the present disclosure provides an electronic device, comprising a memory and a processor; the memory stores a computer program executable by the processor, and the computer program is executed by the processor to implement the message forwarding method.
[0008] In a third aspect, an embodiment of the present disclosure provides a computer readable medium, which stores a computer program, and the computer program is executed by a processor to implement the message forwarding method.
[0009] In a fourth aspect, an embodiment of the present disclosure provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the message forwarding method.
[0010] The packet forwarding method in the embodiments of the present disclosure comprises: receiving first traffic, and in response to determining that the first traffic is an elephant flow at a traffic entrance of a default ECMP group, redirecting the first traffic to a target ECMP group for forwarding; wherein the target ECMP group is an equal-cost multi-path routing group for forwarding elephant flows; the target ECMP group comprises at least two first links, and the bandwidth of at least one of the first links is greater than the bandwidth of each link in the default ECMP group; by judging the traffic as an elephant flow and forwarding the elephant flow through a target ECMP group comprising a larger bandwidth link, the embodiments of the present disclosure can reduce the risk of network congestion and improve the stability of the network. BRIEF DESCRIPTION OF DRAWINGS
[0011] In the drawings of the embodiments of the present disclosure:
[0012] Figure 1 A flowchart of a packet forwarding method provided by the embodiments of the present disclosure is shown;
[0013] Figure 2 A first traffic format diagram comprising a QP field provided by the embodiments of the present disclosure is shown;
[0014] Figure 3 A topology diagram of an ECMP group formed by an SRv6 policy tunnel provided by the embodiments of the present disclosure is shown;
[0015] Figure 4 A topology diagram of an ECMP group formed by an SR-BE tunnel provided by the embodiments of the present disclosure is shown;
[0016] Figure 5 A topology diagram of an ECMP group formed by an IP link provided by the embodiments of the present disclosure is shown;
[0017] Figure 6 A packet forwarding flow diagram provided by a specific example of the present disclosure is shown;
[0018] Figure 7 A block diagram of an electronic device provided by the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0019] In order for those skilled in the art to better understand the technical solutions of the present disclosure, the embodiments of the present disclosure will be described in detail below with reference to the drawings.
[0020] The embodiments shown will be described in more detail below with reference to the drawings, but the embodiments shown can be embodied in different forms, and the present disclosure should not be interpreted as being limited to the embodiments described below. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete, and to enable those skilled in the art to fully understand the scope of the present disclosure.
[0021] The accompanying drawings of the embodiments of the present disclosure are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the detailed embodiments, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing the detailed embodiments with reference to the accompanying drawings.
[0022] The present disclosure may be described with reference to plan views and / or cross-sectional views by way of ideal schematic views of the present disclosure. Therefore, the exemplary illustrations may be modified according to manufacturing techniques and / or tolerances.
[0023] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.
[0024] The terms used in this disclosure are only used to describe specific embodiments and are not intended to limit the disclosure. As used in this disclosure, the term "and / or" includes any and all combinations of one or more related enumerated items. As used in this disclosure, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. As used in this disclosure, the terms "comprising" and "made of" specify the presence of the features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof.
[0025] Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meanings as those commonly understood by those skilled in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning unless expressly defined in this disclosure.
[0026] The present disclosure is not limited to the embodiments shown in the drawings, but includes modifications of the configurations formed based on the manufacturing process. Therefore, the regions illustrated in the drawings have schematic properties, and the shapes of the regions shown in the drawings illustrate the specific shapes of the regions of the elements, but are not intended to be limiting.
[0027] Figure 1 A flow chart of a message forwarding method provided in an embodiment of the present disclosure, wherein the method is applied to a routing device, such as Figure 1 As shown, the method includes the following steps:
[0028] Step S1: receiving first traffic.
[0029] In step S2, in response to determining that the first traffic is an elephant flow at the traffic entrance of the default ECMP group, the first traffic is redirected to be forwarded in a target ECMP group; the target ECMP group is an equal-cost multi-path group for forwarding elephant flows; the target ECMP group includes at least two first links, and the bandwidth of at least one first link is greater than the bandwidth of each link in the default ECMP group.
[0030] In the related art, a default ECMP is arranged on a port of a routing device, and the default ECMP group is an equal-cost multi-path group for forwarding received traffic. Since the elephant flow is forwarded through the default ECMP group, the five-tuple is used for hash calculation, and the calculation result is the same for each traffic of the same flow, so only one link can be calculated for forwarding the elephant flow. Since the elephant flow is traffic occupying a large bandwidth, there is a technical problem of link congestion caused by single-link forwarding. In the embodiment of the present disclosure, a target ECMP group is added to the routing device, and the target ECMP group is an equal-cost multi-path group for forwarding elephant flows, while the default ECMP group is an equal-cost multi-path group for forwarding non-elephant flows. Therefore, in the embodiment of the present disclosure, after the routing device receives the first traffic, it will first determine whether the first traffic is an elephant flow at the traffic entrance of the default ECMP group before forwarding in the default ECMP group. If the first traffic is an elephant flow, it will not be forwarded through the default ECMP group, but will be forwarded through the target ECMP group. At least one first link in the target ECMP group is greater than the bandwidth of each link in the default ECMP group, that is, at least one member of the target ECMP group is a large-bandwidth link. In this way, the transmission of the elephant flow can be smoother, and the risk of network congestion can be further reduced. The stability of the network is improved. In some embodiments, the bandwidth of all first links in the target ECMP group is greater than the bandwidth of each link in the default ECMP group, that is, all members of the target ECMP group are large-bandwidth links, which can ensure the optimal transmission effect.
[0031] In some embodiments, the packet forwarding method further includes the following steps: in response to the proportion of the bandwidth occupied by the first traffic being greater than a preset threshold, determining that the first traffic is an elephant flow. For example, the preset threshold can be 50%. It should be noted that in response to the proportion of the bandwidth occupied by the first traffic being less than or equal to the preset threshold, it is determined that the first traffic is a non-elephant flow.
[0032] Elephant flows contain both quintuple hop flows and QP (Queue Pair) hop flows. Currently, devices in a network can only support IP load sharing based on quintuples, and traffic with a single QP flow field change can only be forwarded through a single link. Single-link forwarding of elephant flows can cause network congestion. In addition, when a link fails, load sharing forwarding is not supported, so fast convergence cannot be performed, thereby limiting the stability of the network and the customer experience. To solve the above problems, the embodiments of the present disclosure provide a method for supporting elephant flows including a target field to be forwarded through an ECMP group.
[0033] In some embodiments, the step of redirecting the first traffic to the target ECMP group for forwarding includes the following steps:
[0034] Step S21, modifying the next hop of the first traffic according to a preset ACL rule to redirect the first traffic to the target ECMP group.
[0035] The routing device modifies the next hop of the first traffic to a new ECMP group, i.e., a target ECMP group, through a preset ACL (Access Control Lists) rule, thereby achieving redirection of the first traffic.
[0036] The ACL rule defines a plurality of matching rules, and the matching rules include performing a target operation on traffic satisfying a preset condition. In the embodiments of the present disclosure, the ACL rule defines the following rules: a first matching rule, which is to first determine whether the proportion of the bandwidth occupied by the traffic is greater than a preset threshold, and if yes, the traffic is redirected to the target ECMP group for traffic forwarding, otherwise, the traffic is still forwarded using the default ECMP group; and a second matching rule, which is to determine whether the traffic includes a target field, and if yes, a new hash table is determined for routing in the new ECMP group, otherwise, the original hash table is still used for routing in the new ECMP group. In this step, the first matching rule in the ACL rule is used.
[0037] Step S22, for the first traffic including the target field, performing hash calculation according to the value of the target field and the quintuple information of the first traffic to forward the first traffic in the target ECMP group; wherein the target field is a field used to identify the first traffic in addition to the quintuple information.
[0038] If the first traffic is an elephant flow and includes the target field, the corresponding link is selected in the target ECMP group based on the value of the target field and the quintuple information of the first traffic to perform load sharing forwarding on the first traffic, which can improve the accuracy of routing in the ECMP group and reduce the bandwidth utilization of small-bandwidth links.
[0039] In some embodiments, the quintuple information can include the following information:
[0040] Source IP Address: the sender IP address of the first traffic;
[0041] Destination IP Address: the receiver IP address of the first traffic;
[0042] Source Port Number: the port number used by the sender of the first traffic;
[0043] Destination Port Number: the port number expected by the receiver of the first traffic to receive data;
[0044] Protocol Type: the protocol type used by the first traffic, such as TCP, UDP, etc.
[0045] The above five elements collectively define a flow in the network. In the ECMP scenario, even if two packets have the same source IP address, destination IP address, and protocol type, as long as their source port numbers or destination port numbers are different, they will be considered as different flows and be distributed to different paths. This mechanism ensures the balanced distribution of traffic and improves the overall performance and reliability of the network.
[0046] In some embodiments, the target field can include at least one of the following: a QP field, a PSN (Package Sequence Number) field.
[0047] In some embodiments, the step of modifying the next hop of the first traffic according to the preset ACL rule includes the following steps: in response to the first traffic not including the target field, modifying the next hop of the first traffic according to the preset ACL rule.
[0048] In some embodiments, the step of modifying the next hop of the first traffic according to the ACL rule includes the following steps: in response to the first traffic including the target field, determining a target hash table corresponding to the first traffic according to the preset ACL rule, so that the target ECMP group performs hash calculation based on the target hash table, wherein the mapping factors of the target hash table include the target field and the five-tuple information of the first traffic; and modifying the next hop of the first traffic to the target ECMP group according to the preset ACL rule. In this step, the second matching rule in the aforementioned ACL rule is used to select a link for forwarding the first traffic within the target ECMP group.
[0049] Correspondingly, when forwarding the first traffic in the target ECMP group, routing and forwarding can be performed based on the target hash table and the target hash value obtained through the hash calculation. That is, the first target link corresponding to the target hash value can be found in the target hash table, so that routing is performed in the target ECMP group, and the first traffic is forwarded through the selected first target link, thereby achieving traffic load sharing.
[0050] In some embodiments, the first traffic includes a preset identifier, and the preset identifier is used to indicate whether the first traffic includes the target field; or the first traffic includes a target packet header, and the target packet header is a packet header including the target field.
[0051] In some embodiments, the preset identifier can be obtained from the forwarding table, and the value of the preset identifier in the first traffic is determined. For example, if the value of the preset identifier is 1, it can be determined that the first traffic includes the target field, that is, the first traffic is an elephant flow including the target field.
[0052] Figure 2 A first traffic format including a target field provided by the embodiments of the present disclosure is shown in FIG. 1. Figure 2 As shown in FIG. 1, the first traffic is a RoCEv2 packet, and the RoCEv2 packet includes an InfiniBand original packet. A QP field (Dest QP) and a PSN field are located in a packet header (InfiniBand Base Transport Header) of the InfiniBand original packet, and the lengths of the QP field and the PSN field are about 24 bits respectively. It should be noted that the PSN is unique for each data packet, and the existence of packet loss can be determined by the continuity of the PSN. Therefore, the PSN can also be mapped into a hash factor to perform hash simulation calculation.
[0053] In some embodiments, the hash calculation according to the value of the target field and the five-tuple information of the first traffic to forward the first traffic in the target ECMP group can include the following steps: calculating a first hash value according to the value of the target field, and calculating a target hash value according to the first hash value, the value of the target field and the five-tuple information, so as to determine a target link for forwarding the first traffic from each first link according to the target hash value.
[0054] It should be noted that the way of calculating the target hash value is not unique. The first hash value can be calculated according to the value of the target field, and the target hash value can be calculated according to the first hash value and the five-tuple information, or the target hash value can be calculated directly according to the value of the target field and the five-tuple information.
[0055] If the first traffic is an elephant flow with the target field, the routing device modifies the next hop of the first traffic to a new ECMP group, i.e., a target ECMP group, according to the preset ACL rule, and forwards the first traffic in the target ECMP group according to the value of the target field and the five-tuple information. Specifically, a target hash value can be calculated according to a target hash table, and a corresponding target link can be determined according to the target hash value, so as to route in the target ECMP group and forward the first traffic by using the selected target link, thereby load balancing the traffic and improving the accuracy and rationality of ECMP group routing.
[0056] In some embodiments, the step of redirecting the first traffic to the target ECMP group for forwarding includes the following steps:
[0057] In step S21', the next hop of the first traffic is modified according to the preset ACL rule to redirect the first traffic to the target ECMP group.
[0058] The routing device modifies the next hop of the first traffic to a new ECMP group, i.e., a target ECMP group, according to the preset ACL rule, thereby realizing the redirection of the first traffic.
[0059] In step S22', for the first traffic without the target field, a hash calculation is performed according to the five-tuple information of the first traffic to forward the first traffic in the target ECMP group, wherein the target field is a field used to identify the first traffic in addition to the five-tuple information.
[0060] If the first traffic is an elephant flow without the target field, the routing device performs a hash calculation based on the five-tuple information of the first traffic to select a corresponding link in the target ECMP group to forward the first traffic, which can preferentially select a large-bandwidth link to forward the traffic, thereby reducing the bandwidth occupation of a small-bandwidth link and reducing the risk of network congestion.
[0061] In some embodiments, after the step of redirecting the first traffic to the target ECMP group for forwarding, the packet forwarding method can further include the following steps:
[0062] In step S24, the forwarding rate of each first traffic in the target ECMP group is monitored.
[0063] In step S25, in response to the forwarding rate of a target first traffic among the first traffics being less than a preset forwarding rate, the target first traffic is redirected to a default ECMP group for forwarding.
[0064] In some embodiments, the step of redirecting the target first traffic to the default ECMP group for forwarding comprises the steps of: modifying a next hop of the target first traffic according to a preset ACL rule to redirect the target first traffic to the default ECMP group; and performing a hash calculation according to a hash table corresponding to the target first traffic to forward the target first traffic in the default ECMP group, wherein, in a case where the target first traffic comprises a target field, a mapping factor of the hash table comprises the target field and five-tuple information; and in a case where the target first traffic does not comprise the target field, the mapping factor of the hash table comprises the five-tuple information, and the target field is a field used to identify the first traffic other than the five-tuple information.
[0065] In the embodiments of the present disclosure, the first traffic forwarding rate of each link in the redirected ECMP group is monitored in real time, and when the first traffic forwarding rate of a certain link is less than a preset forwarding rate, the current first traffic can be redirected back to the default ECMP group, that is, the traffic is released back to the default ECMP group. Hash calculation is performed according to the current hash table, and load balancing forwarding is performed in the default ECMP group.
[0066] It should be noted that if the proportion of the ingress traffic bandwidth is greater than the preset bandwidth proportion threshold in the future, the traffic can be forwarded again through the target ECMP group. The embodiments of the present disclosure can adapt to more complex traffic models and improve the compatibility of the network by monitoring the traffic in real time and dynamically adjusting the ECMP group used for traffic balancing according to the traffic.
[0067] In some embodiments, after receiving the first traffic, the packet forwarding method can further comprise the steps of: in response to determining that the first traffic is not an elephant flow at the traffic ingress of the default ECMP group, performing a hash calculation according to five-tuple information to forward the first traffic in the default ECMP group.
[0068] In some embodiments, the first traffic is traffic sent by an RDMA device. That is, the embodiments of the present disclosure broaden the application scenarios of wide area network lossless, and realize that the elephant flow sent by the RDMA device in the scenario can be forwarded through multi-link traffic balancing, thereby improving the stability of the network.
[0069] The embodiments of the present disclosure can be applied to a symmetrical network across various tunnel underlying network architecture layers, for example, in a wide area network scenario.
[0070] The target ECMP group can be an ECMP group formed by an SRv6 policy (segment routing IPv6 Policy, segment routing IPv6 Policy) tunnel. Figure 3 A topology structure diagram of the ECMP group formed by the SRv6 policy tunnel provided in the embodiments of the present disclosure is shown in FIG. 1.Figure 3 As shown in the figure, the ECMP group formed by the SRv6 policy tunnel includes link SL1 and link SL2, and the traffic received by PE1 can be forwarded by link SL1 and link SL2.
[0071] The target ECMP group can also be an ECMP group formed by an SR-BE (Segment Routing-Best Effort) tunnel. Figure 4 A topology structure diagram of an ECMP group formed by an SR-BE tunnel provided by an embodiment of the present disclosure is shown in the figure. Figure 4 As shown in the figure, the ECMP group formed by the SR-BE tunnel includes link PE1-P-PE2 and link PE1-PE2, and the traffic received by PE1 can be forwarded by link PE1-P-PE2 and link PE1-PE2.
[0072] The target ECMP group can also be an ECMP group formed by an IP (Internet Protocol) link. Figure 5 A topology structure diagram of an ECMP group formed by an IP link provided by an embodiment of the present disclosure is shown in the figure. Figure 5 As shown in the figure, the ECMP group formed by the IP link includes link L1 and link L2, and the traffic received by node B can be forwarded by link L1 and link L2.
[0073] To clearly illustrate the scheme of the embodiments of the present disclosure, the following will be described in combination with Figure 6 The packet forwarding process is described in detail through a specific example. Figure 6 A packet forwarding flow diagram provided by a specific example of the present disclosure is shown in the figure. Figure 6 As shown in the figure, the packet forwarding flow includes the following steps:
[0074] In step S101, the routing device receives first traffic, judges whether the proportion of the bandwidth occupied by the first traffic is greater than a preset bandwidth proportion threshold at the traffic entrance of the default ECMP group, and if yes, executes step S102; otherwise, executes step S109.
[0075] In step S102, the first traffic is redirected to ECMP group 1, and the bandwidth of at least one link in ECMP group 1 is greater than the bandwidth of each link in the default ECMP group.
[0076] In step S103, it is judged whether the first traffic includes a QP field, and if yes, step S104 is executed; otherwise, step S108 is executed.
[0077] Step S104, a hash value 1 is calculated according to the value of the QP field and the five-tuple information of the first traffic, a target hash value 1 is obtained by performing hash calculation according to the hash value 1, the five-tuple information of the first traffic and a mapping factor corresponding to the QP field, and the first traffic is forwarded by link 1 in the ECMP group 1 according to the target hash value 1.
[0078] Step S105, the forwarding rate of each first traffic in the ECMP group 1 is monitored, if the forwarding rate of the target first traffic is less than a preset forwarding rate, step S106 is executed; otherwise, step S105 is executed.
[0079] Step S106, the target first traffic is redirected to the ECMP group 0, and the ECMP group 0 is a default ECMP group.
[0080] Step S107, a target hash value 2 is obtained by performing hash calculation according to the five-tuple information of the target first traffic and the value of the QP field, and the target first traffic is forwarded by link 2 in the ECMP group 0 according to the target hash value 2.
[0081] Step S108, a target hash value 3 is obtained by performing hash calculation according to the five-tuple information of the first traffic, the first traffic is forwarded by link 3 in the ECMP group 1 according to the target hash value 3, and step S105 is executed.
[0082] Step S109, a target hash value 3 is obtained by performing hash calculation according to the five-tuple information of the first traffic, and the first traffic is forwarded by link 4 in the ECMP group 0 according to the target hash value 3.
[0083] The embodiments of the present disclosure can be applied to MPLS (Multi-Protocol Label Switching) tunnels or VXLAN (Virtual Extensible Local Area Network) tunnels or GRE (Generic Routing Encapsulation), IPv6 (Internet Protocol Version 6) tunnels and the like.
[0084] The disclosed embodiment provides an ECMP forwarding method that supports traffic including a target field, which is applied to a wide area network lossless scenario. The routing device first determines whether the received traffic is an elephant flow. If it is an elephant flow, the elephant flow can be redirected to a new ECMP group. The new ECMP group can parse the value of the target field in the elephant flow traffic to perform deep ECMP; if the traffic does not carry an elephant flow with a target field, the new ECMP group can share the traffic load according to the five-tuple information, thereby effectively improving the stability and utilization of the network and improving the user's application experience of the network. In addition, the disclosed embodiment adds forwarding rate statistics for traffic in the new ECMP group. When the forwarding rate of a certain traffic is lower than the preset forwarding rate, the elephant flow is released from the new ECMP group. This can ensure that when processing the elephant flow, the bandwidth in the environment can be fully utilized to reduce the risk of network congestion. Secondly, it will not affect the processing of other non-elephant flows, ensure the consistency of hash routing, and ensure the security of data transmission.
[0085] The disclosed embodiment adds the judgment of the elephant flow. If it is an elephant flow, it can be redirected to a new ECMP group. If the elephant flow is an elephant flow including a target field, the value of the target field and the five-tuple information are determined, and ECMP forwarding is performed between the device exports through hash calculation, thereby improving the bandwidth utilization in the environment and reducing the risk of network congestion; and when the traffic forwarding rate is lower than the preset forwarding rate, the traffic can be released to the original ECMP group. By forwarding and sharing traffic through the ECMP group, fast switching can be achieved when a link fails, thereby ensuring the stability and compatibility of the network. In addition, the disclosed embodiment will only filter and redirect the elephant flow to the new ECMP group, and other non-elephant flows will forward traffic according to the original ECMP group. Therefore, after the implementation of the disclosed embodiment, other traffic will not be affected, and the hash consistency of other traffic is guaranteed.
[0086] Compared with the lossless ECMP routing and forwarding solution in the related art, the embodiment of the present disclosure not only broadens the application scenarios of lossless WAN, but also supports deep ECMP of the target field to adapt to more complex traffic models, reduce the occurrence of network congestion, improve bandwidth utilization, and improve the stability and compatibility of devices in the network.
[0087] The present disclosure also provides an electronic device, such as Figure 7 As shown, it includes a memory 1 and a processor 2; the memory 1 stores a computer program that can be executed by the processor 2, and when the computer program is executed by the processor, any one of the message forwarding methods of the embodiments of the present disclosure is implemented.
[0088] The processor 2 is a device with data processing capability, including but not limited to a central processing unit (CPU) and the like; the memory is a device with data storage capability, including but not limited to a random access memory (RAM, more specifically SDRAM, DDR, etc.), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), and a flash memory (FLASH); the I / O interface (read-write interface) is connected between the processor and the memory, and can realize information interaction between the memory 1 and the processor 2, including but not limited to a data bus (Bus) and the like.
[0089] The present disclosure further provides a computer readable medium having a computer program stored thereon, wherein the computer program is executed by the processor to implement any of the packet forwarding methods of the present disclosure.
[0090] The present disclosure further provides a computer program product, comprising a computer program, wherein the computer program is executed by the processor to implement any of the packet forwarding methods of the present disclosure.
[0091] The processor is a device with data processing capability, including but not limited to a central processing unit (CPU) and the like; the memory is a device with data storage capability, including but not limited to a random access memory (RAM, more specifically SDRAM, DDR, etc.), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), and a flash memory (FLASH); the I / O interface (read-write interface) is connected between the processor and the memory, and can realize information interaction between the memory and the processor, including but not limited to a data bus (Bus) and the like.
[0092] Those skilled in the art can understand that all or some of the functional modules / units in the above disclosed steps, systems, and devices can be implemented as software, firmware, hardware, and appropriate combinations thereof.
[0093] In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component can have multiple functions, or one function or step can be performed by several physical components in cooperation.
[0094] Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit (CPU), a digital signal processor, or a microprocessor, or hardware, or a combination of software and / or hardware. Such software can be distributed on computer readable media, which can comprise computer storage media (or non-transitory media), and communication media (or transitory media). Computer storage media, as used herein, includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, random access memory (RAM), such as SDRAM, DDR, or other RAM, read only memory (ROM), electrically erasable programmable read only memory (EEPROM), flash memory, or other memory technology, compact disc read only memory (CD-ROM), digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and that can be accessed by a computer. Further, it should be appreciated by those skilled in the art that computer storage media generally includes computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Accordingly, the disclosure is not limited to entirely software based embodiments implemented using computers other embodiments can be implemented using hardware, firmware, software, or any combination thereof.
[0095] The present disclosure has disclosed example embodiments, and although the specific terms are employed, they are used in a generic descriptive sense only and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that features, characteristics or / and elements described in connection with a particular embodiment can be used in conjunction with other embodiments unless otherwise explicitly stated, or in the alternative, used in isolation. Accordingly, it will be understood by those skilled in the art that various changes in form and details can be made without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. A message forwarding method, comprising: receiving first traffic; In response to determining that the first traffic is an elephant flow at the traffic inlet of the default equal-cost routing ECMP group, the first traffic is redirected to the target ECMP group for forwarding; wherein, the target ECMP group is an equal-cost routing group for forwarding elephant flows; the target ECMP group includes at least two first links, and the bandwidth of at least one of the first links is greater than the bandwidth of each link in the default ECMP group.
2. The method according to claim 1, wherein The redirecting the first traffic to the target ECMP group for forwarding includes: Modify the next hop of the first traffic according to a preset access control list (ACL) rule to redirect the first traffic to the target ECMP group; For the first traffic including a target field, a hash calculation is performed based on the value of the target field and the five-tuple information of the first traffic to forward the first traffic in the target ECMP group; wherein, the target field is a field used to identify the first traffic other than the five-tuple information.
3. The method according to claim 2, wherein: The target field includes at least one of the following: a queue pair QP field and a packet queue number PSN field.
4. The method according to claim 2, wherein: The modifying the next hop of the first traffic according to a preset access control list (ACL) rule includes: In response to the first traffic not including a destination field, modifying the next hop of the first traffic according to the preset ACL rule.
5. The method according to claim 2, wherein: The modifying the next hop of the first traffic according to a preset access control list (ACL) rule includes: In response to the first flow including a target field, determining a target hash table corresponding to the first flow according to the preset ACL rule, so that the target ECMP group performs a hash calculation based on the target hash table, wherein a mapping factor of the target hash table includes the target field and quintuple information of the first flow; Modify the next hop of the first traffic to the target ECMP group according to the preset ACL rule.
6. The method according to claim 4 or 5, wherein: The first flow includes a preset identifier, wherein the preset identifier is used to indicate whether the first flow includes the target field; or The first traffic includes a target message header, and the target message header is a message header including the target field.
7. The method according to claim 1, wherein The redirecting the first traffic to the target ECMP group for forwarding includes: Modify the next hop of the first traffic according to a preset access control list (ACL) rule to redirect the first traffic to the target ECMP group; For the first traffic that does not include a target field, a hash calculation is performed based on the five-tuple information of the first traffic to forward the first traffic in the target ECMP group, wherein the target field is a field used to identify the first traffic other than the five-tuple information.
8. The method according to claim 1, wherein After redirecting the first traffic to the target ECMP group for forwarding, the method further includes: monitoring a forwarding rate of the first traffic in the target ECMP group; In response to a forwarding rate of the first traffic being less than a preset forwarding rate, the first traffic is redirected to the default ECMP group for forwarding.
9. The method according to claim 8, wherein The redirecting the first traffic to the default ECMP group for forwarding includes: Modify the next hop of the first traffic according to a preset access control list (ACL) rule to redirect the first traffic to the default ECMP group; A hash calculation is performed according to the hash table corresponding to the first traffic to forward the first traffic in the default ECMP group, wherein, when the first traffic includes a target field, the mapping factor of the hash table includes the target field and five-tuple information; when the first traffic does not include a target field, the mapping factor of the default hash table includes five-tuple information, and the target field is a field used to identify the first traffic other than the five-tuple information.
10. The method according to claim 1, wherein The method further comprises: In response to the fact that the proportion of the bandwidth occupied by the first traffic is greater than a preset threshold, the first traffic is determined to be an elephant flow.
11. An electronic device comprising a memory and a processor; the memory stores a computer program executable by the processor, and when the computer program is executed by the processor, the message forwarding method according to any one of claims 1 to 10 is implemented.
12. A computer-readable medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the message forwarding method according to any one of claims 1 to 10 is implemented.
13. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the message forwarding method according to any one of claims 1 to 10 is implemented.