FDB message management method, device and equipment

Through the FDB message management state machine and the timed batch generation solution, the problem of excessive FDB messages caused by port oscillation in network devices is solved, and the number of FDB messages is effectively compressed, which improves the performance of network devices and the reliability of FDB functions.

CN119788625APending Publication Date: 2025-04-08YUNHE ZHIWANG (SHANGHAI) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411851396.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

Port oscillation in network equipment causes too many FDB messages, occupying a large number of computing and storage resources, affecting the performance and service quality of network equipment.

Method used

FDB messages are compressed and merged through the FDB message management state machine. Each FDB table entry has at most one FDB message, and FDB messages are generated in batches using a timed batch generation scheme.

Benefits of technology

Effectively compress the number of FDB messages, reduce system burden, ensure the reliability of FDB functions, and improve the performance of network equipment in port oscillation scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788625A_ABST
    Figure CN119788625A_ABST
Patent Text Reader

Abstract

The present invention discloses an FDB message management method, device and equipment, the method comprising the following steps: in each FDB message notification processing process: detecting a new FDB message input; after detecting the FDB message data, storing the FDB message in a shared memory used for communication; wherein, in the shared memory area, each FDB table item has at most one FDB message. The present invention designs two efficient management mechanisms for FDB messages, one scheme is to effectively merge and compress FDB messages through an FDB message management state machine, and each FDB table has at most one FDB message; the other is a FDB message timing batch generation mechanism, which adopts a scheme of batch publishing FDB messages; after the FDB message is published, a snapshot of the FDB data is recorded, and when the message is published next time, an FDB message is generated based on the comparison of the FDB snapshot data with the FDB current data. Both schemes can effectively compress the number of FDB messages and improve the reliability of the FDB function.
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 an FDB message management method, device and equipment. Background Art

[0002] Network equipment consists of two parts: software system and hardware system. The two systems work together to complete specific network functions. The hardware system of network equipment consists of forwarding chips, FPGA, power supply, fan, etc. The software system of network equipment is usually implemented in a layered architecture, which is divided into network operating system layer, product adaptation layer, SDK layer, etc. The SDK software layer is responsible for the implementation of the operation interface of the forwarding chip or other hardware components, the product adaptation layer realizes the adaptation work between the network operating system application model and the forwarding chip model, and the network operating system NOS layer is responsible for the implementation of specific network protocols and network functions.

[0003] The FDB function manages the FDB table by learning, migrating, and deleting events. After the forwarding chip of the network device learns the local FDB table entry, it notifies the SDK layer, product adaptation layer, and network operating system layer layer by layer. The FDB module of each layer maintains the corresponding FDB data and communicates messages according to the interface agreed upon with the FDB modules of other layers. Common message communication methods include semaphores, message queues, shared memory, pipes, sockets, memory-mapped files, etc. The message notification mechanism of FDB is usually implemented using mechanisms such as message queues or shared memory, and the two tasks interact in the form of producers and consumers. For example Figure 1 As shown, Figure 1 In the software system layered architecture, there are two FDB message notifications involved - the FDB message notification from the SDK layer to the product adaptation layer, and the FDB message notification from the product adaptation layer to the network operating system layer.

[0004] The SDK layer of the software system receives the FDB message from the hardware system, processes the FDB message, and then notifies the product adaptation layer of the FDB message. The product adaptation layer receives the FDB message from the SDK layer, processes the FDB message, and then notifies the network operating system layer of the FDB message.

[0005] Port flapping failure of network devices refers to the frequent switching between up and down states of network interfaces, which directly affects the stability and reliability of network connections. Port flapping can cause unstable network connections or network connection interruptions. Frequent port flapping can also occupy a large amount of computing and storage resources of network devices, resulting in performance degradation of network devices, which in turn affects the service quality of network-borne services.

[0006] Port oscillation is mainly caused by the following reasons: network connection failure, port connection module failure, network device port failure, etc. Network connections are exposed to the outside and may be affected by various external interferences, resulting in a decrease in the signal quality of the network connection transmission, which in turn causes port oscillation. Port connection modules are equipment consumables with a large application volume and have a specific failure probability. Long-term use will inevitably cause port failures. Some port failures are manifested as frequent up and down, which in turn causes port oscillation. Port oscillation may also be caused by reasons such as outdated firmware versions, configuration conflicts, or internal hardware failures of network device ports.

[0007] As the network scale increases, network device port flapping is inevitable. When port flapping occurs, the network status changes frequently, and the device is busy processing various status switching messages, resulting in high CPU usage and large consumption of storage resources.

[0008] Port up triggers FDB learning, and port down triggers FDB flush. If port oscillation occurs, a large number of FDB messages will appear. The number of FDB messages is positively correlated with the number of oscillations. If the frequency of port oscillation is high, the FDB table entry associated with the oscillating port is large, and the network device will generate a large number of FDB message events in a short period of time. A large number of FDB messages require a lot of computing and storage resources to process. If some FDB messages are missed, the correctness of the FDB function after the oscillation will be affected, and thus the status of the network service will be affected. Summary of the invention

[0009] In view of the above problems, the purpose of the embodiments of the present invention is to provide a FDB message management method, device and equipment to improve the above problems.

[0010] An embodiment of the present invention provides a FDB message management method, which includes the following steps:

[0011] During each FDB message notification process:

[0012] Detect incoming new FDB messages;

[0013] After the FDB message data is detected, the FDB message is stored in a shared memory used for communication; wherein, in the shared memory area, each FDB table entry has at most one FDB message.

[0014] Preferably, the format content of the FDB message includes an FDB table item and an FDB message type, and the index is the index of the FDB table item, so as to find the corresponding FDB table item according to the index; the FDB message type corresponds to the state of the FDB message management state machine; the FDB message is compressed and merged through the FDB message management state machine, so that each FDB table item has at most one FDB message.

[0015] Preferably, the FDB message types include NULL state, ADD state, DEL state, and MODIFY state; NULL state indicates that there is no FDB table item in this communication, ADD state indicates that the FDB table item is newly added, DEL state indicates that the FDB table item is deleted, and MODIFY state indicates that the FDB table item is modified; correspondingly, the input events of the FDB message management state machine are defined as add message event add, delete message event del, and modify message event modify;

[0016] In this way, according to the operation mechanism of the FDB message management state machine, a new FDB message state is obtained.

[0017] Preferably, before detecting the input new FDB message, the method further comprises:

[0018] The scheduled batch generation scheme is used to batch generate FDB messages.

[0019] Preferably, a timed batch generation scheme is adopted to batch generate FDB messages, specifically including:

[0020] After each FDB message is published, a FDB data snapshot is generated;

[0021] When the FDB message is currently released, all FDB messages are generated by the FDB message generation state machine according to the FDB snapshot data and the current FDB data.

[0022] Preferably, the FDB message generation state machine has four state definitions: FDB table does not exist, FDB table exists, FDB table output interface remains unchanged, and FDB table output interface changes; correspondingly, there are four FDB event definitions for generating no action none operation, adding message event add, deleting message event del, and modifying message event modify.

[0023] Preferably, the timing value of the timing batch generation scheme is set to 100ms.

[0024] The embodiment of the present invention further provides an FDB message management device, which includes:

[0025] An FDB message detection unit, detecting an input new FDB message;

[0026] The FDB message management unit is used to store the FDB message in a shared memory used for communication after detecting the FDB message data; wherein, in the shared memory area, each FDB table entry has at most one FDB message.

[0027] An embodiment of the present invention further provides an FDB message management device, which includes a memory and a processor. The memory stores a computer program, and the computer program can be executed by the processor to implement the FDB message management method as described above.

[0028] In summary, this embodiment effectively compresses the number of FDB messages so that each FDB table entry has at most one FDB message. After port flapping occurs, the reliability of the FDB function is guaranteed and the greater system burden caused by the FDB function is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] 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.

[0030] Figure 1 It is a network equipment architecture diagram.

[0031] Figure 2 It is a flowchart of the FDB message management method provided by the first embodiment of the present invention.

[0032] Figure 3 This is a working diagram of the FDB message management state machine.

[0033] Figure 4 It is a structural diagram of an FDB message management device provided by the second embodiment of the present invention. DETAILED DESCRIPTION

[0034] 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.

[0035] See also Figure 2 The first embodiment of the present invention provides an FDB message management method, which can be executed by an FDB message management device (hereinafter referred to as a management device), and in particular, is executed by one or more processors in the management device to implement the following method:

[0036] During each FDB message notification process:

[0037] S101, detecting a new FDB message input;

[0038] S102, after detecting the FDB message data, storing the FDB message in a shared memory used for communication; wherein, in the shared memory area, each FDB table entry has at most one FDB message.

[0039] In this embodiment, in order to ensure that each FDB table entry has at most one FDB message, this embodiment provides the following two implementation methods:

[0040] In the first implementation, this embodiment compresses and merges FDB messages through the FDB message management state machine so that each FDB entry has at most one FDB message. This means that if the flapping port is associated with n FDB entries, at most only n FDB messages are notified in one message notification process.

[0041] The format of the FDB message includes an FDB table item and an FDB message type. The index is the index of the FDB table item, so as to find the corresponding FDB table item according to the index. The FDB message type corresponds to the state of the FDB message management state machine. The FDB message type includes the NULL state, the ADD state, the DEL state, and the MODIFY state. The NULL state indicates that there is no FDB table item in this communication, the ADD state indicates that the FDB table item is newly added, the DEL state indicates that the FDB table item is deleted, and the MODIFY state indicates that the FDB table item is modified. Correspondingly, the input events of the FDB message management state machine are defined as the add message event add, the delete message event del, and the modify message event modify.

[0042] In this way, a new FDB message state can be obtained according to the operation mechanism of the FDB message management state machine.

[0043] like Figure 2 As shown, if the initial state is NULL, if the add message event add is detected, it will enter the add message ADD state. Conversely, if the delete message event del is detected in the add message ADD state, it will return to the NULL state. If the initial state is NULL, if the modify message event modify is detected, it will enter the modify message MODIFY state. For other situations, please refer to Figure 2 , the present invention will not be described in detail here.

[0044] In the second implementation, a timed batch generation scheme is used to batch generate FDB messages.

[0045] Specifically, the timer setting of the scheduled batch generation scheme of FDB messages can be flexibly set according to the performance requirements of the system and the specifications of the FDB table items. A recommended value is 100ms. Of course, it can be set according to actual needs, and the present invention does not make specific limitations.

[0046] This embodiment can decouple the reception of FDB messages from the lower layer from the notification of FDB messages to the upper layer. In a message notification cycle, if m*n FDB messages are received from the lower layer, where m is the number of oscillations and n is the number of FDB entries, then at most n FDB messages are notified to the upper layer.

[0047] Since each FDB table entry generates at most one FDB message, the communication method of the FDB message in this embodiment is not limited to any form. The FDB data snapshot is compared with the current FDB data one by one, and the generated FDB event is obtained according to the state machine of Table 1. Since FDB events can be obtained in batches, a batch communication method can be adopted, and this solution can also effectively improve the efficiency of FDB communication.

[0048] The FDB message generation state machine is shown in Table 1. There are four state definitions: FDB table does not exist, FDB table exists, FDB table output interface remains unchanged, and FDB table output interface changes. There are four FDB generation event definitions: no action noneoperation, add message event add, delete message event del, and modify message event modify.

[0049] Table 1

[0050]

[0051] In summary, in order to improve the reliability of large-scale FDB in port flapping scenarios, this embodiment designs two efficient management mechanisms for FDB messages. One solution is to effectively merge and compress FDB messages through the FDB message management state machine, and each FDB table has at most one FDB message; the other is a FDB message timing batch generation mechanism, which adopts a batch release FDB message solution; after the FDB message is released, the FDB data snapshot is recorded, and the next time the message is released, the FDB message is generated based on the comparison of the FDB snapshot data with the FDB current data. Both solutions can effectively compress the number of FDB messages and improve the reliability of the FDB function.

[0052] This embodiment is applicable to the FDB function implementation of the SDK layer and the product adaptation layer of the software system.

[0053] See also Figure 4 The second embodiment of the present invention further provides an FDB message management device, which includes:

[0054] FDB message detection unit 210, detects input new FDB message;

[0055] The FDB message management unit 220 is used to store the FDB message in a shared memory used for communication after detecting the FDB message data; wherein, in the shared memory area, each FDB table entry has at most one FDB message.

[0056] The third embodiment of the present invention further provides an FDB message management device, which includes a memory and a processor. The memory stores a computer program, and the computer program can be executed by the processor to implement the FDB message management method as described above.

[0057] 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.

[0058] 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.

[0059] 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.

[0060] 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.

[0061] 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.

[0062] 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.

[0063] 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.

[0064] 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 FDB message management method, characterized in that: The steps include: During each FDB message notification process: Detect incoming new FDB messages; After the FDB message data is detected, the FDB message is stored in a shared memory used for communication; wherein, in the shared memory area, each FDB table entry has at most one FDB message.

2. The FDB message management method according to claim 1, characterized in that: The format content of the FDB message includes an FDB table item and an FDB message type, and the index is the index of the FDB table item, so as to find the corresponding FDB table item according to the index; the FDB message type corresponds to the state of the FDB message management state machine; the FDB message is compressed and merged through the FDB message management state machine, so that each FDB table item has at most one FDB message.

3. The FDB message management method according to claim 2, characterized in that: FDB message types include NULL state, ADD state, DEL state, and MODIFY state; NULL state indicates that there is no FDB table entry in this communication, ADD state indicates that the FDB table entry is newly added, DEL state indicates that the FDB table entry is deleted, and MODIFY state indicates that the FDB table entry is modified; correspondingly, the input events of the FDB message management state machine are defined as add message event add, delete message event del, and modify message event modify; In this way, according to the operation mechanism of the FDB message management state machine, a new FDB message state is obtained.

4. The FDB message management method according to claim 1, characterized in that: Before detecting incoming new FDB messages, it also includes: The scheduled batch generation scheme is used to batch generate FDB messages.

5. The FDB message management method according to claim 4, characterized in that: The scheduled batch generation scheme is used to batch generate FDB messages, including: After each FDB message is published, a FDB data snapshot is generated; When the FDB message is currently released, all FDB messages are generated by the FDB message generation state machine according to the FDB snapshot data and the current FDB data.

6. The FDB message management method according to claim 5, characterized in that: The FDB message generation state machine has four state definitions: FDB table does not exist, FDB table exists, FDB table output interface remains unchanged, and FDB table output interface changes; correspondingly, there are four FDB event definitions: no operation, add message event add, delete message event del, and modify message event modify.

7. The FDB message management method according to claim 4, characterized in that: The timing value of the scheduled batch generation scheme is set to 100ms.

8. An FDB message management device, characterized in that: include: An FDB message detection unit, detecting an input new FDB message; The FDB message management unit is used to store the FDB message in a shared memory used for communication after detecting the FDB message data; wherein, in the shared memory area, each FDB table entry has at most one FDB message.

9. An FDB message management device, characterized in that: It comprises 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 FDB message management method as claimed in any one of claims 1 to 7.