ECMP fast switching implementation method, device and equipment based on double Hash engines

Through the dual hash engine and alternate hash routing mechanism, the problem of performance degradation in the event of failure of traditional ECMP switching solutions is solved, and the consistency of fast switching and load sharing is achieved, and the reliability and bandwidth utilization of the network are improved.

CN119094441APending Publication Date: 2024-12-06YUNHE ZHIWANG (SHANGHAI) TECHNOLOGY CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411188112.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Traditional ECMP switching solutions cannot achieve fast switching when a failure occurs, and destroy the consistency of load sharing, resulting in a degradation of network performance.

Method used

Using the ECMP fast switching method based on dual hash engine, the forwarding path of packets is calculated through the main hash engine and the standby hash engine, and the standby hash routing mechanism is used to reshare the load after the failure, ensuring that the service is in other available chains. Stay stable on the road.

Benefits of technology

It realizes rapid handover and load sharing in the event of failure while maintaining ECMP member consistency, improving network reliability and bandwidth utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094441A_ABST
    Figure CN119094441A_ABST
Patent Text Reader

Abstract

The invention discloses an ECMP rapid switching implementation method, device and equipment based on double Hash engines, and the method comprises the steps: receiving a message to be forwarded, carrying out the calculation of a first Hash value through a main Hash engine according to the hashkey of the message, carrying out the operation of the first Hash value through a main path selection module corresponding to an ECMP group, and carrying out the calculation of the first Hash value through a main path selection module corresponding to the ECMP group; obtaining a first forwarding path of the message from the all-path member list; judging whether the first forwarding path fails or not; if a fault occurs, calculating the hashkey by using a standby hash engine to obtain a second hash value, and calculating the second hash value by using a standby path selection module to obtain a second forwarding path of the message from an effective path member list; and forwarding the message according to the second forwarding path. According to the invention, on the basis of ensuring the consistency bearing of the ECMP members and protecting the switching efficiency, the service of the fault link can be loaded, shared and borne in other available links.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chips, and in particular to a method, device and equipment for implementing ECMP fast switching based on a dual hash engine. Background Art

[0002] When there are multiple paths to the same destination, applying ECMP (Equal Cost Multiple Path Routing) can achieve network bandwidth increase, load balancing, mutual protection between paths, etc. When the device supports ECMP, the Layer 2 or Layer 3 traffic sent to the destination device can be carried through different paths to achieve load balancing of network links; and when a member link fails, the network can be quickly switched.

[0003] like Figure 1 As shown in the figure, the traffic carried on the ECMP group is evenly distributed on these equal-cost links without considering the difference in link bandwidth. The ECMP algorithm is supported by many routing protocols, such as OSPF, ISIS, EIGRP, BGP, etc. In the network architecture of the data center, the services it carries also widely use ECMP as a load balancing algorithm.

[0004] ECMP, as a load balancing strategy, has been widely used in actual data center networks due to its simple deployment. An important assumption of ECMP is that the network topology is balanced, regular, and fault-free. These assumptions are invalid in practice and will lead to a significant performance degradation. ECMP does not work well in asymmetric networks and will waste bandwidth resources of large bandwidth paths. To address the above problems, WCMP technology was introduced in data center networks.

[0005] WCMP (Weight-Cost Multi-Path Routing) can balance traffic according to the ever-changing network topology and can flexibly carry network services on links in proportion. ECMP is a special case of WCMP, and each forwarding path transmits services in a 1:1 ratio. There are multiple equal-cost paths with different bandwidths to reach the same destination. WCMP can distribute traffic to each path in proportion to the bandwidth.

[0006] like Figure 2 As shown in the figure, after adopting WCMP technology, all channels can share traffic according to bandwidth ratio to further improve channel bandwidth utilization. The state required by WCMP has been supported as part of the standard routing protocol. In the WCMP implementation, WCMP can be implemented in the switch chip that supports ECMP without any modification to the hardware.

[0007] When a link in an equal-cost multi-path fails, load balancing re-calculates the routing of all traffic by default. The ECMP load balancing consistency function implements hash calculation only for traffic on the failed link, without affecting the traffic forwarding path on the normal link. This ensures that when a link fails, the service session on the normal link remains normal.

[0008] like Figure 3 As shown in the figure, when 12 data packets are forwarded on four links, the traffic packets initially allocated to the four links ABCD are shown on the left, and each link evenly distributes the traffic. When the D link fails, after the consistency function of ECMP is enabled, the traffic on the D link is evenly distributed to the remaining three links, and the traffic originally carried by the ABC links remains stable.

[0009] The high reliability of the network is mainly reflected in the fact that the network system can quickly recover from the failure after the communication link or network equipment fails. In the conventional implementation of the forwarding chip, the equivalent multi-path technology is implemented using a dedicated ECMP group. After a member path of the ECMP fails, the service needs to be restored as soon as possible.

[0010] A traditional ECMP switching solution is to remove the failed link from the ECMP group after detecting the failed link, and redistribute the service to other links. This solution cannot achieve fast failover, and it will destroy the consistency of load sharing, and the original normal working traffic will be re-hashed to other links.

[0011] Another traditional ECMP switching solution is to select a normal link to carry the services of the failed link at the control protocol level after detecting a link failure. This solution requires the control protocol level of the network system to trigger fault recovery, and the switching performance cannot be effectively guaranteed. Summary of the invention

[0012] In view of the above problems, the purpose of the embodiments of the present invention is to provide a method, device and equipment for implementing ECMP fast switching based on a dual hash engine to improve the above problems.

[0013] The embodiment of the present invention provides a method for implementing ECMP fast switching based on a dual hash engine, which includes:

[0014] Receiving a message to be forwarded, and after calculating a first hash value by a primary hash engine according to a hash_key of the message, operating the first hash value by a primary path selection module corresponding to the ECMP group to obtain a first forwarding path of the message from a full path member list;

[0015] Determining whether a fault occurs in the first forwarding path;

[0016] If a failure occurs, the backup hash engine is used to calculate the hash_key to obtain a second hash value, and the backup path selection module is used to operate the second hash value to obtain a second forwarding path for the message from the valid path member list;

[0017] The message is forwarded according to the second forwarding path.

[0018] Preferably, in the full path member list, the path table entry of each path member has a path ID associated with the path. After the forwarding chip detects a path failure, it uses the path failure linkage mechanism to set the select switches of all path table entries associated with the path to indicate that the path member has a failure.

[0019] Preferably, the valid path member list used by the backup path selection module is the same as the full path member list used by the main path selection module, except that only the paths whose select switches are not set participate in the path selection; or the path table entries whose select switches are set are removed and the path table entries whose select switches are not set are added to obtain the valid path member list.

[0020] Preferably, in the full path member list, by adding the path ID to the NEXTHOP table item index of the path table item of the path member, after the forwarding path fails, the path failure linkage mechanism is used to set the select switches of all path table items associated with the NEXTHOP table item through the NEXTHOP table item associated with the path to indicate that the path member has failed.

[0021] Preferably, the setting and clearing of the select switch are controlled by a path failure linkage mechanism. After a path failure occurs, the associated select switch is set; after the path failure is restored, the set select switch is cleared.

[0022] Preferably, it also includes:

[0023] The operation of the select switch is controlled by adding a valid bit mark of a software override; wherein, the override can prohibit the operation of the select switch by the path fault linkage mechanism. The first level is to completely shut down the path fault linkage mechanism, and the setting and recovery of the select switch are controlled by the software; the second level is to shut down the recovery of the select switch by the path fault linkage mechanism. The setting of the select switch is set by the path fault linkage mechanism after a fault is detected to quickly recover the faulty service, and the recovery of the select switch is set by the software after detecting that the path has actually been recovered; the third level is to enable all functions of the setting and recovery of the select switch by the path fault linkage mechanism to reduce the interaction with the software, quickly switch after a path failure, and quickly recover after the path is restored.

[0024] Preferably, the main hash engine and the backup hash engine use different hash algorithms and parameters and are implemented in a parallel manner.

[0025] Preferably, the method further comprises: if no failure occurs, forwarding the message according to the first forwarding path.

[0026] The embodiment of the present invention also provides an ECMP fast switching implementation device based on a dual hash engine, which includes:

[0027] A primary path selection unit, configured to receive a message to be forwarded, and after the primary hash engine calculates a first hash value according to a hash_key of the message, the primary path selection module corresponding to the ECMP group operates the first hash value to obtain a first forwarding path of the message from a full path member list;

[0028] A fault judgment unit, used for judging whether a fault occurs in the first forwarding path;

[0029] A backup path selection unit, for, if a failure occurs, using a backup hash engine to calculate the hash_key to obtain a second hash value, using a backup path selection module to operate the second hash value to obtain a second forwarding path for the message from a valid path member list;

[0030] A forwarding unit is used to forward the message according to the second forwarding path.

[0031] An embodiment of the present invention also provides an ECMP fast switching implementation device based on a dual hash engine, which includes a memory and a processor, wherein a computer program is stored in the memory, and the computer program can be executed by the processor to implement the ECMP fast switching implementation method based on the dual hash engine as described above.

[0032] In summary, the present invention introduces a backup hash engine and a backup routing mechanism. After a member path of ECMP fails, the business originally carried by the failed path is re-load-balanced in a new available path using the hash value of the backup hash engine and the backup hash routing mechanism. In this way, the business of the failed link can be load-balanced in other available links while ensuring the consistency of ECMP member carrying and protection switching efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the implementation mode will be briefly introduced below. Obviously, the drawings described below are only some implementation modes of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0034] Figure 1 This is the existing ECMP network architecture diagram.

[0035] Figure 2 This is the existing WCMP network architecture diagram.

[0036] Figure 3 It is a schematic diagram of the consistency function of ECMP technology.

[0037] Figure 4 It is a schematic diagram of the basic load-bearing solution of the ECMP group.

[0038] Figure 5 It is a flow chart of the ECMP fast switching implementation method based on the dual hash engine provided in the first embodiment of the present invention.

[0039] Figure 6 It is a schematic diagram of the principle of the ECMP fast switching implementation method based on the dual hash engine.

[0040] Figure 7 It is a schematic diagram of a parallel solution implemented by a backup hash engine.

[0041] Figure 8 It is a schematic diagram of a fast switching solution achieved by linking failures in the paths.

[0042] Fig. 9 It is a schematic diagram of the scheme for maintaining the path ID in the NEXTHOP table entry.

[0043] Fig.10 It is a structural diagram of an ECMP fast switching implementation device based on a dual hash engine provided in the second embodiment of the present invention. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] Multiple embodiments of the present invention provide a method, device and equipment for implementing ECMP fast switching of a forwarding chip, which can realize reliability protection of ECMP in a data center network and save hardware resources of the forwarding chip.

[0046] To facilitate understanding of the present invention, common terms, relevant standards and protocols related to this embodiment and a basic bearing solution of an ECMP group are first introduced below.

[0047] 1. Common terms

[0048] ECMP——Equal Cost Multiple Path Routing

[0049] WCMP——Weight Cost Multiple Path Routing

[0050] 2. Relevant standards and protocols

[0051] RFC 2991——Multipath Issues in Unicast and Multicast Next-HopSelection

[0052] RFC 2992——Analysis of an Equal-Cost Multi-Path Algorithm

[0053] RFC 4928——Avoiding Equal Cost Multipath Treatment in MPLS Networks

[0054] RFC 6438——Using the IPv6 Flow Label for Equal Cost MultipathRouting and Link Aggregation in Tunnels

[0055] RFC 6754——Protocol Independent Multicast Equal-Cost Multipath(ECMP)Redirect

[0056] RFC 7190——Use of Multipath with MPLS and MPLS Transport Profile (MPLS-TP)

[0057] RFC 7226——Requirements for Advanced Multipath in MPLS Networks

[0058] RFC 7325——MPLS Forwarding Compliance and PerformanceRequirementsRFC 7424——Mechanisms for Optimizing Link Aggregation Group(LAG)and Equal-Cost Multipath(ECMP)Component Link Utilization in Networks

[0059] 3. Basic load-bearing solution of ECMP group

[0060] like Figure 4 As shown in the figure, the basic load-bearing scheme of the ECMP group is that the hash engine uses the hash_key of the message to calculate the hash_value, and then obtains the forwarding path selected by the message through the operation of the path_selection module corresponding to the ECMP group. The selected_path finds the corresponding path_x from the ECMP member array, and uses the nexthop_y path corresponding to path_x to forward the message, thereby finally completing the load sharing of traffic forwarding.

[0061] Based on the above basic load-bearing solution, please refer to Figure 5 The first embodiment of the present invention provides a method for implementing ECMP fast switching based on a dual hash engine, which includes:

[0062] S101, receiving a message to be forwarded, and after the primary hash engine calculates a first hash value according to the hash_key of the message, the primary path selection module corresponding to the ECMP group operates the first hash value to obtain a first forwarding path of the message from a full path member list.

[0063] S102: Determine whether a fault occurs in the first forwarding path.

[0064] S103, if a failure occurs, the backup hash engine is used to calculate the hash_key to obtain a second hash value, and the backup path selection module is used to operate the second hash value to obtain a second forwarding path for the message from the valid path member list;

[0065] S104: forward the message according to the second forwarding path.

[0066] like Figure 6 As shown, this embodiment adds a select switch in the path table entry. By default, the services carried by ECMP use the decision-making mechanism of the primary path selection module (i.e., primary path selection) to select and forward load-balanced routes. When the forwarding path corresponding to the path fails, the software sets the select switch of the corresponding path table entry; the services originally forwarded by the path use the hash value calculated by the backup hash engine and the backup path selection to select the route in the available paths for further forwarding of the message.

[0067] The member list of the active path selection module includes all path members, including members with failed paths and members with valid paths, so as to maintain the consistency of hash routing. The member list of the standby path selection module (i.e., path selection 2) only includes members with valid paths, and uses the standby hash engine to reselect paths from all available paths to ensure rapid recovery of the services originally carried by the failed path and uniform load sharing.

[0068] In this embodiment, the algorithms of the primary hash engine (i.e., the primary hash engine) and the backup hash engine (i.e., the backup hash engine) can be flexibly selected and customized. The path selection module uses the hash value calculated by the hash engine and combines the path members to be selected to select the message forwarding path. The mechanisms of the primary path selection module and the backup path selection module can be flexibly customized as needed.

[0069] In this embodiment, after a certain forwarding path fails, the route is reselected, and since the failed path has been excluded from the target member of the route selection, a fast switch after the failure can be achieved. The backup hash engine uses another hash algorithm and parameters. In this embodiment, based on different hash values ​​and new available paths, a new routing mechanism is used to perform load sharing routing again. The new available path retains the original weight attribute, and the failed service can be load shared and carried in the new available path according to the weight, so that this embodiment also supports the application of WCMP.

[0070] For a further understanding of the present invention, some preferred embodiments of the present invention are further described below.

[0071] On the basis of the above embodiments, in a preferred embodiment of the present invention:

[0072] The valid path member list used by the backup path selection module is the same as the all path member list (all path array) used by the main path selection module, except that only the paths whose select switches are not set participate in the path selection; or the path table entries whose select switches are set are removed and the path table entries whose select switches are not set are added to obtain the valid path member list (new available path array).

[0073] In this embodiment, the valid path member list used by the backup path selection module can be the same as the full path member list used by the main path selection module, except that only the paths with unset select switches participate in path selection; or a separate copy of the table entry can be made, the path table entry with set select switches removed, and the path table entry with unset select switches added.

[0074] The backup hash engine can be implemented in a serial solution or in a parallel solution. To improve the forwarding processing efficiency, this embodiment considers implementing the backup hash engine in a parallel solution, so that the delay introduced by the backup hash engine can be ignored. Figure 7 shown.

[0075] On the basis of the above embodiments, in a preferred embodiment of the present invention:

[0076] In the full path member list, each path member's path table entry has a path ID associated with the path. After the forwarding chip detects a path failure, it uses the path failure linkage mechanism to set the select switches of all path table entries associated with the path to indicate that the path member has a failure.

[0077] In order to further improve the efficiency of fault switching, this embodiment introduces the path failure linkage mechanism of ECMP. Figure 8 As shown, a path ID associated with the forwarding path is added to the path table item. After the forwarding chip detects a path failure, the path failure linkage mechanism is used to set the select switches of all PATH table items associated with the path, select the forwarding path of the backup hash engine and the backup path selection module, and continue to forward and share the business.

[0078] Similarly, the valid path member list used by the backup path selection module can be the same as the full path member list used by the main path selection module, except that only the paths where the select switch is not set participate in the path selection; or a separate copy of the table entry can be made, which requires software participation to remove the path table entry with the select switch set and add the path table entry where the select switch is not set.

[0079] On the basis of the above embodiments, in a preferred embodiment of the present invention:

[0080] In the full path member list, by adding the path ID to the NEXTHOP table item index of the path table item of the path member, after the forwarding path fails, the path failure linkage mechanism is used to set the select switches of all path table items associated with the NEXTHOP table item through the NEXTHOP table item associated with the path to indicate that the path member has failed.

[0081] Based on the above embodiment, since adding a path ID to the path table entry will consume more forwarding table entry resources, it is considered to reuse the NEXTHOP table entry index of the path table entry and add the path ID to the NEXTHOP table entry to respond to the linkage of path failures. Fig. 9 As shown, after a forwarding path fails, the path failure linkage mechanism is used to set the select switches of all path table items associated with the NEXTHOP table item through the NEXTHOP table item associated with the path.

[0082] The path ID can expand the path type and enhance the forwarding chip's refined control over the forwarding path. Similarly, if the path is defined at the PORT level, the path ID can be simply implemented as PORT_ID. When the forwarding path connected to the PORT fails, the PORT_ID is used to link the failure with the NEXTHOP table entry or path table entry.

[0083] A more flexible practical solution is that the setting and clearing of the select switch can be controlled by the path linkage mechanism. After a path failure, the associated select switch is set; after the path failure is restored, the set select switch is cleared.

[0084] Furthermore, to avoid the problem of path oscillation, e.g. Figure 8 and Fig. 9As shown, a valid bit mark of software override is added. Override can prohibit the operation of the fault linkage mechanism on the select switch. Specifically, the first level is to completely shut down the path fault linkage mechanism, and the setting and recovery of the select switch are controlled by software; the second level can be to shut down the recovery of the select switch by the path fault linkage mechanism. The setting of the select switch can be set by the path fault linkage mechanism after the fault is detected to quickly recover the faulty service. The recovery of the select switch is set by the software after detecting that the path has been effectively recovered; the third level is to enable all functions of the path fault linkage mechanism to set and recover the select switch, which can reduce the interaction with the software, quickly switch after the path fails, and quickly recover after the path is restored.

[0085] See also Fig.10 The second embodiment of the present invention further provides an ECMP fast switching implementation device based on a dual hash engine, which includes:

[0086] The primary path selection unit 210 is used to receive a message to be forwarded, and after the primary hash engine calculates a first hash value according to the hash_key of the message, the primary path selection module corresponding to the ECMP group operates the first hash value to obtain a first forwarding path of the message from the full path member list;

[0087] A fault judgment unit 220, configured to judge whether a fault occurs in the first forwarding path;

[0088] A backup path selection unit 230, for, if a failure occurs, using a backup hash engine to calculate the hash_key to obtain a second hash value, using a backup path selection module to operate the second hash value to obtain a second forwarding path for the message from a valid path member list;

[0089] The forwarding unit 240 is configured to forward the message according to the second forwarding path.

[0090] The third embodiment of the present invention also provides an ECMP fast switching implementation device based on a dual hash engine, which includes a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement the forwarding chip ECMP fast switching implementation method as described above.

[0091] In several embodiments provided in the embodiments of the present invention, it should be understood that the disclosed apparatus and method can also be implemented in other ways. The apparatus and method embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the apparatus, method and computer program product according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0092] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0093] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, an electronic device, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk. It should be noted that, in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such a process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.

[0094] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0095] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0096] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0097] The "first\second" mentioned in the embodiments is only to distinguish similar objects, and does not represent a specific order for the objects. It is understandable that the "first\second" can be interchanged with the specific order or sequence where permitted. It should be understood that the objects distinguished by "first\second" can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than those illustrated or described herein.

[0098] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for implementing ECMP fast switching based on a dual hash engine, characterized in that: include: Receiving a message to be forwarded, and after calculating a first hash value by a primary hash engine according to a hash_key of the message, operating the first hash value by a primary path selection module corresponding to the ECMP group to obtain a first forwarding path of the message from a full path member list; Determining whether a fault occurs in the first forwarding path; If a failure occurs, the backup hash engine is used to calculate the hash_key to obtain a second hash value, and the backup path selection module is used to operate the second hash value to obtain a second forwarding path for the message from the valid path member list; The message is forwarded according to the second forwarding path.

2. The ECMP fast switching implementation method based on the dual hash engine according to claim 1 is characterized in that: In the full path member list, each path member's path table entry has a path ID associated with the path. When the forwarding chip detects a path failure, it uses the path failure linkage mechanism to set the select switches of all path table entries associated with the path to indicate that the path member has a failure.

3. The ECMP fast switching implementation method based on the dual hash engine according to claim 1 is characterized in that: The valid path member list used by the backup path selection module is the same as the full path member list used by the main path selection module, except that only the paths with unset select switches participate in path selection; or the path table entries with set select switches are removed and the path table entries with unset select switches are added to obtain the valid path member list.

4. The ECMP fast switching implementation method based on a dual hash engine according to claim 1, characterized in that: In the full path member list, by adding the path ID to the NEXTHOP table item index of the path table item of the path member, after the forwarding path fails, the path failure linkage mechanism is used to set the select switches of all path table items associated with the NEXTHOP table item through the NEXTHOP table item associated with the path to indicate that the path member has failed.

5. The ECMP fast switching implementation method based on the dual hash engine according to claim 2 or 4, characterized in that: The setting and clearing of the select switch are controlled by the path failure linkage mechanism. After a path failure, the associated select switch is set; After the path failure is restored, clear the set select switch.

6. The ECMP fast switching implementation method based on the dual hash engine according to claim 5 is characterized in that: Also includes: The operation of the select switch is controlled by adding a valid bit mark of a software override; wherein, the override can prohibit the operation of the select switch by the path fault linkage mechanism. The first level is to completely shut down the path fault linkage mechanism, and the setting and recovery of the select switch are controlled by the software; the second level is to shut down the recovery of the select switch by the path fault linkage mechanism. The setting of the select switch is set by the path fault linkage mechanism after a fault is detected to quickly recover the faulty service, and the recovery of the select switch is set by the software after detecting that the path has actually been recovered; the third level is to enable all functions of the setting and recovery of the select switch by the path fault linkage mechanism to reduce the interaction with the software, quickly switch after a path failure, and quickly recover after the path is restored.

7. The ECMP fast switching implementation method based on a dual hash engine according to claim 1, characterized in that: The main hash engine and the backup hash engine use different hash algorithms and parameters and are implemented in a parallel manner.

8. The ECMP fast switching implementation method based on a dual hash engine according to claim 1, characterized in that: Also includes: If no failure occurs, the message is forwarded according to the first forwarding path.

9. An ECMP fast switching implementation device based on a dual hash engine, characterized in that: include: A primary path selection unit, configured to receive a message to be forwarded, and after the primary hash engine calculates a first hash value according to a hash_key of the message, the primary path selection module corresponding to the ECMP group operates the first hash value to obtain a first forwarding path of the message from a full path member list; A fault judgment unit, used for judging whether a fault occurs in the first forwarding path; A backup path selection unit, for, if a failure occurs, using a backup hash engine to calculate the hash_key to obtain a second hash value, using a backup path selection module to operate the second hash value to obtain a second forwarding path for the message from a valid path member list; A forwarding unit is used to forward the message according to the second forwarding path.

10. An ECMP fast switching implementation device based on a dual hash engine, characterized in that: It includes a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement the ECMP fast switching implementation method based on a dual hash engine as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Data transmission method and device based on VXLAN, storage medium and electronic equipment

    CN120342952A

  • High-performance file hash calculation method based on double-engine self-adaptive switching

    CN121009058A

  • A high-performance file hash calculation method based on double-engine adaptive switching

    CN121009058B