OAM packet sending method, device, network equipment and storage medium
By configuring SCL table entries and loopback interfaces on the pipeline of multi-core architecture chips, the problem of OAM engine packets cannot be edited and transferred correctly is solved, and targeted direct and correct editing of OAM packets is achieved, saving entry resources.
Patent Information
- Application Number
- CN202310382528.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-11
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2043-04-11
AI Technical Summary
In the OAM packet transmission process of multi-core architecture chips, the packets sent by the OAM engine cannot be edited and forwarded correctly.
By configuring different SCL table entries and loopback interfaces on each core pipeline, OAM messages are generated and the loopback interface of the target pipeline is determined. The message is looped back to the incoming processing engine, information is found from the SCL table entries for processing, and edited and forwarded through the adapted SCL table entries.
It realizes targeted direct OAM messages, ensures that messages can be edited and forwarded correctly, saves SCL table entry resources, and improves the packet transmission problems in the prior art.
Smart Images

Figure CN116405579B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to an OAM packet sending method, device, network equipment and storage medium. Background Art
[0002] Carrier-grade Ethernet is a key area of research in current network technology. It must provide robust service management, fault detection, and performance monitoring capabilities, centered around OAM (Operation Administration and Maintenance). OAM offers a range of functions for fault detection, verification, and location, and, in conjunction with APS, ensures carrier-grade handover within 50ms. OAM also enables network performance testing, measuring packet loss, latency, jitter, and other metrics, while also compiling statistics on various types of network traffic.
[0003] L2VPN OAM is a commonly used architecture. It includes multiple MEPs (Maintenance Association End Points). Two MEPs can form an OAM session, implementing OAM functions through different protocols. Currently, in the OAM packet delivery process of multi-core chips, it is common for OAM engines to fail to correctly edit and forward messages. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide an OAM packet sending method, apparatus, network equipment and storage medium, which can improve the situation in the prior art where the messages sent by the OAM engine cannot be correctly edited and forwarded in the OAM packet sending process of a multi-core architecture chip.
[0005] In order to achieve the above objectives, the technical solutions adopted in the embodiments of the present invention are as follows:
[0006] In a first aspect, an embodiment of the present invention provides an OAM packet sending method, which is applied to a chip of a network device, wherein each core of the chip includes an OAM engine and multiple pipelines, each of the pipelines is configured with a different SCL table entry and loopback interface, and the method includes:
[0007] Generate an OAM message through the OAM engine and determine the loopback interface of the target pipeline of the OAM message;
[0008] Forwarding the OAM message to the loopback interface of the target pipeline;
[0009] When the loopback interface of the target pipeline receives the OAM message, looping back the OAM message to the ingress processing engine of the target pipeline;
[0010] Searching, by an inbound processing engine of the target pipeline, for SCL search information of the OAM message from an SCL table entry of the target pipeline;
[0011] The OAM message is processed according to the SCL search information, and the processed OAM message is forwarded to a target maintenance device.
[0012] Furthermore, the step of forwarding the OAM message to the loopback interface of the target pipeline includes:
[0013] Sending the OAM message to a packet receiving pipeline; wherein the packet receiving pipeline is a pipeline for receiving external messages;
[0014] The OAM message is forwarded to the loopback interface of the target pipeline through the packet receiving pipeline.
[0015] Furthermore, the step of determining the loopback interface of the target pipeline of the OAM message includes:
[0016] Determining, according to a target maintenance device of the OAM message, an SCL table entry adapted to the target maintenance device;
[0017] The pipeline configured with the SCL table entry is used as the target pipeline, and the loopback interface of the target pipeline is determined.
[0018] Furthermore, the step of determining an SCL table entry adapted to the target maintenance device includes:
[0019] Determine the service type of the OAM message, and select an SCL table entry adapted to the service type from all SCL table entries adapted to the target maintenance device.
[0020] Furthermore, the step of searching for the SCL search information of the OAM message from the SCL table entry of the target pipeline includes:
[0021] Extracting an editing port from the message header information of the OAM message;
[0022] The edit port is used as a keyword to search for SCL search information from the SCL table entry of the target pipeline.
[0023] Further, the SCL search information includes editing behavior;
[0024] The step of processing the OAM message according to the SCL search information includes:
[0025] The OAM message is edited according to the editing behavior, and the edited OAM message is encapsulated.
[0026] Furthermore, the SCL search information also includes an egress port;
[0027] The step of forwarding the processed OAM message to the target maintenance device includes:
[0028] The encapsulated OAM message is sent to a packet sending pipeline, and the encapsulated OAM message is sent from the egress port to the target maintenance device through the packet sending pipeline; wherein the packet sending pipeline is a pipeline for forwarding internal messages to the network device.
[0029] In a second aspect, an embodiment of the present invention provides an OAM packet sending device, which is applied to a chip of a network device, wherein each core of the chip includes an OAM engine and multiple pipelines, each pipeline is configured with a different SCL table entry and loopback interface, and the device includes a message generation module, an internal sending module, a loopback module, a message processing module, and an external sending module;
[0030] The message generation module is used to generate an OAM message through the OAM engine and determine the loopback interface of the target pipeline of the OAM message;
[0031] The internal sending module is used to forward the OAM message to the loopback interface of the target pipeline;
[0032] The loopback module is configured to loop back the OAM message to the ingress processing engine of the target pipeline when the loopback interface of the target pipeline receives the OAM message;
[0033] The message processing module is configured to search the SCL search information of the OAM message from the SCL table entry of the target pipeline through the inbound processing engine of the target pipeline;
[0034] The outgoing module is configured to process the OAM message according to the SCL search information, and forward the processed OAM message to a target maintenance device.
[0035] In a third aspect, an embodiment of the present invention provides a network device comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the OAM packet sending method as described in the first aspect.
[0036] In a fourth aspect, an embodiment of the present invention provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the OAM packet sending method as described in the first aspect.
[0037] The OAM packet sending method, apparatus, network device and storage medium provided in the embodiments of the present invention determine the loopback interface of the target pipeline of the OAM message while the OAM engine of the chip generates the OAM message, thereby forwarding the OAM message to the loopback interface of the target pipeline, so that when the loopback interface of the target pipeline receives the OAM message, it can loop the OAM message back to the input processing engine of the target pipeline, so that the input processing engine can process the OAM message based on the SCL search information found from the SCL table entry of the target pipeline, and forward the processed OAM message. By sending the OAM message sent by the OAM engine to the loopback interface of the target pipeline (a pipeline configured with an SCL table entry adapted to the OAM message), the OAM message can be directly targeted to the pipeline configured with the adapted SCL table entry, which can greatly improve the problem in the prior art that the message sent by the OAM engine cannot be correctly edited and forwarded.
[0038] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are specifically listed below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0040] Figure 1 A schematic structural diagram of an OAM packet sending system provided in an embodiment of the present invention is shown.
[0041] Figure 2 A schematic structural diagram of a chip provided by an embodiment of the present invention is shown.
[0042] Figure 3 A schematic diagram of the process of the OAM packet sending method provided in an embodiment of the present invention is shown.
[0043] Figure 4 Shown Figure 3 Flow chart of some sub-steps of step S11.
[0044] Figure 5 Shown Figure 3Flow chart of some sub-steps of step S13.
[0045] Figure 6 A schematic diagram of the forwarding process of OAM messages in a chip provided by an embodiment of the present invention is shown.
[0046] Figure 7 Shown Figure 3 Flow chart of some sub-steps of step S17.
[0047] Figure 8 A block diagram of an OAM packet sending device provided in an embodiment of the present invention is shown.
[0048] Figure 9 A block diagram of a network device provided by an embodiment of the present invention is shown.
[0049] Figure numerals: 100 - OAM packet sending system; 10 - network equipment; 20 - OAM packet sending device; 201 - message generation module; 202 - internal sending module; 203 - loopback module; 204 - message processing module; 205 - external sending module. DETAILED DESCRIPTION
[0050] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions of the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in a variety of different configurations.
[0051] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative work are within the scope of protection of the present invention.
[0052] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
[0053] Currently, in the OAM packet sending process of multi-core architecture chips, the OAM message sending process from one MEP (Maintenance Association End Point) to another MEP includes:
[0054] (1) The OAM engine periodically sends Ethernet OAM frames.
[0055] (2) When an OAM message reaches the loopback interface (loop port) of a certain pipeline of the chip and then loops back to the IPE (Ingress Process Engine) of the pipeline corresponding to the loopback interface, the SCL table entry is searched through the port information carried in the message header to associate the corresponding editing port (Nexthop).
[0056] (3) Nexthop encapsulates the OAM message, redirects the egress, and forwards it.
[0057] However, in a multi-core (pipeline) architecture, each pipeline is configured with an SCL entry. However, the SCL entry that matches the OAM message only exists in the pipeline corresponding to the port information, resulting in the OAM engine being unable to correctly edit and forward the message. If all SCL entries were configured on each pipeline, it would result in a waste of entry resources.
[0058] Based on the above considerations, an embodiment of the present invention provides an OAM packet sending method. In the OAM packet sending process of a multi-core architecture chip, the OAM packet sending method can solve the problem in the prior art that the messages sent by the OAM engine cannot be correctly edited and forwarded.
[0059] The OAM packet sending method provided by the embodiment of the present invention can be applied to Figure 1In the OAM packet sending system 100 shown, the OAM packet sending system 100 may include multiple network devices communicating via Ethernet. The multiple network devices are all node devices in the network to be measured for OAM, that is, MEPs. OAM measurement can be performed between every two network devices.
[0060] Each network device may include a multi-core chip, refer to Figure 2 Each core of the chip can include an OAM engine and multiple pipelines. Each pipeline includes an ingress processing engine (IPE) and an export processing engine (EPE). Each pipeline is equipped with a loopback interface and is configured with different SCL entries.
[0061] One SCL entry may correspond to one service type, one MEP, or one service type of one MEP, which is not specifically limited in this embodiment.
[0062] The OAM engine or chip may be configured with an entry index table, which may record the correspondence between each SCL entry and a service type and / or network device (MEP), and the correspondence between each SCL entry and a pipeline loopback interface.
[0063] The OAM engine is used to generate OAM messages and determine the loopback interface of the target pipeline of the OAM messages based on the entry index table.
[0064] The chip of each network device can implement the OAM packet sending method provided in the embodiment of the present invention.
[0065] The network equipment includes but is not limited to switches and routers.
[0066] In a possible implementation, the present invention provides an OAM packet sending method, referring to Figure 3 , may include the following steps. In this embodiment, the OAM packet sending method is applied to Figure 1 Take the chip of any network device as an example.
[0067] S11: Generate an OAM message through the OAM engine and determine the loopback interface of the target pipeline of the OAM message.
[0068] S13, forwarding the OAM message to the loopback interface of the target pipeline.
[0069] S15 , when the loopback interface of the target pipeline receives the OAM message, the OAM message is looped back to the ingress processing engine of the target pipeline.
[0070] S17 , using the inbound processing engine of the target pipeline, searching for SCL search information of the OAM message from the SCL table entry of the target pipeline.
[0071] S19: Process the OAM message according to the SCL search information, and forward the processed OAM message to the target maintenance device.
[0072] When OAM detection is initiated, the network device's chip generates an OAM message to another target network device through the OAM engine. Based on the OAM service type and / or target network device in the OAM message, the chip searches the pre-configured entry index table to find the loopback interface of the target pipeline. The target pipeline is the pipeline configured with the SCL entry that is compatible with the OAM message.
[0073] For example, the service type of the OAM message can be used as a search key to query the SCL table entry adapted to the OAM message from the table entry index table, and then obtain the loopback interface of the pipeline configured with the SCL table entry (ie, the target pipeline).
[0074] The OAM message is forwarded to the target pipeline's loopback interface, using the target pipeline's loopback interface as the target loopback exit. After receiving the OAM message, the target pipeline's loopback interface loops back the OAM message to the target pipeline's inbound processing engine. The inbound processing engine then searches the SCL table configured on the target pipeline for SCL lookup information matching the OAM message. Based on this SCL lookup information, the OAM message is edited and forwarded.
[0075] Compared with the traditional OAM packet sending method, in the above OAM packet sending method, the OAM message sent by the OAM engine is forwarded to the loopback interface of the target pipeline (the pipeline configured with SCL table entries adapted to the OAM message) through the mechanism of specifying the loopback interface, so that the OAM message can reach the pipeline configured with SCL table entries adapted to itself, thereby realizing the targeted direct arrival of the OAM message to the pipeline configured with the adapted SCL table entries, and then the OAM message can be correctly edited and forwarded, which greatly improves the problem in the prior art that the message sent by the OAM engine cannot be correctly edited and forwarded.
[0076] In the case where an SCL entry corresponds to a network device, refer to Figure 4 , determining the loopback interface of the target pipeline of the OAM message in step S11 can be further implemented as the following steps.
[0077] S11 - 1 , according to the target maintenance device of the OAM message, determining an SCL table entry adapted to the target maintenance device.
[0078] S11-2: The pipeline configured with the SCL entry is used as the target pipeline, and the loopback interface of the target pipeline is determined.
[0079] For example, a pre-configured table index table records the correspondence between each maintenance device (network device), pipeline, and the pipeline's loopback interface and SCL table entries. When generating OAM messages for performing an OAM measurement between a network device and a target maintenance device, the target maintenance device's identifier is used as a search key to locate the pipeline configured with the configured SCL table entry, i.e., the target pipeline's loopback interface, from the pre-configured table index table. This allows the target pipeline's loopback interface to be obtained.
[0080] Furthermore, in one possible implementation, a large number of OAM measurements require continuous transmission of a large number of OAM messages. To conserve SCL entry resources and improve efficiency, SCL entries corresponding to different OAM measurement service types for the same maintenance device can be allocated to different pipelines. In this case, determining the SCL entry compatible with the target maintenance device in step S11-1 can be further implemented by determining the service type of the OAM message and selecting an SCL entry compatible with the service type from all SCL entries compatible with the target maintenance device.
[0081] In complex network chip designs, to accommodate a variety of network protocols, various types of messages enter the chip from different network entrances, are processed, and then sent to each chip network exit. During this process, the messages often need to undergo loopback processing, and the number of loopbacks is indefinite.
[0082] For chips with a multi-pipeline architecture, the multiple pipelines generally include a packet receiving pipeline and a packet sending pipeline. The packet receiving pipeline receives messages generated locally by the chip or received external messages, and the packet sending pipeline forwards the locally generated messages or received external messages. Other pipelines perform different message processing services. On this basis, in order to quickly and smoothly transmit OAM messages to the loopback interface of the target pipeline, the packet receiving pipeline is introduced to forward OAM messages. Figure 5 , step S13 can be further implemented as the following steps.
[0083] S13-1, sending the OAM message to the packet receiving pipeline.
[0084] In this embodiment, the packet receiving pipeline is a pipeline for receiving external messages.
[0085] S13-2, forwarding the OAM message to the loopback interface of the target pipeline through the packet receiving pipeline.
[0086] The OAM message can carry the loopback interface information of the target pipeline. The OAM engine sends the OAM message to the inlet of the packet receiving pipeline. After receiving the OAM message, the packet receiving pipeline forwards the OAM message to the inlet of the target pipeline based on the loopback interface information.
[0087] The target pipeline sends the OAM message to its own loopback interface. When the OAM message reaches the loopback interface of the target pipeline, a loopback is triggered and the message is looped back to the ingress processing engine of the target pipeline.
[0088] by Figure 6 For example, a network device chip core includes an OAM engine and four pipelines: pipeline 0 (PP0), pipeline 1 (PP1), pipeline 2 (PP2), and pipeline 3 (PP3). Pipeline 3 is the packet receiving pipeline, and pipeline 4 is the packet sending pipeline. Pipeline 1 is configured with an SCL table entry corresponding to the OAM message. At this time, the OAM message sent by the OAM engine enters the inlet of pipeline 3, is forwarded by pipeline 3 to pipeline 1, and is sent to the loopback interface of pipeline 1, triggering the loopback, and is then transmitted to the IPE of pipeline 1.
[0089] After the OAM message is looped back to the ingress processing engine of the target pipeline, in order to correctly edit and forward the OAM message, an editing port can be introduced as the SCL lookup key in the OAM message. When the OAM engine generates the OAM message, the editing port can be added to the message header of the OAM message. Based on this, refer to Figure 7 , searching for the SCL search information of the OAM message from the SCL table entry of the target pipeline in step S17 can be further implemented as the following steps.
[0090] S17-1, extracting the editing port from the message header information of the OAM message.
[0091] In this embodiment, the edit port is an abstract port, which can be understood as an encapsulated edit index.
[0092] S17-2, using the edit port as a keyword, search for SCL search information from the SCL table entry of the target pipeline.
[0093] The edit port is used as a keyword, i.e., a search key, to find the SCL search information from the SCL table entries configured on the target pipeline.
[0094] The SCL search information may include export information and editing behavior, wherein the export information specifies an export port.
[0095] Based on the editing behavior in the SCL search information, in step S19, processing the OAM message according to the SCL search information can be further implemented as: editing the OAM message according to the editing behavior, and encapsulating the edited OAM message.
[0096] After editing and encapsulating the OAM message, the SCL searches for the egress port specified by the egress information and forwards the OAM message. Specifically, the ingress processing engine of the target pipeline sends the encapsulated OAM message to the outbound pipeline, which then sends the encapsulated OAM message out the specified egress port, allowing the OAM message to be transmitted to the target maintenance device.
[0097] In this embodiment, the packet sending pipeline is a pipeline for forwarding internal messages to a network device.
[0098] Continue to see Figure 6 Port 20 is the editing port. After the OAM message is looped back to the IPE of pipeline 1 (the destination pipeline for the OAM message), the egress information and editing behavior are found based on the editing port (port 20) in the message header. After editing and encapsulating the OAM message based on the editing behavior, pipeline 1 forwards the OAM message to pipeline 4 (the outgoing pipeline). Pipeline 4 then sends the OAM message out of the egress port (port 40) specified by the egress information. This completes the correct editing and forwarding of the OAM message.
[0099] The OAM packet sending method provided by the embodiment of the present invention sends the OAM message sent by the OAM engine to the loopback interface (loop port) of the pipeline configured with the SCL table entry corresponding to the OAM message, and then searches, edits, encapsulates and forwards the message through the SCL on the pipeline, and sends it out from the designated output port. In this way, the OAM engine specifies the loopback interface of the target pipeline when sending the OAM message, so that the OAM message accurately reaches the target pipeline, and is edited and forwarded based on the SCL table entry on the target pipeline. In this way, the problem of being unable to correctly edit and forward the OAM message because the pipeline to which the OAM message is looped back does not have an adapted SCL table entry can be greatly improved. At the same time, only one SCL table entry needs to be configured on one pipeline, which saves table entry resources on the basis of realizing the packet sending function.
[0100] Based on the same concept as the above-mentioned OAM packet sending method, the embodiment of the present invention also provides an OAM packet sending device 20, which can be applied to Figure 1 The chip of the network equipment in the Figure 8 The OAM packet sending device 20 may include a message generating module 201 , an internal sending module 202 , a loopback module 203 , a message processing module 204 and an external sending module 205 .
[0101] The message generation module 201 is configured to generate an OAM message through an OAM engine and determine a loopback interface of a target pipeline of the OAM message.
[0102] The internal sending module 202 is used to forward the OAM message to the loopback interface of the target pipeline.
[0103] The loopback module 203 is configured to loop back the OAM message to the ingress processing engine of the target pipeline when the loopback interface of the target pipeline receives the OAM message.
[0104] The message processing module 204 is configured to search for SCL search information of the OAM message from the SCL table entry of the target pipeline through the inbound processing engine of the target pipeline.
[0105] The outgoing module 205 is configured to process the OAM message according to the SCL search information and forward the processed OAM message to the target maintenance device.
[0106] In the above-mentioned OAM packet sending device 20, through the coordinated action of the message generation module 201, the internal sending module 202, the loopback module 203, the message processing module 204 and the external sending module 205, the OAM message sent by the OAM engine is forwarded to the loopback interface of the target pipeline (the pipeline configured with the SCL table entry adapted to the OAM message) through the mechanism of specifying the loopback interface, so that the OAM message can reach the pipeline configured with the SCL table entry adapted to itself, thereby realizing the targeted direct arrival of the OAM message to the pipeline configured with the adapted SCL table entry, and then the OAM message can be correctly edited and forwarded, which greatly improves the problem in the prior art that the message sent by the OAM engine cannot be correctly edited and forwarded.
[0107] The specific definitions of the OAM packet issuing device 20 can be found in the definitions of the OAM packet issuing method above and will not be repeated here. Each module within the OAM packet issuing device 20 may be implemented in whole or in part via software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor within an electronic device in hardware form, or may be stored in the electronic device's memory as software, allowing the processor to invoke and execute the corresponding operations of each module.
[0108] In one embodiment, a network device 10 is provided. The network device may be a switch, and its internal structure may be as shown in FIG. Figure 9As shown. The network device includes a processor, a memory, a communication interface and an input device connected via a system bus. Among them, the processor of the network device 10 is used to provide computing and control capabilities. The memory of the network device 10 includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The communication interface of the network device 10 is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, an operator network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, the OAM packet sending method provided in the above embodiment is implemented.
[0109] Figure 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the network device to which the solution of the present invention is applied. The specific network device may include Figure 9 More or fewer components may be shown, or some components may be combined, or the components may be arranged differently.
[0110] In one embodiment, the OAM packet sending device 20 provided by the present invention can be implemented in the form of a computer program. The computer program can be used in Figure 9 The memory of the network device 10 can store various program modules constituting the OAM packet sending device 20, such as: Figure 8 The computer program composed of the program modules includes a message generation module 201, an internal sending module 202, a loopback module 203, a message processing module 204 and an external sending module 205. The computer program enables the processor to execute the steps of the OAM packet sending method described in this specification.
[0111] For example, Figure 9 The network device 10 shown can be Figure 8 The message generation module 201 in the OAM packet sending device 20 shown in FIG. 10 performs step S11. The network device 10 can perform step S13 via the internal sending module 202. The network device 10 can perform step S15 via the loopback module 203. The network device 10 can perform step S17 via the message processing module 204. The network device 10 can perform step S19 via the external sending module 205.
[0112] In one embodiment, a network device 10 is provided, including a memory and a processor, wherein the memory stores machine-executable instructions, and the processor implements the following steps when executing the machine-executable instructions: generating an OAM message through an OAM engine and determining the loopback interface of a target pipeline of the OAM message; forwarding the OAM message to the loopback interface of the target pipeline; when the loopback interface of the target pipeline receives the OAM message, looping the OAM message back to the input processing engine of the target pipeline; searching for SCL lookup information of the OAM message from the SCL table entry of the target pipeline through the input processing engine of the target pipeline; processing the OAM message based on the SCL lookup information, and forwarding the processed OAM message to a target maintenance device.
[0113] In one embodiment, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: generating an OAM message through an OAM engine and determining the loopback interface of a target pipeline of the OAM message; forwarding the OAM message to the loopback interface of the target pipeline; when the loopback interface of the target pipeline receives the OAM message, looping the OAM message back to an inbound processing engine of the target pipeline; searching for SCL lookup information of the OAM message from an SCL table entry of the target pipeline through the inbound processing engine of the target pipeline; processing the OAM message based on the SCL lookup information, and forwarding the processed OAM message to a target maintenance device.
[0114] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of the code, and the module, program segment or 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 an order different from that 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, as well as the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.
[0115] In addition, the functional modules in 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.
[0116] 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 this understanding, the technical solution of the present invention, 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. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment 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.
[0117] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. An OAM packet sending method, characterized in that: A chip applied to a network device, wherein each core of the chip includes an OAM engine and multiple pipelines, each pipeline being configured with a different SCL table entry and loopback interface, and the method includes: Generate an OAM message through the OAM engine and determine the loopback interface of the target pipeline of the OAM message; Forwarding the OAM message to the loopback interface of the target pipeline; When the loopback interface of the target pipeline receives the OAM message, looping back the OAM message to the ingress processing engine of the target pipeline; Searching, by an inbound processing engine of the target pipeline, for SCL search information of the OAM message from an SCL table entry of the target pipeline; Processing the OAM message according to the SCL search information, and forwarding the processed OAM message to the target maintenance device; The step of determining the loopback interface of the target pipeline of the OAM message comprises: Determining, according to a target maintenance device of the OAM message, an SCL table entry adapted to the target maintenance device; The pipeline configured with the SCL table entry is used as the target pipeline, and the loopback interface of the target pipeline is determined.
2. The OAM packet sending method according to claim 1, characterized in that: The step of forwarding the OAM message to the loopback interface of the target pipeline includes: Sending the OAM message to a packet receiving pipeline; wherein the packet receiving pipeline is a pipeline for receiving external messages; The OAM message is forwarded to the loopback interface of the target pipeline through the packet receiving pipeline.
3. The OAM packet sending method according to claim 1, characterized in that: The step of determining the SCL table entry adapted to the target maintenance device includes: Determine the service type of the OAM message, and select an SCL table entry adapted to the service type from all SCL table entries adapted to the target maintenance device.
4. The OAM packet issuing method according to claim 1 or 2, characterized in that: The step of searching for the SCL search information of the OAM message from the SCL table entry of the target pipeline includes: Extracting an editing port from the message header information of the OAM message; The edit port is used as a keyword to search for SCL search information from the SCL table entry of the target pipeline.
5. The OAM packet issuing method according to claim 1 or 2, characterized in that: The SCL search information includes editing behavior; The step of processing the OAM message according to the SCL search information includes: The OAM message is edited according to the editing behavior, and the edited OAM message is encapsulated.
6. The OAM packet sending method according to claim 5, characterized in that: The SCL search information also includes an egress port; The step of forwarding the processed OAM message to the target maintenance device includes: The encapsulated OAM message is sent to a packet sending pipeline, and the encapsulated OAM message is sent from the egress port to the target maintenance device through the packet sending pipeline; wherein the packet sending pipeline is a pipeline for forwarding internal messages to the network device.
7. An OAM packet sending device, characterized in that: A chip for network equipment, wherein each core of the chip includes an OAM engine and multiple pipelines, each pipeline is configured with a different SCL table entry and loopback interface, and the device includes a message generation module, an internal transmission module, a loopback module, a message processing module, and an external transmission module; The message generation module is used to generate an OAM message through the OAM engine and determine the loopback interface of the target pipeline of the OAM message; The internal sending module is used to forward the OAM message to the loopback interface of the target pipeline; The loopback module is configured to loop back the OAM message to the ingress processing engine of the target pipeline when the loopback interface of the target pipeline receives the OAM message; The message processing module is configured to search the SCL search information of the OAM message from the SCL table entry of the target pipeline through the inbound processing engine of the target pipeline; The outgoing module is configured to process the OAM message according to the SCL search information and forward the processed OAM message to a target maintenance device; The message generation module is further configured to determine an SCL table entry adapted to the target maintenance device according to the target maintenance device of the OAM message; take the pipeline configured with the SCL table entry as the target pipeline, and determine the loopback interface of the target pipeline.
8. A network device, characterized in that: The system comprises a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor can execute the machine-executable instructions to implement the OAM packet sending method according to any one of claims 1 to 6.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the OAM packet sending method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method and system for transferring TRILL (transparent interconnection of lots of links) network messages in an ASIC(application specific integrated circuit )
CN102957616A
Message processing method and device
CN106487572A