Method, apparatus and computer program product for equalizing multipath members
By dynamically adjusting ECMP group templates and resource allocation, the problem of wasted hardware resources caused by uneven distribution of ECMP group members was solved, achieving efficient utilization of hardware resources and improved network scalability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD
- Filing Date
- 2026-03-02
- Publication Date
- 2026-07-07
AI Technical Summary
In existing technologies, the uneven number of ECMP Group members leads to low hardware resource utilization, serious memory waste, lack of flexibility, and inability to dynamically adjust resource allocation according to actual needs.
By detecting updates to members within an ECMP group, quantity information is obtained and the ECMP group template is dynamically adjusted. ECMP Group templates of different sizes are designed, including small, medium, and large templates. Appropriate table structures and SRAM space are dynamically selected according to actual needs to achieve refined resource management.
It improved the utilization of hardware resources, reduced memory waste, enhanced network scalability and overall device resource utilization, reduced operating costs and power consumption, and maintained load balancing performance.
Smart Images

Figure CN122348901A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of transmission and bearer technology, and in particular to an equivalent multipath membership adjustment method, apparatus, device, and computer program product. Background Technology
[0002] The forwarding chips used in programmable white-box devices employ Equal-Cost Multi-Path (ECMP) for path selection in network load balancing. To handle various scenarios involving load balancing across multiple equal-cost paths, ECMP groups are typically designed to contain a maximum of 32 members. However, in real-world applications, the vast majority of ECMP groups have far fewer members than this maximum. Due to significant imbalances in ECMP member allocation, this maximized design leads to overuse of Static Random-Access Memory (SRAM), wasted memory space, and low hardware resource utilization. Summary of the Invention
[0003] This application provides an equivalent multipath member adjustment method, apparatus, device, and computer program product, which can improve the utilization of hardware resources and reduce memory space waste.
[0004] The technical solution of this application embodiment is implemented as follows: This application provides an equivalent multipath membership adjustment method, the method comprising: If an update is detected in the stored first ECMP group, the first quantity information corresponding to the members in the first ECMP group before the update and the second quantity information corresponding to the members in the first ECMP group after the update are obtained respectively. If, based on the first quantity information, it is determined that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, and based on the second quantity information, it is determined that the template corresponding to the first ECMP group after the update belongs to the second ECMP group template, then the template corresponding to the first ECMP group after the update is adjusted from the first ECMP group template to the second ECMP group template.
[0005] This application provides an equivalent multipath membership adjustment device, including: The acquisition unit is used to acquire, respectively, the first quantity information of the members in the first ECMP group before the update and the second quantity information of the members in the first ECMP group after the update, when the members in the stored first equivalent multipath ECMP group are detected to be updated. The adjustment unit is configured to adjust the template corresponding to the updated first ECMP group from the first ECMP group template to the second ECMP group template when it is determined from the first quantity information that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, and it is determined from the second quantity information that the template corresponding to the updated first ECMP group belongs to the second ECMP group template.
[0006] This application provides an electronic device, the electronic device comprising: Memory is used to store executable instructions or computer programs. The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the method provided in the embodiments of this application.
[0007] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the equivalent multipath member adjustment method provided in this application.
[0008] The embodiments of this application have the following beneficial effects: When an update is detected in a stored first ECMP group, the system obtains the first quantity information of the members in the first ECMP group before the update and the second quantity information of the members in the first ECMP group after the update. If the first quantity information determines that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, and the second quantity information determines that the template corresponding to the first ECMP group after the update belongs to the second ECMP group template, the system adjusts the template corresponding to the first ECMP group after the update from the first ECMP group template to the second ECMP group template. In other words, when members in the first ECMP group are updated, the system can dynamically adjust the allocated ECMP group template according to the demand (i.e., member quantity information), thereby improving the utilization of hardware resources and reducing the waste of memory space. Attached Figure Description
[0009] Figure 1 A schematic diagram illustrating the memory usage of an exemplary ECMP member, provided for an embodiment of this application; Figure 2 A flowchart illustrating an equivalent multipath member adjustment method provided in an embodiment of this application; Figure 3 A schematic diagram illustrating an exemplary ECMP member entry update process provided for embodiments of this application; Figure 4 This is a schematic diagram illustrating an exemplary optimized ECMP member memory usage in an embodiment of this application. Figure 5 This is a schematic diagram of the structure of an equivalent multipath member adjustment device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0010] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0011] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0012] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. It is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. It should also be noted that the terms "first," "second," etc., used in the embodiments of this application are merely for distinguishing similar objects and do not represent a specific ordering of objects. It is understood that "first," "second," etc., may be interchanged in a specific order or sequence where permissible, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0013] The forwarding chips used in programmable white-box devices employ ECMP for path selection in network load balancing. To handle various scenarios involving load balancing across multiple equal-cost paths, ECMP groups are typically designed to contain a maximum of 32 members. However, in real-world applications, the vast majority of ECMP groups have far fewer members than this maximum, usually less than 8. This significant imbalance in ECMP member allocation leads to excessive SRAM usage, wasted memory space, and low hardware resource utilization. Figure 1 A schematic diagram illustrating the memory usage of an exemplary ECMP member is provided for embodiments of this application; as shown below. Figure 1 As shown, a comparison of SRAM usage, including both effective and ineffective use, reveals significant wasted member space in some ECMP groups. Allocation in ECMP groups with fewer members results in a large proportion of the total SRAM space being wasted, leading to substantial space waste. This results in several consequences: Hardware resource constraints: As the network scale expands and the traffic volume increases, the resources on the programmable forwarding chip (especially the table space and SRAM) gradually become scarce, making it difficult to support more network functions and services.
[0014] Lack of flexibility: ECMP Groups are configured to a fixed size. Even an ECMP Group with only 5 members must occupy the space of 32 members. This configuration method lacks flexibility and cannot dynamically adjust resource allocation according to actual needs.
[0015] Therefore, it is necessary to optimize based on actual network conditions and rationally allocate ECMP Group resources to reduce hardware resource waste and improve forwarding efficiency. In view of this, embodiments of this application propose an equivalent multipath member adjustment method, apparatus, device, and computer program product, aiming to improve hardware resource utilization and reduce unnecessary waste through dynamic resource allocation and refined management.
[0016] This application provides an equivalent multipath member adjustment method. Figure 2 This is a flowchart illustrating an equivalent multipath membership adjustment method provided in an embodiment of this application; as shown below. Figure 2 As shown, the method includes: S201. When it is detected that the members in the stored first ECMP group have been updated, the first quantity information corresponding to the members in the first ECMP group before the update and the second quantity information corresponding to the members in the first ECMP group after the update are obtained respectively.
[0017] It should be noted that equivalent multipath members can be understood as ECMP members, that is, members within an ECMP group. Each member within an ECMP group represents multiple member links leading to the same destination address.
[0018] It should be noted that the stored first ECMP group can be understood as the ECMP group after ECMP group templates have been assigned according to members. Detecting an update to members within the stored first ECMP group can be understood as detecting the addition or deletion of members within the stored first ECMP group. The first quantity information can be understood as the quantity information of members in the first ECMP group before the update (i.e., the original first ECMP group); the second quantity information can be understood as the quantity information of members in the first ECMP group after the update (adding or deleting members). The specific values of the first and second quantity information can be determined according to the actual situation and are not limited here.
[0019] S202. If, based on the first quantity information, it is determined that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, and based on the second quantity information, it is determined that the template corresponding to the first ECMP group after the update belongs to the second ECMP group template, the template corresponding to the first ECMP group after the update is adjusted from the first ECMP group template to the second ECMP group template.
[0020] It should be noted that both the first and second ECMP group templates originate from preset ECMP group templates, but they are not identical. Preset ECMP group templates include three types: Type 1, Type 2, and Type 3. Type 1 ECMP group templates can accommodate fewer members than Type 2 templates, and vice versa. In practical applications, Type 1 ECMP group templates can be considered small, Type 2 medium, and Type 3 large. The specific number of members each type can accommodate is determined based on actual circumstances and is not limited here. As an example, Type 1 ECMP group templates can accommodate a maximum of 8 members, Type 2 templates a maximum of 16 members, and Type 3 templates a maximum of 32 members.
[0021] It should be noted that, if the template corresponding to the first ECMP group before the update is determined to be a first ECMP group template based on the first quantity information, and the template corresponding to the first ECMP group after the update is determined to be a second ECMP group template based on the second quantity information, then adjusting the template corresponding to the first ECMP group after the update from a first ECMP group template to a second ECMP group template can be understood as follows: if the members in the first ECMP group are updated to be deleted, and the template corresponding to the first ECMP group before the update is determined to be a second type ECMP group template (i.e., the first ECMP group template) based on the first quantity information (i.e., the number of members in the first ECMP group before the update is 9), and the template corresponding to the first ECMP group after the update is determined to be a first type ECMP group template (i.e., the second ECMP group template) based on the second quantity information (i.e., the number of members in the first ECMP group after the update is 7), then adjusting the template corresponding to the first ECMP group after the update from a first ECMP group template (i.e., a second type ECMP group template) to a second ECMP group template (a first type ECMP group template). For example, if the number of members in the stored first ECMP group is updated from 9 to 7, the template of the assigned first ECMP group is changed from the second type ECMP group template to the first type ECMP group template.
[0022] It should be noted that after the updated template for the first ECMP group is adjusted to the template for the second ECMP group, it can be used for data transmission.
[0023] The solution in this application embodiment obtains first quantity information of the members in the first ECMP group before the update and second quantity information of the members in the first ECMP group after the update when an update is detected in the stored first ECMP group. If it is determined from the first quantity information that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, and from the second quantity information that the template corresponding to the first ECMP group after the update belongs to the second ECMP group template, the template corresponding to the updated first ECMP group is adjusted from the first ECMP group template to the second ECMP group template. That is, when the members in the first ECMP group are updated, the allocated ECMP group template can be dynamically adjusted according to the demand (i.e., member quantity information), thereby improving the utilization of hardware resources and reducing the waste of memory space.
[0024] In this embodiment of the application, the method further includes: when a second ECMP group is detected to be added, obtaining third quantity information corresponding to the members in the second ECMP group; selecting a third ECMP group template corresponding to the second ECMP group from a preset ECMP group template according to the third quantity information; and configuring the template corresponding to the second ECMP group as the third ECMP group template.
[0025] It should be noted that the second ECMP group is different from the first ECMP group. The third quantity information can be understood as the quantity information corresponding to the members within the newly added second ECMP group. The specific value of the third quantity information can be determined according to the actual situation and is not limited here. The third ECMP group template can be understood as an ECMP template assigned based on the third quantity information. Selecting the third ECMP group template corresponding to the second ECMP group from the preset ECMP group templates based on the third quantity information can be illustrated as follows: if the third quantity information has 7 members, the third ECMP group template corresponding to the second ECMP group is a first-type ECMP group template; or, if the third quantity information has 9 members, the third ECMP group template corresponding to the second ECMP group is a second-type ECMP group template; or, if the third quantity information has 18 members, the third ECMP group template corresponding to the second ECMP group is a third-type ECMP group template. Configuring the template corresponding to the second ECMP group as the third ECMP group template can be understood as configuring the third ECMP group template for the newly added second ECMP group.
[0026] The solution in this application embodiment, upon detecting the addition of a second ECMP group, dynamically configures the ECMP group template based on the third quantity information corresponding to the members within the second ECMP group, ensuring optimal resource utilization.
[0027] In this embodiment of the application, the method further includes: acquiring traffic data; extracting link information from the traffic data; and detecting whether members in the first ECMP group are updated and / or added to the second ECMP group based on the link information.
[0028] It should be noted that the acquired traffic data can be obtained in real time. Extracting link information from traffic data can be understood as extracting different link information to the target address (which can be one or more) from the real-time acquired traffic data, and detecting whether the members in the first ECMP group are updated and / or added to the second ECMP group based on the link information.
[0029] The solution in this application embodiment can dynamically adjust the size of ECMP member groups based on real-time traffic monitoring, and improve the utilization rate of hardware resources and reduce unnecessary waste through dynamic resource allocation and refined management.
[0030] In this embodiment of the application, the method further includes: when it is determined from the first quantity information that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, and when it is determined from the second quantity information that the template corresponding to the first ECMP group after the update belongs to the first ECMP group template, the template corresponding to the first ECMP group after the update is not adjusted.
[0031] It should be noted that if, based on the first quantity information, it is determined that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, and based on the second quantity information, it is determined that the template corresponding to the first ECMP group after the update belongs to the first ECMP group template, then the template corresponding to the first ECMP group after the update will not be adjusted. For example, if the first quantity information is 7 and the second quantity information is 6, then the template corresponding to the first ECMP group is determined to be the first ECMP group template (i.e., the first type of ECMP group template), and the template corresponding to the first ECMP group after the update also belongs to the first ECMP group template (i.e., the first type of ECMP group template), then the template corresponding to the first ECMP group after the update will not be adjusted.
[0032] The solution in this application embodiment can dynamically select the most suitable ECMP group template based on the actual number of members required, saving unnecessary memory usage and avoiding affecting the overall efficiency of the hardware.
[0033] In this embodiment of the application, the method further includes: releasing memory space when it is determined from the first quantity information that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, and from the second quantity information that the template corresponding to the first ECMP group after the update belongs to the first ECMP group template, and the first quantity information is greater than the second quantity information; the memory space is the memory space corresponding to the member that is the difference between the first quantity information and the second quantity information.
[0034] It should be noted that if, based on the first quantity information, it is determined that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, and based on the second quantity information, it is determined that the template corresponding to the first ECMP group after the update belongs to the first ECMP group template, and the first quantity information is greater than the second quantity information, then the memory space is released. For example, if the first quantity information is 7 and the second quantity information is 6, then if it is determined that the first ECMP group template is the first ECMP group template (i.e., the first type of ECMP group template), and it is determined that the template corresponding to the first ECMP group after the update also belongs to the first ECMP group template (i.e., the first type of ECMP group template), then the memory space corresponding to the member (i.e., a certain member) that differs between the first quantity information and the second quantity information is released.
[0035] In the solution of this application embodiment, when the number of ECMP group members decreases, the control plane automatically releases excess memory space, saving hardware resources.
[0036] To facilitate understanding, the above method is illustrated with an example. The equivalent multipath member adjustment method described above can be used as an example to illustrate the dynamic configuration optimization method for ECMP members of programmable chips. A detailed explanation follows.
[0037] By designing ECMP Group templates of different sizes: Analysis of real-world usage scenarios reveals that most ECMP Groups actually have a relatively small number of members. Therefore, different sizes of ECMP Group templates are designed. For example, small ECMP Groups (maximum 8 members), medium ECMP Groups (maximum 16 members), and large ECMP Groups (maximum 32 members). This hierarchical design allows for dynamic selection of appropriate table structures and SRAM space based on the actual needs of the ECMP Group, saving unnecessary memory usage and avoiding impacting overall hardware efficiency.
[0038] Dynamic adjustment mechanism: When a member changes significantly after selecting an ECMP Group template during table entry configuration, the allocated ECMP Group template is dynamically adjusted based on the actual number of members required, ensuring optimal resource utilization.
[0039] Figure 3 A schematic diagram illustrating an exemplary ECMP member table entry update process provided in this application embodiment; as shown Figure 3 As shown, this includes the control plane application programming interface (API) and the data plane (P4). The specific steps are as follows: 1. Add or modify ECMP groups and their members.
[0040] 2. Configure the ECMP group template according to the number of members.
[0041] 3. Generate ECMP group member entries.
[0042] 4. Check if the issued Group ID exists.
[0043] 5. If it exists, call the Barefoot Runtime (BFRT) API to revise the interface and add the following table item.
[0044] 6. If it does not exist, call the BFRT API to add a new interface and add a table entry.
[0045] 7. Confirm that the form entries have been updated.
[0046] Optimized table structure: Utilizes a compact SRAM memory usage design to reduce the storage space occupied by each ECMP member. By optimizing the table structure, the storage requirements of ECMP Groups are reduced, alleviating SRAM resource pressure. Combined with an efficient hash algorithm, traffic distribution is optimized, maintaining traffic balance while minimizing deployment tablespace. Compact memory usage. Figure 4 A schematic diagram illustrating the memory usage of an exemplary optimized ECMP member is provided for embodiments of this application, as shown below. Figure 4 As shown, it includes 32 member templates, 16 member templates, and 8 member templates.
[0047] Compressed Table Design: Table compression technology is introduced to retain only essential forwarding information while removing infrequently used or invalid fields, thus reducing the size of each table entry. In scenarios where most ECMP Groups have a small number of members, this optimization can free up a significant amount of SRAM space.
[0048] Flexible entry management and update mechanism: Through the API and other interfaces of the programmable chip, the control plane can efficiently manage the ECMPGroup, flexibly add or delete members, and update the entry configuration in a timely manner to maintain real-time dynamic optimization of the table structure.
[0049] API enables dynamic entry updates: By utilizing the API provided by the programmable chip, the control plane can modify and update entries in the ECMP Group in real time, ensuring that adjustments to the size of the ECMP Group do not affect forwarding performance.
[0050] Redundant space release: When the number of ECMP Group members decreases, the control plane automatically releases excess memory space, saving hardware resources.
[0051] The solution in this application improves resource utilization by dynamically adjusting the size of ECMP Group entries, saving a significant amount of unnecessary memory allocation, especially when most ECMP Groups have only a small number of members in actual business applications. This allows SRAM resources to be more rationally allocated to other entries or functions, increasing the overall resource utilization of the device.
[0052] Enhanced network scalability, by reducing wasted memory and hardware resource consumption, allows devices to support more ECMP groups or other functions, such as Quality of Service (QoS) policies and system access control list (ACL) rules. This improves network scalability, allowing more users or traffic to connect without worrying about hardware resource constraints.
[0053] Flexible load balancing and traffic management maintain ECMP load balancing performance while dynamically adjusting ECMP Group size. Optimized ECMP Groups can distribute traffic more efficiently based on the actual number of members, reducing potential traffic skew issues.
[0054] Reduced operating costs and optimized use of hardware resources reduce reliance on high-capacity SRAM, lower device design and operating costs, and reduce device power consumption and maintenance complexity.
[0055] This application provides an equivalent multipath membership adjustment device. Figure 5 This is a schematic diagram of the structure of an equivalent multipath membership adjustment device provided in an embodiment of this application; as shown below. Figure 5 As shown, the equivalent multipath membership adjustment device 500 includes: The acquisition unit 501 is used to acquire, respectively, the first quantity information of the members in the first ECMP group before the update and the second quantity information of the members in the first ECMP group after the update when it is detected that the members in the stored first ECMP group have been updated. The adjustment unit 502 is used to adjust the template corresponding to the updated first ECMP group from the first ECMP group template to the second ECMP group template when it is determined from the first quantity information that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template and from the second quantity information that the template corresponding to the updated first ECMP group belongs to the second ECMP group template.
[0056] In some embodiments, the equivalent multipath member adjustment device 500 further includes a configuration unit, configured to, upon detecting the addition of a second ECMP group, obtain third quantity information corresponding to the members in the second ECMP group; select a third ECMP group template corresponding to the second ECMP group from a preset ECMP group template according to the third quantity information; and configure the template corresponding to the second ECMP group as the third ECMP group template.
[0057] In some embodiments, the equivalent multipath membership adjustment device 500 further includes a detection unit for acquiring traffic data; extracting link information from the traffic data; and detecting whether members in the first ECMP group are updated and / or a second ECMP group is added based on the link information.
[0058] In some embodiments, the adjustment unit 502 is further configured to not adjust the template corresponding to the updated first ECMP group when it is determined from the first quantity information that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, and it is determined from the second quantity information that the template corresponding to the updated first ECMP group belongs to the first ECMP group template.
[0059] In some embodiments, the equivalent multipath member adjustment device 500 further includes a release unit, configured to release memory space when, based on the first quantity information, it is determined that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, based on the second quantity information, it is determined that the template corresponding to the first ECMP group after the update belongs to the first ECMP group template, and the first quantity information is greater than the second quantity information; the memory space is the memory space corresponding to the member that differs between the first quantity information and the second quantity information.
[0060] In some embodiments, the preset ECMP group template includes a first type of ECMP group template, a second type of ECMP group template, and a third type of ECMP group template; the first type of ECMP group template can accommodate fewer members than the second type of ECMP group template; the second type of ECMP group template can accommodate fewer members than the third type of ECMP group template.
[0061] In some embodiments, the first ECMP group template is a first type of ECMP group template, or a second type of ECMP group template, or a third type of ECMP group template; the second ECMP group template is the first type of ECMP group template, or a second type of ECMP group template, or the third type of ECMP group template; the first ECMP group template and the second ECMP group template are not the same.
[0062] This application also provides an electronic device. Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; as shown below. Figure 6 As shown, the electronic device 600 includes a processor 601 and a memory 603. Optionally, the electronic device 600 may also include a communication bus 602.
[0063] In specific embodiments, the processor 601 described above can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), CPU, controller, microcontroller, and microprocessor. It is understood that for different devices, the electronic device used to implement the above processor function can also be other types, and this embodiment does not specifically limit it.
[0064] In this embodiment, the communication bus 602 is used to realize the connection communication between the processor 601 and the memory 603; when the processor 601 executes the running program stored in the memory 603, it implements the following equivalent multipath member adjustment method: If an update is detected in the stored members of the first ECMP group, the first quantity information corresponding to the members in the first ECMP group before the update and the second quantity information corresponding to the members in the first ECMP group after the update are obtained respectively. If it is determined from the first quantity information that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, and it is determined from the second quantity information that the template corresponding to the first ECMP group after the update belongs to the second ECMP group template, the template corresponding to the first ECMP group after the update is adjusted from the first ECMP group template to the second ECMP group template.
[0065] Furthermore, the processor 601 is also configured to, upon detecting the addition of a second ECMP group, obtain third quantity information corresponding to the members within the second ECMP group; select a third ECMP group template corresponding to the second ECMP group from a preset ECMP group template based on the third quantity information; and configure the template corresponding to the second ECMP group as the third ECMP group template.
[0066] Furthermore, the processor 601 is also used to acquire traffic data; extract link information from the traffic data; and detect whether the members in the first ECMP group are updated and / or added to the second ECMP group based on the link information.
[0067] Furthermore, the processor 601 is also configured to not adjust the template corresponding to the updated first ECMP group when it is determined from the first quantity information that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, and the template corresponding to the updated first ECMP group after the update belongs to the first ECMP group template.
[0068] Furthermore, the processor 601 is also configured to release memory space when, based on the first quantity information, it is determined that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, based on the second quantity information, it is determined that the template corresponding to the first ECMP group after the update belongs to the first ECMP group template, and the first quantity information is greater than the second quantity information; the memory space is the memory space corresponding to the member that differs between the first quantity information and the second quantity information.
[0069] Furthermore, the preset ECMP group template includes a first type of ECMP group template, a second type of ECMP group template, and a third type of ECMP group template; the first type of ECMP group template can accommodate fewer members than the second type of ECMP group template; the second type of ECMP group template can accommodate fewer members than the third type of ECMP group template.
[0070] Furthermore, the first ECMP group template is a first type of ECMP group template, or a second type of ECMP group template, or a third type of ECMP group template; the second ECMP group template is a first type of ECMP group template, or a second type of ECMP group template, or the third type of ECMP group template; the first ECMP group template and the second ECMP group template are different.
[0071] This application provides a storage medium storing a computer program thereon. The computer-readable storage medium stores one or more programs, which can be executed by one or more processors. The computer program implements the equivalent multipath membership adjustment method described above.
[0072] Based on the above embodiments, this application provides a computer program product, including a computer program that can be executed by one or more processors, and the computer program implements the equivalent multipath member adjustment method as described above.
[0073] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0074] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause an image display device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this disclosure.
[0075] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. An equivalent multipath member adjustment method, characterized in that, The method includes: If an update is detected in the stored first equivalent multipath ECMP group, the first quantity information corresponding to the members in the first ECMP group before the update and the second quantity information corresponding to the members in the first ECMP group after the update are obtained respectively. If, based on the first quantity information, it is determined that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, and based on the second quantity information, it is determined that the template corresponding to the first ECMP group after the update belongs to the second ECMP group template, then the template corresponding to the first ECMP group after the update is adjusted from the first ECMP group template to the second ECMP group template.
2. The method according to claim 1, characterized in that, The method further includes: Upon detecting the addition of a second ECMP group, obtain the third quantity information corresponding to the members within the second ECMP group; Based on the third quantity information, select the third ECMP group template corresponding to the second ECMP group from the preset ECMP group templates; Configure the template corresponding to the second ECMP group as the template of the third ECMP group.
3. The method according to claim 1, characterized in that, The method further includes: Obtain traffic data; Link information is extracted from the traffic data, and the link information is used to detect whether the members in the first ECMP group are updated and / or added to the second ECMP group.
4. The method according to claim 1, characterized in that, The method further includes: If, based on the first quantity information, it is determined that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, and based on the second quantity information, it is determined that the template corresponding to the first ECMP group after the update belongs to the first ECMP group template, then the template corresponding to the first ECMP group after the update will not be adjusted.
5. The method according to claim 1, characterized in that, The method further includes: If, based on the first quantity information, it is determined that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, and based on the second quantity information, it is determined that the template corresponding to the first ECMP group after the update belongs to the first ECMP group template, and the first quantity information is greater than the second quantity information, then memory space is released; the memory space is the memory space corresponding to the member that differs between the first quantity information and the second quantity information.
6. The method according to claim 2, characterized in that, The preset ECMP group templates include a first type of ECMP group template, a second type of ECMP group template, and a third type of ECMP group template; the first type of ECMP group template can accommodate fewer members than the second type of ECMP group template; the second type of ECMP group template can accommodate fewer members than the third type of ECMP group template.
7. The method according to claim 1, characterized in that, The first ECMP group template is a first type of ECMP group template, or a second type of ECMP group template, or a third type of ECMP group template; the second ECMP group template is a first type of ECMP group template, or a second type of ECMP group template, or the third type of ECMP group template; the first ECMP group template and the second ECMP group template are not the same.
8. An equivalent multipath membership adjustment device, characterized in that, The device includes: The acquisition unit is used to acquire, respectively, the first quantity information of the members in the first ECMP group before the update and the second quantity information of the members in the first ECMP group after the update, when the members in the stored first equivalent multipath ECMP group are detected to be updated. The adjustment unit is configured to adjust the template corresponding to the updated first ECMP group from the first ECMP group template to the second ECMP group template when it is determined from the first quantity information that the template corresponding to the first ECMP group before the update belongs to the first ECMP group template, and it is determined from the second quantity information that the template corresponding to the updated first ECMP group belongs to the second ECMP group template.
9. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the method according to any one of claims 1 to 7.
10. A computer program product comprising a computer program or computer-executable instructions, characterized in that, When the computer program or computer-executable instructions are executed by a processor, they implement the method described in any one of claims 1 to 7.