A message processing method and device and related equipment
By configuring multiple packet processing policy instances on network devices, the problem of insufficient flexibility of traditional TSN network devices is solved, enabling multi-role forwarding of the same device under different protocols, improving device reusability and reducing deployment costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NEW H3C TECH CO LTD
- Filing Date
- 2026-04-01
- Publication Date
- 2026-07-31
AI Technical Summary
Traditional TSN network devices lack flexibility in complex network topologies, resulting in low device utilization, high deployment costs, and an inability to effectively play multiple roles.
Create and configure message processing policy instances for multiple preset protocols on network devices, define ingress interfaces, egress interfaces, flow characteristics and role types, and achieve multi-role forwarding under different protocols on the same device through ACL matching and generating doubly linked lists.
It improves the reusability of a single network device in a TSN network, supports multi-role forwarding, and reduces device utilization and deployment costs.
Smart Images

Figure CN122496572A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network communication technology, and in particular to a message processing method, apparatus and related equipment. Background Technology
[0002] Time-Sensitive Networking (TSN) is a set of Ethernet extension technologies standardized by IEEE, designed to provide deterministic, low-latency, and highly reliable communication capabilities for scenarios such as industrial control and automotive networks. Among them, the IEEE 802.1CB (Frame Replication and Deletion, FRER) protocol ensures data transmission reliability by creating redundant paths for critical data flows in the network and eliminating duplicate packets, ensuring uninterrupted service traffic even if some links fail. It is commonly used in scenarios requiring low latency, low jitter, and high reliability, such as industrial control, automotive networks, and audio / video transmission.
[0003] In traditional 802.1CB network deployments, network devices (such as switches) are typically pre-configured with a single, fixed role, such as a Proxy, Splitter, Merge, or End node. Each network device performs specific packet processing operations based on its role (such as adding / removing redundant R-tags, copying packets, and eliminating duplicate packets). This "one device, one role" model suffers from a lack of flexibility. In complex network topologies, a single network device may be located at the intersection of multiple redundant paths, needing to simultaneously process 802.1CB packets from different directions and belonging to different data flows, and playing different roles. Using the traditional approach would require deploying multiple dedicated devices or making complex physical wiring adjustments, resulting in a rigid network architecture, low device utilization, and high deployment costs. Summary of the Invention
[0004] This application provides a message processing method, apparatus, and related equipment.
[0005] Firstly, this application provides a message processing method applied to a network device, wherein multiple message processing policy instances of preset protocols are created and configured on the network device, wherein each message processing policy instance defines its bound ingress and egress interfaces, bound specific flow characteristics, the role type of the network device when processing the specific data flow, and the corresponding message processing rules; the method includes: Receive a target flow packet from the target interface, wherein the target flow packet is the preset protocol flow packet; Determine the target flow characteristics of the target flow packet, and based on the target interface and the target flow characteristics, determine a target packet processing strategy instance that matches the target interface and the target flow characteristics; The target flow packets are processed based on the role type of the target packet processing policy instance and the corresponding packet processing rules.
[0006] Optionally, the preset protocol is the 802.1CB protocol; the role type includes Proxy node, Splitter node, Merge node, or End node.
[0007] Optionally, if the role type defined in a message processing policy instance is a Proxy node or a Splitter node, then the message processing policy instance is bound to one ingress interface and at least two egress interfaces. If a message processing policy instance defines a node type of Merge node or End node, then the message processing policy instance is bound to at least two inbound interfaces and one outbound interface.
[0008] Optionally, the steps for creating and configuring multiple preset protocol message processing policy instances include: Based on user instructions, a message processing policy instance of a preset protocol is created. The user instructions include the ingress and egress interfaces bound to the message processing policy instance to be created, the specific flow characteristics bound, the role type of the network device when processing the specific data flow, and the corresponding message processing rules. For each specific flow feature bound to the message processing policy instance, a corresponding doubly linked list is generated. The doubly linked list corresponding to a specific flow feature includes the ingress interface and egress interface bound to the corresponding message processing policy instance, the specific flow feature, and the role type of the network device when processing the specific data flow.
[0009] Optionally, the method further includes: For each doubly linked list, a corresponding ACL is generated. The matching items of the ACL include the inbound interface and the flow characteristics. The action items are redirecting the specified flow to the corresponding outbound interface and assigning a flow ID to the specified flow.
[0010] Optionally, the ingress and egress interfaces bound to each message processing strategy instance are enabled to recognize the preset protocol messages.
[0011] Optionally, the method further includes: The traffic processed by the preset protocol is assigned to a dedicated target VLAN, and the spanning tree protocol is disabled in the target VLAN; the spanning tree protocol is enabled in other VLANs other than the target VLAN; so that the ports of the network device can simultaneously process the traffic belonging to the target VLAN that is processed by the preset protocol and other traffic belonging to other VLANs.
[0012] Secondly, this application provides a message processing apparatus applied to a network device. The network device has multiple message processing policy instances of preset protocols created and configured. Each message processing policy instance defines its bound ingress and egress interfaces, bound specific flow characteristics, the role type of the network device when processing the specific data flow, and corresponding message processing rules. The apparatus includes: A receiving unit is configured to receive a target flow packet from a target interface, wherein the target flow packet is the preset protocol flow packet; The determining unit is configured to determine the target flow characteristics of the target flow packet, and based on the target interface and the target flow characteristics, determine a target packet processing strategy instance that matches the target interface and the target flow characteristics; The processing unit is used to process the target flow packets based on the role type of the target packet processing strategy instance and the corresponding packet processing rules.
[0013] Optionally, the preset protocol is the 802.1CB protocol; the role type includes Proxy node, Splitter node, Merge node, or End node.
[0014] Optionally, if the role type defined in a message processing policy instance is a Proxy node or a Splitter node, then the message processing policy instance is bound to one ingress interface and at least two egress interfaces. If a message processing policy instance defines a node type of Merge node or End node, then the message processing policy instance is bound to at least two inbound interfaces and one outbound interface.
[0015] Optionally, the apparatus further includes a creation unit; when creating and configuring multiple message processing policy instances of preset protocols, the creation unit is specifically used for: Based on user instructions, a message processing policy instance of a preset protocol is created. The user instructions include the ingress and egress interfaces bound to the message processing policy instance to be created, the specific flow characteristics bound, the role type of the network device when processing the specific data flow, and the corresponding message processing rules. For each specific flow feature bound to the message processing policy instance, a corresponding doubly linked list is generated. The doubly linked list corresponding to a specific flow feature includes the ingress interface and egress interface bound to the corresponding message processing policy instance, the specific flow feature, and the role type of the network device when processing the specific data flow.
[0016] Optionally, the device further includes: The generation unit is used to generate a corresponding ACL for each doubly linked list. The matching items of the ACL include the inbound interface and the flow characteristics, and the action items are redirecting the specified flow to the corresponding outbound interface and assigning a flow ID to the specified flow.
[0017] Optionally, the ingress and egress interfaces bound to each message processing strategy instance are enabled to recognize the preset protocol messages.
[0018] Optionally, the device further includes: The partitioning unit is used to partition the traffic processed by the preset protocol into a dedicated target VLAN and disable the spanning tree protocol in the target VLAN; and enable the spanning tree protocol in other VLANs other than the target VLAN; so that the ports of the network device can simultaneously process the traffic belonging to the target VLAN and processed by the preset protocol and other traffic belonging to other VLANs.
[0019] Thirdly, embodiments of this application provide a message processing apparatus, which includes: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method as described in any one of the first aspects above, according to the obtained program instructions.
[0020] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the steps of the method as described in any of the first aspects above.
[0021] In summary, the message processing method provided in this application is applied to a network device. The network device creates and configures multiple message processing policy instances for preset protocols. Each message processing policy instance defines its bound ingress and egress interfaces, bound specific flow characteristics, the role type of the network device when processing the specific data flow, and corresponding message processing rules. The method includes: receiving a target flow message from a target interface, wherein the target flow message is the preset protocol flow message; determining the target flow characteristics of the target flow message, and based on the target interface and the target flow characteristics, determining a target message processing policy instance that matches the target interface and the target flow characteristics; and processing the target flow message based on the role type of the target message processing policy instance and the corresponding message processing rules.
[0022] By using the message processing method provided in this application embodiment, the network device supports the configuration and creation of multiple instances. By planning different interfaces of the same network device to different forwarding instances, a single network device can play different forwarding roles in the 802.1CB protocol, thereby improving the reusability of a single network device in the TSN network. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments of this application or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings of the embodiments of this application.
[0024] Figure 1 A detailed flowchart of a message processing method provided for an embodiment of this application; Figure 2 A schematic diagram of an 802.1CB network provided in this application embodiment; Figure 3 A schematic diagram of a message processing flow for a proxy node provided in an embodiment of this application; Figure 4 A schematic diagram of the message processing flow of the Splitter node provided in the embodiments of this application; Figure 5 A schematic diagram of the message processing flow of the Merge node provided in the embodiments of this application; Figure 6 A schematic diagram of the message processing flow of the End node provided in the embodiments of this application; Figure 7 This is a schematic diagram of the structure of a message processing device provided in an embodiment of this application; Figure 8This is a schematic diagram of the hardware architecture of a message processing device provided in an embodiment of this application. Detailed Implementation
[0025] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “the,” and “the” as used in this application and claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to any and all possible combinations comprising one or more of the associated listed items.
[0026] It should be understood that although the terms first, second, third, etc., may be used to describe various information in embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" may also be interpreted as "when," "when," or "in response to a determination."
[0027] For example, see Figure 1 The diagram shown is a detailed flowchart of a message processing method provided in this application embodiment. This method is applied to a network device, which has multiple message processing policy instances of preset protocols created and configured. Each message processing policy instance defines its bound ingress and egress interfaces, bound specific flow characteristics, the role type of the network device when processing the specific data flow, and the corresponding message processing rules. The method includes the following steps: Step 100: Receive the target flow message from the target interface, wherein the target flow message is the preset protocol flow message.
[0028] In this embodiment of the application, the preset protocol is the 802.1CB protocol; the role type includes Proxy node, Splitter node, Merge node or End node.
[0029] For example, see Figure 2 The diagram shown is a schematic of an 802.1CB network according to an embodiment of this application. Each switch is a node in the 802.1CB. The node role is determined by the user's configuration and is divided into the following types: Proxy node: Receives ordinary Ethernet frames, adds R-tags to the Ethernet frames, and copies and forwards them.
[0030] Splitter node: Receives Ethernet frames carrying R-Tags and copies and forwards them.
[0031] Relay node: forwards Ethernet frames carrying R-Tag.
[0032] Merge node: Receives Ethernet frames carrying R-Tags from both links, discards packets with the same R-Tag sequence number, and then forwards them.
[0033] For example, server A sends a regular Ethernet frame to switch B. Switch B receives the frame and matches it with traffic characteristics. If a match is found, it assigns a sequence number to the frame and adds an R-tag. Switch B then copies the R-tag-added Ethernet frame and forwards it from two designated links. Switch C receives the R-tag-carrying frame, copies it again, and forwards it from two designated links. Switches D and E can correctly forward Ethernet frames carrying R-tags. Switch F receives two Ethernet frames with the same R-tag sequence number from two different links, discards one, and forwards it to switch G. Switch G also receives two Ethernet frames with the same R-tag sequence number from two different links, discards one, removes the R-tag from the Ethernet frame, and forwards it to server H. Servers A and H are unaware of 802.1CB.
[0034] In this embodiment of the application, a network device can be configured to support the creation of multiple 802.1CB instances. In each 802.1CB instance, it is possible to bind ingress interfaces, egress nodes, node types, and flow characteristics. In practical applications, each binding can be implemented through a corresponding independent command line.
[0035] In this embodiment of the application, if the role type defined in a packet processing policy instance (e.g., an 802.1CB instance) of a network device is a Proxy node or a Splitter node, then the packet processing policy instance is bound to one ingress interface and at least two egress interfaces; if the node type defined in a packet processing policy instance of a network device is a Merge node or an End node, then the packet processing policy instance is bound to at least two ingress interfaces and one egress interface.
[0036] In practical applications, each 802.1CB instance can only be configured with one node type. Since Relay nodes only need to forward packets carrying R-tags and require no additional configuration, the Relay node option does not need to be configured in the node type settings. That is, the node type for an 802.1CB instance without a configured node type is Relay node by default.
[0037] Preferably, in this embodiment of the application, each 802.1CB instance supports binding multiple flow features; however, each flow feature can only be bound in one instance.
[0038] In this embodiment of the application, the user can pre-create and configure message processing policies for multiple preset protocols on the network device. A preferred implementation method for creating and configuring multiple instances of message processing policies for preset protocols is as follows: Based on user instructions, a message processing policy instance of a preset protocol is created. The user instructions include the ingress and egress interfaces bound to the message processing policy instance to be created, the specific flow characteristics bound, the role type of the network device when processing the specific data flow, and the corresponding message processing rules. For each specific flow feature bound to the message processing policy instance, a corresponding doubly linked list is generated. The doubly linked list corresponding to a specific flow feature includes the ingress interface and egress interface bound to the corresponding message processing policy instance, the specific flow feature, and the role type of the network device when processing the specific data flow.
[0039] In practical applications, network devices include a soft-list management module, which uses a doubly linked list to manage the flow characteristics bound to an 802.1CB instance. Each linked list node contains inbound / outbound interface information, node type information, and bound flow characteristic information. A single linked list node records only one type of bound flow. If an 802.1CB instance is bound to multiple flow characteristics, it needs to be split into multiple linked list nodes with identical information except for the bound flow. When the network device's configuration changes, the soft-list management module detects the change and adds, modifies, or deletes linked list nodes. Each time a linked list node is modified, it checks whether the information stored in the current linked list node is valid. When this status changes, it notifies subsequent modules for processing.
[0040] For example, if an 802.1CB instance is bound to ingress interface 1, egress interfaces 2 and 3, and the bound flow characteristics are flow 1, flow 2, and flow 3, then based on this 802.1CB instance: For stream 1, the linked list node 1 includes: ingress interface (interface 1), outgress interface (interface 2 and interface 3), node type (the node type bound to this 802.1CB instance), and stream characteristics (stream 1). For stream 2, the linked list node 2 includes: ingress interface (interface 1), outgress interface (interface 2 and interface 3), node type (the node type bound to this 802.1CB instance), and stream characteristics (stream 2). The linked list node 3 for flow 3 includes: ingress interface (interface 1), outgress interface (interface 2 and interface 3), node type (the node type bound to this 802.1CB instance), and flow characteristics (flow 3).
[0041] In this embodiment of the application, after creating a new instance that includes a stream of linked list nodes, it checks whether the number of bindings of the ingress and egress interfaces included in the linked list node matches the node type bound to the instance. If they match, the information is determined to be valid.
[0042] For each doubly linked list (linked list node), a corresponding ACL is generated. The matching items of the ACL include the inbound interface and the flow characteristics. The action items are redirecting the specified flow to the corresponding outbound interface and assigning a flow ID to the specified flow.
[0043] In this embodiment of the application, the network device may further include a flow feature matching module, which can match flow features through ACLs. The matching items of the ACL include the ingress interface and the flow feature, and the actions include redirecting traffic to a specified egress interface and assigning a flow ID.
[0044] Furthermore, in this embodiment of the application, the ingress and egress interfaces bound to each message processing strategy instance are enabled to recognize the preset protocol messages.
[0045] In other words, after confirming the validity of the information of a newly added / modified linked list node, TPID (Tag Protocol Identifier) is enabled for each port (ingress and egress interface) included in that linked list node, so that the ingress interface supports recognizing the value of the Ethernet type field as 0xF1C1 tag. This ensures that packets sent from the egress interface carry the R-Tag.
[0046] In summary, since a network device can support the configuration and creation of multiple 802.1CB instances, and different 802.1CB instances can be bound to different node types, the same network device can be used as different node roles to execute different protocol message processing flows.
[0047] Step 110: Determine the target flow characteristics of the target flow packet, and based on the target interface and the target flow characteristics, determine a target packet processing strategy instance that matches the target interface and the target flow characteristics.
[0048] In this embodiment, the target interface is the ingress interface bound to the packet processing policy instance. After receiving the target flow packet, the target interface of the network device recognizes that the target flow packet is a preset protocol packet. At this time, it parses the target flow packet to obtain the target flow characteristics (e.g., the flow characteristics can specify the destination MAC, source MAC, Ethernet type, VLAN and VLAN priority). Then, based on the ingress interface (target interface) that received the target flow packet and the target flow characteristics, it determines the target packet processing policy instance with the bound ingress interface as the target interface and the flow characteristics as the target flow characteristics from the local packet processing policy instance. Thus, based on the node type and outgress interface bound to the target packet processing policy instance, it determines the role type when forwarding the target flow packet and the outgress interface information for forwarding the target flow packet.
[0049] Step 120: Process the target flow packet based on the role type of the target packet processing policy instance and the corresponding packet processing rules.
[0050] For example, if the role type of the identified target message processing policy instance is Splitter node, the bound ingress interface is the target interface, and the outgress interfaces are interface 2 and interface 3, then the corresponding message processing rule is to copy the target flow message and forward the copied target flow message from interface 2 and interface 3.
[0051] In practical applications, network devices may also include a packet replication module. This module creates an L2MLL (Layer 2 Multicast Link List) node and adds the two outgoing interfaces to the L2 MLL. The L2 MLL has a mapping relationship with the eVIDX (Extended VLAN Index). ACLs redirect traffic to the eVIDX, and traffic flooding within the eVIDX achieves packet replication. Packet replication primarily occurs on nodes with the Splitter role.
[0052] Network devices may also include a sequence number encoding / decoding module that supports sequence number generation, which only needs to be done by the proxy. For each flow ID, there is an independent sequence number generation program. This program records a current sequence number, and after each packet is processed, it assigns the current sequence number to the packet and increments it by one. Only the proxy node enables the sequence number generation function.
[0053] In practical applications, the 802.1CB protocol inevitably introduces physical loops into the network to achieve multi-path redundancy. Even the simplest 802.1CB network contains loops. Traditional networks typically enable network protocols such as STP, RSTP, or MSTP to eliminate loops. Taking STP as an example, after detecting a loop, STP performs calculations and blocks ports. If STP blocks the outgoing port of the proxy or the incoming port of the end node, even if physical link redundancy exists, actual traffic can only be forwarded along a single link. For 802.1CB, this negates the effect of switching without packet loss; the packet loss time depends on the convergence time of STP.
[0054] In this embodiment, the traffic processed by the preset protocol is assigned to a dedicated target VLAN, and the spanning tree protocol is disabled in the target VLAN; the spanning tree protocol is enabled in other VLANs other than the target VLAN; so that the ports of the network device can simultaneously process the traffic belonging to the target VLAN that is processed by the preset protocol and other traffic belonging to other VLANs.
[0055] For example, within an 802.1CB network, STP is set to per-VLAN mode. 802.1CB traffic is independently assigned to a dedicated TSN VLAN, and STP is disabled in that VLAN. Ports interconnecting relay nodes cannot be added to the dedicated TSN VLAN. For other VLANs, STP is enabled to ensure loop security for legacy traffic. In this configuration, coexistence of 802.1CB traffic and legacy traffic can be achieved on the ports, ensuring that redundant paths for 802.1CB traffic are enabled.
[0056] The message forwarding process provided in this application embodiment will be described in detail below with reference to specific application scenarios. For example, see [link to relevant documentation]. Figure 3 The diagram illustrates a packet processing flow of a proxy node according to an embodiment of this application. A packet enters the device; it is determined whether the packet characteristics match an 802.1CB ACL; if a match is found, the flow ID (for the first packet, a flow ID is assigned) and eVIDX are identified based on the packet characteristics; the current sequence number is obtained based on the flow ID and incremented by 1; the packet is copied to the associated port (egress port) via L2 MLL; the egress port encapsulates 0xF1C1 and the current sequence number into a packet for forwarding; if a match is not found with the corresponding 802.1CB ACL, L2 forwarding is used.
[0057] For example, see Figure 4 The diagram shows the packet processing flow of the Splitter node provided in this embodiment of the application. The packet enters the device; the Ethernet type 0xF1C1 is parsed, and the sequence number is obtained (R-Tag header is decapsulated); it is determined whether the packet characteristics match the 802.1CB ACL; if a match is found, the flow ID (for the first packet, a flow ID is assigned) and eVIDX are identified based on the packet characteristics; the packet is copied to the associated port (egress port) via L2 MLL; the egress port encapsulates 0xF1C1 and the current sequence number into the packet (adding an R-Tag header) and forwards it; if a match is not found, L2 forwarding is used.
[0058] For example, see Figure 5The diagram illustrates the packet processing flow of the Merge node provided in this embodiment of the application. A packet enters the device; the Ethernet type 0xF1C1 is parsed to obtain the sequence number; it is determined whether the packet characteristics match the 802.1CB ACL; if a match is found, the flow ID (or flow ID if it's the first packet) and egress port are identified based on the packet characteristics; it is determined whether the buffer has recorded receiving a packet with the sequence number corresponding to the flow ID; if a match is found, the packet is discarded; otherwise, the specified egress port encapsulates 0xF1C1 and the current sequence number into the packet and forwards it from the corresponding egress port; if a match is not found, L2 forwarding is used.
[0059] For example, see Figure 6 The diagram shows a message processing flow diagram of the End node provided in this application embodiment; the message enters the device; the Ethernet type 0xF1C1 is parsed to obtain the sequence number; it is determined whether the message characteristics can match the 802.1CB ACL; if the corresponding 802.1CB ACL can be matched, the flow ID (for the first message, the flow ID is assigned) and the outgoing port are identified according to the message characteristics; it is determined whether the buffer has recorded the receipt of the message with the sequence number corresponding to the flow ID; if the message with the sequence number corresponding to the flow ID has been recorded, the message is discarded; otherwise, the message is forwarded from the corresponding outgoing port; if the corresponding 802.1CB ACL cannot be matched, L2 forwarding is used.
[0060] Based on the same inventive concept as the above-described embodiments, see, for example, the following: Figure 7 The diagram shown is a structural schematic of a message processing device provided in an embodiment of this application. This device is applied to a network device, which has multiple message processing policy instances of preset protocols created and configured. Each message processing policy instance defines its bound ingress and egress interfaces, bound specific flow characteristics, the role type of the network device when processing the specific data flow, and the corresponding message processing rules. The device includes: The receiving unit 70 is configured to receive a target flow message from the target interface, wherein the target flow message is the preset protocol flow message; The determining unit 71 is used to determine the target flow characteristics of the target flow packet, and based on the target interface and the target flow characteristics, determine a target packet processing strategy instance that matches the target interface and the target flow characteristics; The processing unit 72 is used to process the target flow packet based on the role type of the target packet processing strategy instance and the corresponding packet processing rules.
[0061] Optionally, the preset protocol is the 802.1CB protocol; the role type includes Proxy node, Splitter node, Merge node, or End node.
[0062] Optionally, if the role type defined in a message processing policy instance is a Proxy node or a Splitter node, then the message processing policy instance is bound to one ingress interface and at least two egress interfaces. If a message processing policy instance defines a node type of Merge node or End node, then the message processing policy instance is bound to at least two inbound interfaces and one outbound interface.
[0063] Optionally, the apparatus further includes a creation unit; when creating and configuring multiple message processing policy instances of preset protocols, the creation unit is specifically used for: Based on user instructions, a message processing policy instance of a preset protocol is created. The user instructions include the ingress and egress interfaces bound to the message processing policy instance to be created, the specific flow characteristics bound, the role type of the network device when processing the specific data flow, and the corresponding message processing rules. For each specific flow feature bound to the message processing policy instance, a corresponding doubly linked list is generated. The doubly linked list corresponding to a specific flow feature includes the ingress interface and egress interface bound to the corresponding message processing policy instance, the specific flow feature, and the role type of the network device when processing the specific data flow.
[0064] Optionally, the device further includes: The generation unit is used to generate a corresponding ACL for each doubly linked list. The matching items of the ACL include the inbound interface and the flow characteristics, and the action items are redirecting the specified flow to the corresponding outbound interface and assigning a flow ID to the specified flow.
[0065] Optionally, the ingress and egress interfaces bound to each message processing strategy instance are enabled to recognize the preset protocol messages.
[0066] Optionally, the device further includes: The partitioning unit is used to partition the traffic processed by the preset protocol into a dedicated target VLAN and disable the spanning tree protocol in the target VLAN; and enable the spanning tree protocol in other VLANs other than the target VLAN; so that the ports of the network device can simultaneously process the traffic belonging to the target VLAN and processed by the preset protocol and other traffic belonging to other VLANs.
[0067] These units can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when one of these units is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these units can be integrated together to form a system-on-a-chip (SOC).
[0068] Furthermore, regarding the message processing apparatus provided in this application embodiment, from a hardware perspective, the hardware architecture schematic diagram of the message processing apparatus can be found in [reference needed]. Figure 8 As shown, the message processing device may include: a memory 80 and a processor 81. The memory 80 is used to store program instructions; the processor 81 calls the program instructions stored in the memory 80 and executes the above method embodiment according to the obtained program instructions. The specific implementation method and technical effect are similar, and will not be described again here.
[0069] Optionally, this application also provides a network device, including at least one processing element (or chip) for performing the above method embodiments.
[0070] Optionally, this application also provides a program product, such as a computer-readable storage medium storing computer-executable instructions for causing the computer to perform the above-described method embodiments.
[0071] Here, a machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, a machine-readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.
[0072] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.
[0073] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0074] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0075] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0076] Furthermore, these computer program instructions can also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in the process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0077] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0078] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method of processing a packet, the method comprising: The method is applied to network devices, which have multiple preset protocol message processing policy instances created and configured. Each message processing policy instance defines its bound ingress and egress interfaces, specific flow characteristics, the role type of the network device when processing the specific data flow, and the corresponding message processing rules. The method includes: Receive a target flow packet from the target interface, wherein the target flow packet is the preset protocol flow packet; Determine the target flow characteristics of the target flow packet, and based on the target interface and the target flow characteristics, determine a target packet processing strategy instance that matches the target interface and the target flow characteristics; The target flow packets are processed based on the role type of the target packet processing policy instance and the corresponding packet processing rules.
2. The method of claim 1, wherein, The preset protocol is the 802.1CB protocol; the role types include Proxy node, Splitter node, Merge node, or End node.
3. The method of claim 2, wherein, If the role type defined in a message processing policy instance is Proxy node or Splitter node, then the message processing policy instance is bound to one inbound interface and at least two outbound interfaces. If a message processing policy instance defines a node type of Merge node or End node, then the message processing policy instance is bound to at least two inbound interfaces and one outbound interface.
4. The method according to any one of claims 1 to 3, characterized in that, The steps for creating and configuring message processing policy instances for multiple preset protocols include: Based on user instructions, a message processing policy instance of a preset protocol is created. The user instructions include the ingress and egress interfaces bound to the message processing policy instance to be created, the specific flow characteristics bound, the role type of the network device when processing the specific data flow, and the corresponding message processing rules. For each specific flow feature bound to the message processing policy instance, a corresponding doubly linked list is generated. The doubly linked list corresponding to a specific flow feature includes the ingress interface and egress interface bound to the corresponding message processing policy instance, the specific flow feature, and the role type of the network device when processing the specific data flow.
5. The method of claim 4, wherein, The method further includes: For each doubly linked list, a corresponding ACL is generated. The matching items of the ACL include the inbound interface and the flow characteristics. The action items are redirecting the specified flow to the corresponding outbound interface and assigning a flow ID to the specified flow.
6. The method of claim 1, wherein, Each message processing strategy instance is bound to an ingress and egress interface that is enabled to recognize the preset protocol message.
7. The method as described in claim 1, characterized in that, The method further includes: The traffic processed by the preset protocol is assigned to a dedicated target VLAN, and the spanning tree protocol is disabled in the target VLAN; the spanning tree protocol is enabled in other VLANs other than the target VLAN; so that the ports of the network device can simultaneously process the traffic belonging to the target VLAN that is processed by the preset protocol and other traffic belonging to other VLANs.
8. A message processing apparatus, characterized in that, This device is applied to network devices, which have multiple preset protocol message processing policy instances created and configured. Each message processing policy instance defines its bound ingress and egress interfaces, specific flow characteristics, the role type of the network device when processing the specific data flow, and the corresponding message processing rules. The device includes: A receiving unit is configured to receive a target flow packet from a target interface, wherein the target flow packet is the preset protocol flow packet; The determining unit is configured to determine the target flow characteristics of the target flow packet, and based on the target interface and the target flow characteristics, determine a target packet processing strategy instance that matches the target interface and the target flow characteristics; The processing unit is used to process the target flow packets based on the role type of the target packet processing strategy instance and the corresponding packet processing rules.
9. The apparatus as claimed in claim 8, characterized in that, The device further includes a creation unit; when creating and configuring multiple preset protocol message processing policy instances, the creation unit is specifically used for: Based on user instructions, a message processing policy instance of a preset protocol is created. The user instructions include the ingress and egress interfaces bound to the message processing policy instance to be created, the specific flow characteristics bound, the role type of the network device when processing the specific data flow, and the corresponding message processing rules. For each specific flow feature bound to the message processing policy instance, a corresponding doubly linked list is generated. The doubly linked list corresponding to a specific flow feature includes the ingress interface and egress interface bound to the corresponding message processing policy instance, the specific flow feature, and the role type of the network device when processing the specific data flow.
10. The apparatus as claimed in claim 9, characterized in that, The device further includes: The generation unit is used to generate a corresponding ACL for each doubly linked list. The matching items of the ACL include the inbound interface and the flow characteristics, and the action items are redirecting the specified flow to the corresponding outbound interface and assigning a flow ID to the specified flow.
11. The apparatus as claimed in claim 8, characterized in that, The device further includes: The partitioning unit is used to partition the traffic processed by the preset protocol into a dedicated target VLAN and disable the spanning tree protocol in the target VLAN; and enable the spanning tree protocol in other VLANs other than the target VLAN; so that the ports of the network device can simultaneously process the traffic belonging to the target VLAN and processed by the preset protocol and other traffic belonging to other VLANs.
12. A message processing apparatus, characterized in that, The message processing device includes: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method as described in any one of claims 1-7 according to the obtained program instructions.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing the computer to perform the steps of the method as described in any one of claims 1-7.