WO2021164546A1 - 报文处理方法、转发设备以及报文处理*** - Google Patents

报文处理方法、转发设备以及报文处理*** Download PDF

Info

Publication number
WO2021164546A1
WO2021164546A1 PCT/CN2021/074967 CN2021074967W WO2021164546A1 WO 2021164546 A1 WO2021164546 A1 WO 2021164546A1 CN 2021074967 W CN2021074967 W CN 2021074967W WO 2021164546 A1 WO2021164546 A1 WO 2021164546A1
Authority
WO
WIPO (PCT)
Prior art keywords
data structure
domain value
forwarding
value type
message
Prior art date
Application number
PCT/CN2021/074967
Other languages
English (en)
French (fr)
Inventor
张文卓
徐凯
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021164546A1 publication Critical patent/WO2021164546A1/zh
Priority to US17/889,701 priority Critical patent/US20220393978A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/06Deflection routing, e.g. hot-potato routing

Definitions

  • the embodiments of the present application relate to the field of data processing, and in particular, to a message processing method, forwarding device, and message processing system.
  • Protocol oblivious forwarding is a southbound protocol based on software defined network (SDN).
  • the POF-defined architecture includes the POF control device of the control plane and the POF forwarding device of the data plane. Among them, the POF forwarding device does not perceive the protocol, and only uses ⁇ offset, length ⁇ (ie ⁇ offset, length ⁇ ) to locate data, match and perform corresponding operations under the guidance of the POF control device, thereby completing the processing of the message . Therefore, the forwarding device based on the POF protocol can complete the processing of the message without caring about the protocol, so that there is no need to upgrade the forwarding device when the new protocol is supported, and only the corresponding forwarding table item needs to be issued through the POF control device .
  • the forwarding device needs to parse each set of offsets and lengths in the forwarding table in turn, and execute the processing of the fields corresponding to each set of offsets and lengths. Therefore, the number of memory accesses increases and the processing efficiency is increased. Lower.
  • the embodiments of the present application provide a message processing method, a forwarding device, and a message processing system, which are used to improve message processing efficiency.
  • an embodiment of the present application provides a message processing method.
  • the message processing method involves a forwarding device and includes the following steps: The first forwarding table corresponding to the text.
  • the first forwarding table includes at least one data structure, and each data structure in the at least one data structure includes a domain value type and content corresponding to the domain value type.
  • the forwarding device processes the first packet based on the domain value type of the at least one data structure and the content corresponding to the domain value type to obtain the domain value of each domain value type.
  • the forwarding table is configured by the control device as multiple data structures that can be processed in parallel.
  • the forwarding device may process the first packet corresponding to the first forwarding table based on the domain value type in at least one data structure and the content corresponding to the domain value type, that is, the forwarding
  • the device can process multiple data structures in the same forwarding table in parallel. Therefore, it is faster and more efficient than the prior art method of analyzing and processing data in the same forwarding table at one time, thereby improving the efficiency of message processing.
  • the at least one data structure includes a first data structure
  • the first data structure includes at least one first identification information
  • the first identification information is In order to indicate the first master data structure in the second forwarding table connected to the first forwarding table, the second forwarding table corresponds to the first message.
  • the aforementioned at least one data structure includes a first data structure, and the first data structure includes an identifier (that is, first identifier information) indicating the second data structure in the second forwarding table.
  • the first data structure is related to the forwarding path, and the forwarding device can learn the storage address of the second forwarding table based on the aforementioned first identification information, and of course it can also learn the information of the first data structure in the second forwarding table. Storage address.
  • the at least one data structure further includes one or more second data structures
  • the first data structure further includes one Second identification information, where the second identification information is used to indicate the second data structure connected to the first data structure in the first forwarding table.
  • the foregoing forwarding device processes the first message based on the domain value type of the at least one data structure and the content corresponding to the domain value type, respectively, including the following steps:
  • the second identification information is acquired from the first data structure, and the second data structure connected to the first data structure in the first forwarding table is read based on the second identification information;
  • the forwarding device is based on the first
  • the first field value type of the data structure and the content corresponding to the first field value type, and the second field value type of the second data structure and the content corresponding to the second field value type process the first message.
  • the forwarding device when the forwarding device is parsing the same forwarding table, when the forwarding device reads the first data structure in the forwarding table, the forwarding device can use the second identification information in the first data structure The storage address of the second data structure connected to the first data structure is determined, and the second data structure is read. Thus, the forwarding device can process the first packet based on the aforementioned first data structure and second data structure respectively. Therefore, the message processing efficiency can be improved.
  • the second data structure further includes a third identification information, and the third identification information is used to indicate the first Another second data structure connected to the second data structure in the forwarding table.
  • the same forwarding table can include multiple data structures, and the second data structure connected to the first data structure can also be connected to another second data structure.
  • the second data structure includes identification information (that is, third identification information) indicating the other second data structure. Therefore, the forwarding device can read another second data structure at the same time when reading the second data structure. At this time, the forwarding device may simultaneously process the first packet based on the foregoing first data structure and multiple second data structures. Therefore, it is beneficial to improve the efficiency of message processing.
  • the forwarding device is based on the at least After a domain value type and content corresponding to the domain value type process the first message, the method further includes: the forwarding device obtains the second forwarding table configured by the control device based on the first identification information, and based on the first identification information The second forwarding table processes the first message to obtain the domain value corresponding to the domain value type in the second forwarding table.
  • the threshold value The content corresponding to the type includes protocol indication information, and the protocol indication information is used to indicate the protocol type used by the first message.
  • the content corresponding to the aforementioned domain value type may include protocol indication information.
  • the protocol indication information is not a type name of a certain protocol or a certain protocol, but one or more fields or identifiers that can reflect the protocol type.
  • the forwarding device can learn the protocol type used by the first packet based on the foregoing protocol indication information, which facilitates the forwarding device to directly obtain corresponding information from the corresponding field in the first packet.
  • the protocol indication information includes at least one of the following: virtual local area network VLAN identifier, media access control MAC address, Internet Interconnection protocol IP address, multi-protocol label switching MPLS label, port number and automatic protection switching APS field.
  • the threshold value The content corresponding to the type includes an offset and a length, and the offset and the length are used to indicate the position of the field read by the forwarding device in the first message.
  • the content corresponding to the aforementioned domain value type may be offset and length, that is, the control device determines which field in the first packet the forwarding device should use to obtain corresponding information.
  • the forwarding device can still obtain corresponding information based on the aforementioned offset and length. It is helpful to improve the flexibility of using forwarding equipment.
  • the forwarding device The first message is processed respectively based on the domain value type of the at least one data structure and the content corresponding to the domain value type to obtain the domain value of each domain value type, including: the forwarding device parses the domain value in each data structure The content corresponding to the type; when the content corresponding to the domain value type is protocol indication information, the forwarding device determines the protocol type used by the first packet based on the protocol indication information, and determines the protocol type used by the first packet The domain value corresponding to the domain value type; and/or, when the content corresponding to the domain value type is offset and length, the forwarding device reads the field in the first packet indicated by the offset and length, The domain value corresponding to the domain value type is determined based on the fields in the first message.
  • the content corresponding to the domain value types in different data structures in the first forwarding table may be different.
  • the content corresponding to the multiple domain value types parsed by the forwarding device is mainly protocol indication information
  • the The forwarding device can use the supported protocol to process the first message more quickly; when the content corresponding to multiple domain value types parsed by the forwarding device is mainly offset and length, the users that the forwarding device can support
  • the self-defined protocol helps to improve the flexibility of the forwarding device in processing the first message.
  • an embodiment of the present application provides a forwarding device, which includes a processor and a memory.
  • the aforementioned memory is used to store multiple forwarding tables
  • the multiple forwarding tables include a first forwarding table corresponding to the first message
  • the first forwarding table includes at least one data structure
  • each of the at least one data structure This data structure includes the domain value type and the content corresponding to the domain value type.
  • the foregoing processor is configured to receive the first message, obtain the first forwarding table configured by the control device corresponding to the first message from the memory, and respectively based on the domain value type and the domain value type of the at least one data structure.
  • the content corresponding to the domain value type processes the first message to obtain the domain value of each domain value type.
  • the forwarding device combines the method introduced in the foregoing first aspect, which is beneficial to improve the processing efficiency of the message.
  • the at least one data structure includes a first data structure
  • the first data structure includes at least one first identification information
  • the first identification information is In order to indicate the first master data structure in the second forwarding table connected to the first forwarding table, the second forwarding table corresponds to the first message.
  • the processor includes a first data structure processor.
  • the first data structure processor is configured to process the first message based on the first domain value type of the first data structure and the content corresponding to the first domain value type to obtain the first domain value of the first data structure The first field value of the type.
  • the forwarding device there is a first data structure processor dedicated to processing the first data structure, that is, the first data structure in each forwarding table stored in the forwarding device can be changed from the aforementioned first data structure.
  • the data structure processor performs processing.
  • the processor further includes a second data structure processor .
  • the second data structure processor is configured to obtain the second identification information from the first data structure, and read the second field of the second data structure corresponding to the second identification information based on the second identification information Value type and content corresponding to the second domain value type; the second data structure processor is further configured to process the first domain value type based on the second domain value type of the second data structure and the content corresponding to the second domain value type Message to obtain the second domain value of the second domain value type of the second data structure.
  • the processor includes a second data structure processor in addition to the first data structure processor, where the first data structure processor is used to process the first data structure, and the second data structure processor is used to process the first data structure.
  • the device is used to process the second data structure.
  • the present application provides a data structure that includes a domain value type and content corresponding to the domain value type, and at least one of the aforementioned data structures constitutes a forwarding table.
  • this application provides a forwarding table, which is configured by a control device.
  • the forwarding table includes one or more data structures as in the foregoing third aspect and any one of the implementation manners of the third aspect.
  • this application provides a control device.
  • the control device is used to configure the forwarding table as described in the fourth aspect for the forwarding device, and transmit the forwarding table to the forwarding device.
  • this application provides a message processing system.
  • the message processing system includes control equipment and forwarding equipment.
  • the control device is used to configure one or more forwarding tables corresponding to the first message.
  • the forwarding device is configured to obtain the one or more forwarding tables, and process the first message based on the one or more forwarding tables, so as to implement the first aspect or any one of the implementation manners of the first aspect Methods.
  • the embodiments of the present application provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the method described in the foregoing first aspect or any one of the implementation manners of the first aspect .
  • an embodiment of the present application provides a computer-readable storage medium, including instructions.
  • the instructions include the forwarding table as described in the first aspect or any one of the implementations of the first aspect.
  • the instructions are on a computer During operation, the computer executes the method described in the foregoing first aspect or any one of the implementation manners of the first aspect.
  • FIG. 1 is an application scenario diagram of the message processing method in an embodiment of the application
  • FIG. 2A is a schematic diagram of an embodiment of a forwarding table configured by a control device in an embodiment of this application;
  • 2B is a schematic diagram of another embodiment of a forwarding table configured by a control device in an embodiment of the application;
  • FIG. 3 is a flowchart of a message processing method in an embodiment of the application.
  • FIG. 4 is another flowchart of a message processing method in an embodiment of this application.
  • 5A is a schematic diagram of an embodiment of a message processing method in an embodiment of the application.
  • FIG. 5B is a schematic diagram of another embodiment of a message processing method in an embodiment of this application.
  • FIG. 6 is another flowchart of a message processing method in an embodiment of this application.
  • FIG. 7 is a schematic diagram of another embodiment of a message processing method in an embodiment of this application.
  • FIG. 8 is a schematic diagram of an embodiment of a forwarding device in an embodiment of the application.
  • FIG. 9 is a schematic diagram of an embodiment of a control device in an embodiment of the application.
  • FIG. 10 is a schematic diagram of an embodiment of a message processing system in an embodiment of the application.
  • the embodiments of the present application provide a message processing method, a forwarding device, and a message processing system, which are used to improve message processing efficiency.
  • the message processing method proposed in the embodiment of the present application is mainly applied in a message processing scenario where control and forwarding are separated.
  • the control device 101 can send the forwarding table to each forwarding device 102 through the southbound interface, and then, each of the aforementioned forwarding devices 102 can use the message processing method proposed in this embodiment of the application based on the pair of forwarding tables received
  • the messages are processed to improve the efficiency of message processing.
  • the forwarding device 102 may be a switch.
  • a protocol oblivious forwarding (POF) switch, or an openflow switch, etc. the forwarding device 102 may also be a router.
  • the forwarding device 102 may also be a gateway device that performs a series of operations based on the forwarding table, etc., which is not specifically limited here.
  • the control device 101 may be a controller.
  • SDN software-defined network
  • the forwarding device 102 is a switch
  • the control device 101 is a controller that generates various forwarding tables to control the processing of packets by each switch through the aforementioned various forwarding tables.
  • the controller 101 is a controller that generates various routing tables to control the processing of packets by each router through the aforementioned various routing tables. The details are not limited here.
  • the forwarding device 102 may be any one of the above-mentioned devices or a chip in the device, which is not specifically limited here. Whether as a device or as a chip, the forwarding device 102 can be manufactured, sold, or used as an independent product. In this embodiment and subsequent embodiments, only the forwarding device is taken as an example for introduction.
  • the forwarding table is also called the flow table, which is configured (or generated) by the control device. Specifically, the control device may configure the aforementioned forwarding table based on the forwarding process of various services driven by the system forwarding database.
  • the forwarding table includes at least one data structure. This data structure can be understood as a processing command that can be individually executed by the forwarding device. When the forwarding table includes multiple data structures, at least two of the multiple data structures can be executed by the forwarding device at the same time. It can also be understood that when there are multiple data structures in the forwarding device, the forwarding device can simultaneously execute at least two of the foregoing multiple data structures.
  • Each of the aforementioned data structures contains the domain value type and the content corresponding to the domain value type.
  • the domain value type can also be called the domain type, which refers to the type of action indicated by the data structure. It can also be understood as the type of action that the forwarding device performs on packet processing when the forwarding device executes the data structure.
  • the content corresponding to the domain value type refers to the information required by the forwarding device when the action corresponding to the domain value type of the data structure is executed. It can also be understood as the data required to implement the action corresponding to the domain value type.
  • the data structure is the first data structure.
  • the multiple data structures include a first data structure and one or more second data structures.
  • the first data structure may also be referred to as the main data structure
  • the second data structure may also be referred to as the forwarding data structure.
  • the domain value type of the first data structure includes interface, lookup, unicast, multicast, routing, encapsulation, discard, or exception.
  • the domain value types of the second data structure include parsing, editing, mirroring, fragmentation/reorganization, compression, encryption, sorting, statistics, retransmission, logical operation or assignment, etc.
  • data structures of different domain value types can be used in different application scenarios, and the specific combination method is not limited here.
  • the first data structure is connected to a second data structure of the plurality of second data structures, and a connection relationship may also exist between the aforementioned plurality of second data structures.
  • the forwarding table 21 in FIG. 2A is taken as an example for introduction.
  • the forwarding table 21 includes multiple data structures.
  • the forwarding table 21 includes a first data structure (for example, a first data structure 211) and a plurality of second data structures (for example, a second data structure 212 and a second data structure 213).
  • the first data structure 211 is connected to the second data structure 212
  • the second data structure 212 is connected to the second data structure 213.
  • connection of two data structures means that the two data structures are related when they are executed by the forwarding device. It can be understood that when the forwarding device executes one of the two data structures, it can learn the existence of the other data structure and trigger the execution of the other data structure. Specifically, if two data structures are connected, one of the two data structures contains identification information for indicating the other data structure connected to the data structure. For example, the identification information may be a storage address of another data structure. Still taking the forwarding table 21 in FIG. 2A as an example, the first data structure 211 in the forwarding table 21 includes identification information for indicating the second data structure 212 connected to the first data structure 211. Similarly, there is identification information in the second data structure 212 for indicating the second data structure 213 connected to the second data structure 212. By analogy, I won't repeat it.
  • connection between one forwarding table and another forwarding table may be realized by a connection between the first data structure in one forwarding table and the first data structure in the other forwarding table.
  • the first forwarding table 21 includes a first data structure 211, a second data structure 212, and a second data structure 213;
  • the first forwarding table 22 includes a first data structure 221 and a second data structure. Structure 222.
  • the first data structure 211 includes identification information, which is used to indicate the first data structure 221.
  • the first forwarding table 21 and the second forwarding table 22 are connected through the identification information between the first data structure 211 and the first data structure 221, that is, the forwarding device executes the first data in the first forwarding table 21.
  • the existence of the first data structure 221 in the second forwarding table 22 can be learned.
  • forwarding table A forwarding table B, forwarding table C, and forwarding table D are called a tree-like distribution.
  • the domain value type of the first data structure (a0) in the forwarding table A is "interface”
  • the domain value types of the second data structure in the forwarding table A are "operation", “assignment” and “statistics”. ".
  • the first data structure (a0) in the forwarding table A is simultaneously connected to the first data structure (b0) in the forwarding table B and the first data structure (c0) in the forwarding table C, and the first data structure in the forwarding table B
  • the field value type of the data structure (b0) is "abnormal"
  • the field value type of the first data structure (c0) in the forwarding table C is "lookup”.
  • the domain value type of the second data structure connected to the first data structure (b0) in the forwarding table B is "statistics”.
  • the field value types of the second data structure sequentially connected under the first data structure (c0) in the forwarding table C are "operation", “assignment” and “algorithm” respectively.
  • the first data structure (c0) in the forwarding table C is also connected to the first data structure (d0) in the forwarding table D, and the domain value type of the first data structure (d0) is "unicast". It can be seen that there are differences in the data structure of different domain value types when composing forwarding tables, which in turn causes differences in the connection relationship between each forwarding table. It should be understood that, for ease of introduction, FIG. 2B only shows the domain value type and omits the content corresponding to each domain value type, but it does not mean that there is no content corresponding to the domain value type in each data structure.
  • the steps performed by the forwarding device in the message processing method include the following:
  • the forwarding device receives the first packet.
  • the first message may come from other forwarding equipment connected to the forwarding equipment, such as routing and forwarding equipment, switch forwarding equipment; it may also come from other non-forwarding equipment, such as service gateways, signaling gateways, security gateways, and servers. And terminal equipment, etc., which are not specifically limited here.
  • the forwarding device obtains a first forwarding table configured by the control device and corresponding to the first packet.
  • the forwarding device may directly obtain the first forwarding table corresponding to the first message from the control device.
  • the control device may also directly send the first forwarding table corresponding to the first packet to the forwarding device.
  • the control device may also store the first forwarding table corresponding to the first packet in a network management device or other external storage device, and the forwarding device may obtain the first packet from the aforementioned network management device or other external storage device.
  • the forwarding device may store the first forwarding table in a memory in the forwarding device. Therefore, the memory in the forwarding device may also be referred to as a table memory.
  • the first forwarding table includes at least one data structure, and each data structure in the at least one data structure includes a domain value type and content corresponding to the domain value type.
  • each data structure in the at least one data structure includes a domain value type and content corresponding to the domain value type.
  • the related introduction corresponding to FIG. 2A.
  • the definition of the domain value type and the content corresponding to the domain value type please refer to the related introduction in the foregoing embodiment, and the details are not repeated here.
  • the forwarding device respectively processes the first message based on the domain value type of the at least one data structure and the content corresponding to the domain value type to obtain the domain value of each domain value type.
  • the domain value refers to the processing result of the action indicated by the data structure.
  • the domain value can be one or more values calculated by the forwarding device, or it can be a character or field obtained by the forwarding device from the first message, or a value configured by the forwarding device based on the content corresponding to the aforementioned domain value type. Or multiple characters.
  • the specific value of the foregoing threshold is not limited.
  • the forwarding device parses the aforementioned first forwarding table to determine the composition of the data structure in the first forwarding table, that is, to determine the domain value type in each data structure and the content corresponding to the domain value type. Then, the forwarding device will respectively process the first message based on the domain value type of the at least one data structure and the content corresponding to the domain value type to obtain the domain value of each domain value type. For example, if the first forwarding table includes a first data structure and a second data structure, and the first data structure includes the first domain value type and content corresponding to the first domain value type. The second data structure includes a second domain value type and content corresponding to the second domain value type.
  • the forwarding device will process the first packet based on the aforementioned first domain value type and the content corresponding to the first domain value type to obtain the first domain value, and the forwarding device will be based on the aforementioned second domain value type The content corresponding to the second domain value type is processed on the first message to obtain the second domain value.
  • the forwarding device may also process the first message based on the multiple data structures to obtain multiple domain values.
  • the forwarding table is configured by the control device as multiple data structures that can be processed in parallel. After the forwarding device obtains the first forwarding table, the forwarding device can be based on the domain value type and the domain value in at least one data structure.
  • the content corresponding to the value type processes the first message corresponding to the first forwarding table, that is, the forwarding device can process multiple data structures in the same forwarding table in parallel. Therefore, compared with the prior art for the same It is faster and more efficient to analyze and process the data in the forwarding table at a time, so the processing efficiency of the message can be improved.
  • the forwarding device can trigger the processing of another data structure when it reads another data structure.
  • the steps performed by the forwarding device in the message processing method include the following:
  • the forwarding device receives the first packet.
  • Step 401 is similar to the aforementioned step 301, please refer to the related introduction in the aforementioned step 301, which will not be repeated here.
  • the forwarding device obtains a first forwarding table configured by the control device and corresponding to the first packet.
  • the forwarding device may directly obtain the first forwarding table corresponding to the first message from the control device; or indirectly obtain the first forwarding table corresponding to the first message from a network management device or other external storage device, where:
  • the first forwarding table in the network management device or other external storage device is configured by the control device. Specifically, reference may be made to the related introduction in the foregoing step 302, which will not be repeated here. It should also be understood that the aforementioned first forwarding table is stored in the table memory in the forwarding device.
  • the first forwarding table includes at least one data structure, and each data structure in the at least one data structure includes a domain value type and content corresponding to the domain value type.
  • the at least one data structure includes a first data structure.
  • the first data structure further includes at least one piece of first identification information.
  • the first identification information is used to indicate a first master data structure in a second forwarding table connected to the first forwarding table, and the second forwarding table corresponds to the first message.
  • the first data structure 211 in the first forwarding table 21 includes a piece of first identification information, and the first identification information is used to indicate the second forwarding table 22 connected to the first forwarding table 21.
  • the first data structure 221 in.
  • the at least one data structure includes a first data structure and one or more second data structures.
  • the first data structure further includes a second identification information.
  • the second identification information is used to indicate the second data structure connected to the first data structure in the first forwarding table.
  • the second data structure further includes a third identification information, and the third identification information is used to indicate another second data structure connected to the second data structure in the first forwarding table. Still taking the aforementioned FIG.
  • the first data structure 211 in the first forwarding table 21 includes a second identification information, and the second identification information is used to indicate the relationship between the first data structure in the first forwarding table 21 and the first data structure. 211 connected second data structure 212.
  • first forwarding table may include multiple second data structures in addition to one first data structure, which is not specifically limited here.
  • the forwarding device processes the first message based on the first data structure and the second data structure in the foregoing first forwarding table respectively, and obtains the first domain value and the second domain value respectively.
  • the forwarding device reads the first data structure in the first forwarding table, obtains the second identification information from the first data structure, and reads the information in the first forwarding table based on the second identification information.
  • the second data structure connected to the first data structure.
  • the forwarding device obtains the second identification information from the content corresponding to the first domain value type in the first data structure.
  • the forwarding device is based on the content corresponding to the first domain value type of the first data structure and the first domain value type, and the second domain value type of the second data structure and the content corresponding to the second domain value type.
  • the content processes the first message to obtain the first domain value and the second domain value respectively.
  • FIG. 5A is a schematic diagram of the internal structure of the forwarding device.
  • the forwarding device includes a processor, a table memory, and a message descriptor memory.
  • the processor includes a first processor and a second processor.
  • the first processor is used to process the first data structure of each forwarding table.
  • the second processor is used to process the second data structure of each forwarding table.
  • the table memory is used to store each forwarding table.
  • the message descriptor memory is used to store intermediate data generated during message processing. For example, the various domain values output by the processor.
  • the first processor in the forwarding device When the forwarding device processes the first packet based on the aforementioned first data structure and the second data structure respectively, the first processor in the forwarding device will read the first field in the first data structure The value type and the first content corresponding to the first domain value type (hereinafter referred to as the first content), and the storage address of the second data structure is determined based on the second identification information in the first content corresponding to the first domain value type (That is, the storage address of the second data structure in the table memory), and the storage address of the second data structure is sent to the second processor.
  • the first processor will process the first message based on the aforementioned first domain value type and the first content corresponding to the first domain value type, and store the determined first domain value in the message descriptor In memory.
  • the second processor After the second processor receives the storage address of the second data structure, the second processor will read the second domain value type of the second data structure and the second domain from the corresponding address in the table memory The second content corresponding to the value type (hereinafter referred to as the second content). Then, the second processor processes the first message based on the second domain value type of the second data structure and the second content corresponding to the second domain value type, and stores the determined first domain value in In the message descriptor memory.
  • the time it takes for the first processor to determine the storage address of the second data structure based on the second identification information and the time it takes to send the second data structure to the second processor is extremely short, and far less than the first processor
  • the time for processing the first message based on the first domain value type and the first content and the time for processing the first message based on the second domain value type and the second content is extremely short, and far less than the first processor
  • the forwarding device obtains the second forwarding table configured by the control device based on the first identification information, and processes the first message based on the second forwarding table to obtain the corresponding domain value type in the second forwarding table Domain value.
  • the second forwarding table is related to the first message, that is, the second forwarding table is used to provide the forwarding device with data for processing the first message.
  • the forwarding device may process the first message based on the domain value type in each data structure in the second forwarding table and the content corresponding to the domain value type to obtain the domain value corresponding to the domain value type in the second forwarding table .
  • step 404 is optional.
  • the forwarding device can perform the foregoing step 403 and step 404 at the same time.
  • the first processor in the forwarding device reads the first domain value type 1 in the first forwarding table and the first content 1 corresponding to the first domain value type 1 (hereinafter referred to as first content 1)
  • the first processor can determine the storage address of the second data structure in the first forwarding table based on the second identification information in the first content 1, and the first processor will also determine the storage address of the second data structure in the first content 1.
  • the first identification information of determines the storage address of the first data structure in the second forwarding table.
  • the first processor processes the first message based on the aforementioned first domain value type 1 and the first content 1, the first processor can obtain data from the first data structure in the second forwarding table.
  • the storage address reads the first domain value type 2 and the first content 2 corresponding to the first domain value type 2 in the second forwarding table (hereinafter referred to as the first content 2).
  • the first processor can process the first content 2 immediately after processing the aforementioned first content 1, without having to spend time performing operations such as address parsing, reading the first domain value type 2 and the first content 2 and so on. Therefore, it is advantageous for the aforementioned first processor to quickly output the first domain value 1 corresponding to the first domain value type 1 and the first domain value 2 corresponding to the first domain value type 2, and combine the aforementioned first domain value 1 and The second domain value 2 is stored in the message descriptor memory. In turn, the processing efficiency of the first processor can be improved, that is, the processing efficiency of the forwarding device can be improved.
  • the second processor uses the second content 1 corresponding to the second domain value type 1 and the second domain value type 1 in the first forwarding table (hereinafter referred to as Second content 1) While processing the first message, the second processor will also receive the storage address of the second data structure in the second forwarding table from the first processor. So that after the second processor has processed the first message based on the aforementioned second domain value type 1 and the second content 1, the second processor can be based on the second domain value type 2 in the second forwarding table.
  • the second content 2 (hereinafter referred to as the second content 2) corresponding to the second domain value type 2 processes the first message.
  • the rate at which the second processor outputs the second domain value 1 corresponding to the second domain value type 1 and the second domain value 2 corresponding to the second domain value type 2 is increased, thereby increasing the second processor to process the first domain value.
  • the efficiency of the message is improved.
  • the first message may correspond to multiple forwarding tables. While the forwarding device processes the first message based on each data structure in the first forwarding table, the forwarding device will also parse the second forwarding table. , So that the first processor in the forwarding device can process the first packet based on the first data structure in the first forwarding table, and can immediately respond to the first packet based on the first data structure in the second forwarding table. A message is processed. Therefore, the efficiency of the forwarding device in processing the first message can be improved.
  • the content corresponding to the field value type in each of the foregoing data structures will also affect the efficiency of the forwarding device in processing the first packet.
  • This solution will be introduced below.
  • the steps performed by the forwarding device in the message processing method include the following:
  • the forwarding device receives the first packet.
  • Step 601 is similar to the aforementioned step 401, please refer to the relevant introduction in the aforementioned step 401, which will not be repeated here.
  • the forwarding device obtains a first forwarding table configured by the control device and corresponding to the first packet, where the first forwarding table includes multiple data structures.
  • Step 602 is similar to the aforementioned step 402, please refer to the related introduction in the aforementioned step 402, which will not be repeated here.
  • the forwarding device parses the content corresponding to the domain value type in each data structure.
  • the content corresponding to the domain value type includes protocol indication information, and the protocol indication information is used to indicate the protocol type used by the first packet.
  • the protocol indication information is not a protocol name, but a field that can reflect the protocol type.
  • the protocol indication information includes at least one of the following: virtual local area network (VLAN) identifier, media access control (MAC) address, internet protocol (IP) address, Multi-protocol label switching (multi-protocol label switching, MPLS) labels, port numbers, and automatic protection switching (APS) fields.
  • VLAN virtual local area network
  • MAC media access control
  • IP internet protocol
  • MPLS Multi-protocol label switching
  • MPLS multi-protocol label switching
  • APS automatic protection switching
  • the introduction takes the IP address as an example.
  • the IP address can be an IP address based on the IPv4 protocol or IPv6.
  • the IP address can be an IP address or instruction indicating the transmission control protocol (TCP)
  • TCP transmission control protocol
  • the IP address of the user datagram protocol (UDP) indicates the IP address of the Internet Control Message Protocol (ICMP), and the IP address of the Internet Group Management Protocol (Internet Group Management Protocol, IGMP), Or indicate any one or more of the IP addresses of the stream control transmission protocol (stream control transmission protocol, SCTP).
  • ICMP Internet Control Message Protocol
  • IGMP Internet Group Management Protocol
  • SCTP stream control transmission protocol
  • the protocol type used by the message can also be determined by the aforementioned VLAN identifier, MAC address, MPLS label, and port number, which will not be repeated here.
  • the content corresponding to the domain value type includes an offset and a length
  • the offset and the length are used to indicate the position of the field read by the forwarding device in the first packet.
  • the forwarding device determines the protocol type used by the first packet based on the protocol indication information, and determines the domain value based on the protocol type used by the first packet The domain value corresponding to the type.
  • the forwarding device reads the field in the first packet indicated by the offset and length, and determines based on the field in the first packet The domain value corresponding to this domain value type.
  • the forwarding table since the forwarding table includes multiple data structures, and the content corresponding to the domain value type in each data structure may be different, there is a corresponding first domain value type in the first data structure in the same forwarding table
  • the first content is protocol indication information
  • the second content corresponding to the second domain value type in the second data structure is the case of offset and length. Therefore, when the forwarding device processes the first packet,
  • the aforementioned step 604a and step 604b may exist at the same time.
  • a forwarding table consisting of only the first data structure and the second data structure, there may be the following four situations:
  • the first content corresponding to the first domain value type in the first data structure is protocol indication information; the second content corresponding to the second domain value type in the second data structure is offset and length.
  • the first content corresponding to the first domain value type in the first data structure is offset and length; the second content corresponding to the second domain value type in the second data structure is protocol indication information.
  • the first content corresponding to the first domain value type in the first data structure and the second content corresponding to the second domain value type in the second data structure are both protocol indication information, and the protocol indication information indicates The protocol used by the first message may be the same or different.
  • the first content corresponding to the first domain value type in the first data structure and the second content corresponding to the second domain value type in the second data structure are both offset and length.
  • the forwarding device can use the supported protocol to process the first packet more quickly.
  • the content corresponding to the multiple domain value types parsed by the forwarding device is mainly offset and length, the user-defined protocol that the forwarding device can support is conducive to improving the flexibility of the forwarding device to process the first packet .
  • sequence of performing the foregoing step 604a and the foregoing step 604b is determined according to the sequence of the processing of each data structure by the forwarding device in the foregoing step 403 and step 404.
  • sequence of the processing of each data structure by the forwarding device in the foregoing step 403 and step 404 is determined according to the sequence of the processing of each data structure by the forwarding device in the foregoing step 403 and step 404.
  • the forwarding table is configured by the control device as multiple data structures that can be processed in parallel. After the forwarding device obtains the first forwarding table, the forwarding device can be based on the domain value type and the domain value in at least one data structure. The content corresponding to the value type processes the first message corresponding to the first forwarding table. Therefore, the message processing efficiency can be improved.
  • the forwarding device can use the supported protocol to process the first message more quickly.
  • the user-defined protocol that the forwarding device can support is conducive to improving the flexibility of the forwarding device to process the first packet .
  • FIG. 7 shows multiple forwarding tables required by the forwarding device to complete the aforementioned VPLS service.
  • multiple forwarding tables required for the processing flow of the VPLS service can be divided into domains, including interface domains, routing domains, forwarding domains, and encapsulation domains.
  • each domain contains one or more forwarding tables.
  • the interface domain includes forwarding table 1 and forwarding table 2;
  • the routing domain includes forwarding table 4 and forwarding table 5;
  • the forwarding domain includes forwarding table 6;
  • the encapsulation domain includes forwarding table 7.
  • Each forwarding table contains one or more data structures, and the same forwarding table can have protocol-related data structures (that is, the content corresponding to the field value type of the data structure is protocol indication information) and protocol-independent data structures (That is, the content corresponding to the field value type of the data structure includes offset and length).
  • the first data structure (ie, the main data structure) of the forwarding table 1 is a protocol-independent data structure.
  • the domain value type of the first data structure of the forwarding table 1 is "interface"
  • the content corresponding to the domain value type is "direct search, ⁇ 6bit, 8bit ⁇ ".
  • the first data structure (ie, the main data structure) of the forwarding table 4 is a protocol-related data structure.
  • the domain value type of the first data structure of the forwarding table 4 is "bridging", and the content corresponding to the domain value type is "bridge identification, VLANID, and destination MAC address”.
  • the second data structure (ie, the forwarding data structure) of the forwarding table 5 is a protocol-independent data structure.
  • the domain value type of the second data structure of the forwarding table 5 is "route”, and the content corresponding to the domain value type is "set out interface, ⁇ 2bit, 6bit ⁇ ".
  • the rest of the data structure is similar to the foregoing example, and the details are not repeated here.
  • the forwarding device when the forwarding device reads each data structure in the forwarding table 1, it can directly look up where the offset in the message 1 corresponding to the forwarding table 1 is 6 bits and the length is 8 bits. At the same time, the forwarding device will also set a physical interface, and write the physical interface into the position of the message 1 with an offset of 2 bits and a length of 8 bits. Then, the forwarding device respectively parses the protocol indication information VLAN ID and MAC address to determine the protocol type used by the message 1. Then, the forwarding device reads the data structure in the forwarding table 2, and can search for the logical interface where the offset in the message 1 corresponding to the forwarding table 2 is 2 bits and the length is 18 bits. Then, the forwarding device will read the data structure in the forwarding table 3, and the bridge identifier can be set at the offset of 2bit and the length of 8bit in the message 1 corresponding to the forwarding table 3 to complete the search of the bridge identifier.
  • the forwarding device will read the data structure in the forwarding table 4, and use the bridge identifier, VLANID, and destination MAC address as keywords to find the bridge forwarding table.
  • the forwarding device can search for the offset in the message 1 corresponding to the forwarding table 5 where the offset is 0 bit and the length is 10 bits.
  • the forwarding device will also set the outgoing interface and write the outgoing interface to the position of the message 1 with an offset of 2 bits and a length of 6 bits.
  • the forwarding device will read each data structure in the forwarding table 6, and look for the offset in the message 1 corresponding to the forwarding table 6 where the offset is 2 bits and the length is 6 bits. Then, the processing of the switching network information is completed, including information such as the destination board, the destination port, and the index of the encapsulation table.
  • the forwarding device will read each data structure in the forwarding table 7, and look for the offset in the message 1 corresponding to the forwarding table 7 where the offset is 2 bits and the length is 6 bits. Then, complete the Ethernet header encapsulation, including information such as destination MAC address, source MAC address, and Ethernet type.
  • bit value of the offset and the bit data of the length are only for example. In practical applications, the bit value of the offset and the bit value of the length may be different from the foregoing example. Specifically, this embodiment does not limit the bit value of the foregoing offset and the bit value of the length.
  • this embodiment provides a schematic structural diagram of a forwarding device 80.
  • the forwarding device in the method embodiments corresponding to FIG. 3, FIG. 4, and FIG. 6 may be based on the structure of the forwarding device 80 shown in FIG. 8 in this embodiment.
  • the forwarding device in the example corresponding to FIG. 5A and FIG. 5B may be combined with the forwarding device 80 shown in FIG. 8 in this embodiment.
  • the forwarding device 80 includes at least one processor 801 and at least one memory 802.
  • the processor 801 which may also be called a message processor or a packet processor, may be used for data structures in the forwarding table (for example, the aforementioned first data structure and the aforementioned second data structure; or, the aforementioned master Data structure and the aforementioned forwarding data structure) and messages (for example, the aforementioned first message) are processed, and the entire forwarding device is controlled, the software program is executed, and the data of the software program is processed, for example, to support the execution of the forwarding device 80 The actions described in the previous embodiment.
  • the processor 801 in the forwarding device 80 may include a first processor 8011 and a second processor 8012.
  • the first processor 8011 is used to process the first data structure (or main data structure) in each forwarding table
  • the second processor 8012 is used to process the second data structure (or forwarding data) in each forwarding table.
  • Data structure) for processing.
  • the first processor 8011 and the second processor 8012 may be two independent processors, or may be two independent modules with different functions in the aforementioned processor 801, which are not specifically described here. limited. Data exchange can be performed between the first processor 8011 and the second processor 8012.
  • the first processor 8011 may send to the second processor 8012 the storage address of the second data structure indicated based on the second identification information in the first data structure.
  • the memory 802 is mainly used to store various forwarding tables and messages configured by the control device, and data such as domain values output by the aforementioned processor 801. For example, the first forwarding table, the second forwarding table, the first message, the first domain value, and the second domain value, etc.
  • the memory 802 may exist independently and is connected to the processor 801. Alternatively, the memory 802 may also be integrated with the processor 801, for example, integrated in one or more chips.
  • the memory 802 is also used to store program codes for executing the technical solutions of the embodiments of the present application. The foregoing program codes can be controlled and executed by the processor 801, and various types of computer program codes that are executed can also be regarded as drivers of the processor 801.
  • the memory 802 includes a table memory 8021 and a message descriptor memory 8022.
  • the table memory 8021 is used to store various forwarding tables related to the message (for example, the first forwarding table and the second forwarding table, etc.).
  • the message descriptor memory 8022 is used to store data generated by the processor 801 during message processing.
  • the data may be the domain value corresponding to the domain value type output by the processor 801 (for example, the first domain value and the second domain value, etc.).
  • FIG. 8 only shows an example of a forwarding device with one table memory and one message descriptor memory.
  • the forwarding device 80 may include multiple table memories or multiple file descriptor memories, which is not limited here.
  • the processor 801 is configured to obtain a first forwarding table corresponding to the first message configured by the control device, and store the forwarding table in the aforementioned table memory 8021.
  • the first forwarding table includes at least one data structure, and each data structure in the at least one data structure includes a domain value type and content corresponding to the domain value type.
  • the processor 801 is further configured to process the first message respectively based on the domain value type of the at least one data structure and the content corresponding to the domain value type, to obtain the domain value of each domain value type, and to combine the aforementioned domain values.
  • the value is stored in the aforementioned message descriptor memory 8022. For the rest, reference may be made to the steps performed by the forwarding device in the embodiments corresponding to FIG. 3, FIG. 4, and FIG. 6, which will not be repeated here.
  • FIG. 9 is a schematic structural diagram of a control device 90 provided in an embodiment of the application.
  • the control device in the method embodiments corresponding to FIG. 3, FIG. 4, and FIG. 6 may be based on the structure of the control device 90 shown in FIG. 9 in this embodiment.
  • the control device 90 includes at least one processor 901 and at least one memory 902.
  • the processor 901 is used to configure various forwarding tables (for example, the aforementioned first forwarding table and second forwarding table) corresponding to the message, and to control the entire control device, execute software programs, and process data of the software programs, such as It is used to support the control device 90 to perform the actions described in the foregoing embodiments.
  • the memory 902 is mainly used to store various forwarding tables configured by the control device. For example, the first forwarding table, the second forwarding table, and so on.
  • the memory 902 may exist independently and is connected to the processor 901.
  • the memory 902 may also be integrated with the processor 901.
  • the memory 902 is also used to store program codes for executing the technical solutions of the embodiments of the present application.
  • the foregoing program codes can be controlled and executed by the processor 901, and various types of computer program codes that are executed can also be regarded as drivers of the processor 901.
  • control device 90 further includes an interface device 903, which is used to connect to a forwarding device or an external memory, and output the aforementioned forwarding tables through the interface device 903.
  • interface device 903 may be a southbound interface.
  • FIG. 9 only shows one processor and one memory.
  • the control device 90 may have multiple processors or multiple memories, which are not specifically limited here. The rest can refer to the steps executed by the control device in the foregoing embodiment, which will not be repeated here.
  • FIG. 10 is a schematic structural diagram of a message processing system 100 according to an embodiment of the application.
  • the message processing system 100 includes a control device 1001 and a forwarding device 1002.
  • the control device 1001 and the forwarding device 1002 are connected through a southbound interface.
  • the specific structure of the forwarding device 1002 can refer to the embodiment corresponding to FIG. 8, and the specific structure of the control device 1001 can refer to the embodiment corresponding to FIG. 9, which will not be repeated here.
  • the message processing system 100 further includes an external storage device 1003 for storing the forwarding table configured by the control device 1001, so that the forwarding device 1002 can obtain the forwarding table from the external storage device 1003.
  • the external storage device 1003 may also store a message, and the forwarding device 1002 may receive the message from the external storage device 1003.
  • the aforementioned forwarding device may have functional units (means) corresponding to the steps of the method or process of the forwarding device.
  • One or more of the above modules or units can be implemented by software, hardware or a combination of both.
  • the software exists in the form of computer program instructions and is stored in the memory, and the processor can be used to execute the program instructions to implement the above method flow.
  • the processor in the embodiment of the present application may include, but is not limited to, at least one of the following: central processing unit CPU, microprocessor, digital signal processor (digital signal processor, DSP), microcontroller (microcontroller unit, MCU), network Various computing devices that run software, such as a network processor (NP) or artificial intelligence processor. Each computing device may include one or more cores for executing software instructions for calculation or processing.
  • the processor can be a single semiconductor chip, or it can be integrated with other circuits to form a semiconductor chip.
  • the processor can be combined with other circuits (such as codec circuits, hardware acceleration circuits, or various bus and interface circuits) to form a system-on-chip ( system-on-a-chip, SoC), or as an application specific integrated circuit (ASIC) built-in processor integrated in the ASIC, the ASIC integrated with the processor can be packaged separately or It can also be packaged with other circuits.
  • the processor may also include necessary hardware accelerators, such as field programmable gate array (FPGA) and programmable logic device (FPGA). device, PLD), or a logic circuit that implements dedicated logic operations.
  • FPGA field programmable gate array
  • FPGA programmable logic device
  • PLD programmable logic circuit that implements dedicated logic operations.
  • the memory in the embodiment of the present application may include at least one of the following types: read-only memory ROM or other types of static storage devices that can store static information and instructions, random access memory RAM, or other types of information and instructions that can be stored
  • the dynamic storage device may also be an electrically erasable programmable read-only memory (EEPROM). The details are not limited here.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请实施例提供了一种报文处理方法、转发设备以及报文处理***,应用于交换机、路由器或其他控制面与转发面相分离的设备或***中。在该报文处理方法中,该转发设备获取由控制设备配置的与该第一报文对应的第一转发表,其中,该第一转发表包括至少一个数据结构,该至少一个数据结构中的每个数据结构包括域值类型和该域值类型对应的内容。然后,该转发设备分别基于该至少一个数据结构的域值类型和该域值类型对应的内容处理该第一报文,得到每个该域值类型的域值,因此,可以提高报文的处理效率。

Description

报文处理方法、转发设备以及报文处理***
本申请要求于2020年2月18日提交中国国家知识产权局、申请号为202010100254.6、发明名称为“报文处理方法、转发设备以及报文处理***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及数据处理领域,尤其涉及一种报文处理方法、转发设备以及报文处理***。
背景技术
协议无感知转发(protocol oblivious forwarding,POF)是一种基于软件定义网络(software defined network,SDN)的南向协议。在POF定义的架构中包括控制平面的POF控制设备和数据平面的POF转发设备。其中,POF转发设备不感知协议,仅在POF控制设备的指导下通过{偏移,长度}(即{offset,length})来定位数据、匹配并执行对应的操作,从而完成对报文的处理。因此,基于POF协议的转发设备可以在不关心协议的情况下完成对报文的处理,使得在支持新协议时无需对转发设备进行升级,仅需通过POF控制设备下发对应转发表项即可。
在前述POF方案中,转发设备需依次解析该转发表中的每一组偏移和长度,并执行该每一组偏移和长度对应的字段的处理,因此,导致内存访问次数增加,处理效率较低。
发明内容
本申请实施例提供了一种报文处理方法、转发设备以及报文处理***,用于提高报文处理效率。
第一方面,本申请实施例提供了一种报文处理方法,该报文处理方法涉及转发设备,包括如下步骤:转发设备接收第一报文,并获取由控制设备配置的与该第一报文对应的第一转发表。其中,该第一转发表包括至少一个数据结构,该至少一个数据结构中的每个数据结构包括域值类型和该域值类型对应的内容。然后,该转发设备分别基于该至少一个数据结构的域值类型和该域值类型对应的内容处理该第一报文,得到每个该域值类型的域值。
本实施例中,转发表由控制设备配置为多个可以并行处理的数据结构。当转发设备获取了第一转发表之后,该转发设备可以分别基于至少一个数据结构中的域值类型和该域值类型对应的内容处理该第一转发表对应的第一报文,即该转发设备可以对同一张转发表中的多个数据结构进行并行处理。因此,相比于现有技术中对同一张转发表中的数据一次进行解析处理的方式更加快捷高效,因此可以提高报文的处理效率。
根据第一方面,本申请实施例第一方面的第一种实施方式中,该至少一个数据结构包括第一数据结构,该第一数据结构包括至少一个第一标识信息,该第一标识信息用于指示 与该第一转发表相连的第二转发表中的第一主数据结构,该第二转发表与该第一报文对应。
本实施方式中,提出前述至少一个数据结构中包括第一数据结构,并且,该第一数据结构中包括指示第二转发表中的第二数据结构的标识(即第一标识信息)。也可以理解为,该第一数据结构与转发路径相关,该转发设备可以基于前述第一标识信息获知第二转发表的存储地址,当然也可以获知该第二转发表中的第一数据结构的存储地址。本实施方式中,有利于该转发设备读取第一转发表中的第一数据结构时便开始为读取第二转发表中的第二数据结构做准备,有利于提高转发设备读取转发表以及转发表中的各个数据结构的效率。
根据第一方面的第一种实施方式,本申请实施例第一方面的第二种实施方式中,该至少一个数据结构还包括一个或多个第二数据结构,该第一数据结构还包括一个第二标识信息,该第二标识信息用于指示该第一转发表中与该第一数据结构相连的该第二数据结构。
基于前述第一数据结构和第二数据结构,前述转发设备分别基于该至少一个数据结构的域值类型和该域值类型对应的内容处理该第一报文的过程可以包括如下步骤:转发设备从该第一数据结构中获取该第二标识信息,并基于该第二标识信息读取该第一转发表中与该第一数据结构相连的该第二数据结构;该转发设备分别基于该第一数据结构的第一域值类型和该第一域值类型对应的内容,和该第二数据结构的第二域值类型和该第二域值类型对应的内容处理该第一报文。
本实施方式中,该转发设备在解析同一张转发表时,当该转发设备读取该转发表中的第一数据结构时,该转发设备便可以通过该第一数据结构中的第二标识信息确定与该第一数据结构相连的第二数据结构的存储地址,并读取该第二数据结构。于是,该转发设备便可以分别基于前述第一数据结构和第二数据结构对该第一报文进行处理。因此,可以提高报文的处理效率。
根据第一方面的第二种实施方式,本申请实施例第一方面的第三种实施方式中,该第二数据结构还包括一个第三标识信息,该第三标识信息用于指示该第一转发表中与该第二数据结构相连的另一个第二数据结构。
本实施方式中,提出同一张转发表中可以包含多个数据结构,与该第一数据结构相连的第二数据结构也可以与另一个第二数据结构相连。此外,该第二数据结构中包含指示该另一个第二数据结构的标识信息(即第三标识信息)。因此,该转发设备在读取第二数据结构时可以同时读取另第二数据结构。此时,该转发设备可以基于前述第一数据结构和多个第二数据结构同时对该第一报文进行处理。因此,有利于提高报文的处理效率。
根据第一方面的第一种实施方式至第一方面的第三种实施方式中的任意一种实施方式,本申请实施例第一方面的第四种实施方式中,该转发设备分别基于该至少一个域值类型和该域值类型对应的内容处理该第一报文之后,该方法还包括:该转发设备基于该第一标识信息获取由控制设备配置的该第二转发表,并基于该第二转发表处理该第一报文,得到该第二转发表中的域值类型对应的域值。
根据第一方面、第一方面的第一种实施方式至第一方面的第四种实施方式中的任意一种实施方式,本申请实施例第一方面的第五种实施方式中,该域值类型对应的内容包括协议指示信息,该协议指示信息用于指示该第一报文使用的协议类型。
本实施方式中,提出前述域值类型对应的内容可以包括协议指示信息,该协议指示信息不是某一个或某一个协议的类型名称,而是一个或多个可以反映协议类型的字段或标识。在这种实施方式中,转发设备基于前述协议指示信息可以获知该第一报文使用的协议类型,有利于转发设备直接从该第一报文中的相应字段中获取相应的信息。
根据第一方面的第五种实施方式,本申请实施例第一方面的第六种实施方式中,该协议指示信息包括如下至少一项:虚拟局域网VLAN标识符,媒体接入控制MAC地址,网际互连协议IP地址,多协议标记交换MPLS标签,端口号以及自动保护倒换APS字段。
根据第一方面、第一方面的第一种实施方式至第一方面的第六种实施方式中的任意一种实施方式,本申请实施例第一方面的第七种实施方式中,该域值类型对应的内容包括偏移和长度,该偏移和长度用于指示该转发设备读取的字段在该第一报文中的位置。
本实施方式中,提出前述域值类型对应的内容可以为偏移和长度,即由控制设备确定转发设备到该第一报文中的哪个字段中获取相应的信息。在这样的方案中,即使该转发设备不支持该第一报文使用的协议,该转发设备依然可以基于前述偏移和长度获知相应的信息。有利于提高转发设备的使用灵活性。
根据第一方面、第一方面的第一种实施方式至第一方面的第七种实施方式中的任意一种实施方式,本申请实施例第一方面的第八种实施方式中,该转发设备分别基于该至少一个数据结构的域值类型和该域值类型对应的内容处理该第一报文,得到每个该域值类型的域值,包括:该转发设备解析各个数据结构中的域值类型对应的内容;当该域值类型对应的内容为协议指示信息时,该转发设备基于该协议指示信息确定该第一报文使用的协议类型,并基于该第一报文使用的协议类型确定该域值类型对应的域值;和/或,当该域值类型对应的内容为偏移和长度时,该转发设备读取该偏移和长度指示的位于该第一报文中的字段,并基于该第一报文中的字段确定该域值类型对应的域值。
本实施方式中,提出该第一转发表中的不同数据结构中的域值类型对应的内容可以不同,当该转发设备解析的多个域值类型对应的内容中主要为协议指示信息时,该转发设备可以利用已支持的协议更加快速地对该第一报文进行处理;当该转发设备解析的多个域值类型对应的内容中主要为偏移和长度时,该转发设备可以支持的用户自定义的协议,有利于提高该转发设备处理该第一报文的灵活性。
第二方面,本申请实施例提供了一种转发设备,该转发设备包括:处理器和存储器。其中,前述存储器,用于存储多个转发表,该多个转发表包括与第一报文对应的第一转发表,该第一转发表包括至少一个数据结构,该至少一个数据结构中的每个数据结构包括域值类型和该域值类型对应的内容。前述处理器,用于接收该第一报文,从该存储器获取由控制设备配置的与该第一报文对应的该第一转发表,并且,分别基于该至少一个数据结构的域值类型和该域值类型对应的内容处理该第一报文,得到每个该域值类型的域值。
本实施例中,转发设备结合前述第一方面所介绍的方法,有利于提高报文的处理效率。
根据第二方面,本申请实施例第二方面的第一种实施方式中,该至少一个数据结构包括第一数据结构,该第一数据结构包括至少一个第一标识信息,该第一标识信息用于指示与该第一转发表相连的第二转发表中的第一主数据结构,该第二转发表与该第一报文对应。
根据第二方面的第一种实施方式,本申请实施例第二方面的第二种实施方式中,该处理器包括第一数据结构处理器。该第一数据结构处理器,用于基于该第一数据结构的第一域值类型和该第一域值类型对应的内容处理该第一报文,得到该第一数据结构的第一域值类型的第一域值。
本实施方式中,该转发设备中的处理器中有专用于处理第一数据结构的第一数据结构处理器,即转发设备中存储的各个转发表中的第一数据结构均可以由前述第一数据结构处理器进行处理。在这样的实施方式中,有利于转发设备将对数据结构的处理任务和对其他数据的处理任务分开,可以避免其他数据占用处理资源,有利于提高处理器基于前述数据结构处理第一报文的效率。
根据第二方面的第一种实施方式至第二种实施方式中的任意一种实施方式,本申请实施例第二方面的第三种实施方式中,该处理器还包括第二数据结构处理器。其中,该第二数据结构处理器,用于从该第一数据结构中获取该第二标识信息,并基于该第二标识信息读取该第二标识信息对应的第二数据结构的第二域值类型和该第二域值类型对应的内容;该第二数据结构处理器,还用于基于该第二数据结构的第二域值类型和该第二域值类型对应的内容处理该第一报文,得到该第二数据结构的第二域值类型的第二域值。
本实施方式中,提出该处理器除了包括第一数据结构处理器之外还包括第二数据结构处理器,其中,第一数据结构处理器用于对第一数据结构进行处理,第二数据结构处理器用于对第二数据结构进行处理。在这样的方案中,相当于两个处理器同时基于前述转发表对第一报文进行处理,因此缩短了处理器的处理时长,提高了处理器执行转发表的效率。
需要说明的是,本申请实施例还有多种具体其他实施方式,具体可参见第一方面的具体实施方式和其有益效果,在此不再赘述。
第三方面,本申请提供了一种数据结构,该数据结构包括域值类型和该域值类型对应的内容,至少一个前述数据结构组成一个转发表。
需要说明的是,本申请实施例还有多种具体其他实施方式,具体可参见第一方面或第二方面中关于数据结构的具体实施方式和其有益效果,在此不再赘述。
第四方面,本申请提供了一种转发表,该转发表由控制设备配置。该转发表包括一个或多个如前述第三方面以及第三方面任意一种实施方式中的数据结构。
第五方面,本申请提供了一种控制设备。该控制设备用于为转发设备配置如前述第四方面所介绍的转发表,并将前述转发表传输至转发设备。
第六方面,本申请提供了一种报文处理***。该报文处理***包括控制设备和转发设备。其中,该控制设备,用于配置与第一报文对应的一个或多个转发表。该转发设备,用于获取该一个或多个转发表,并基于该一个或多个转发表对该第一报文进行处理,以实现如第一方面或第一方面的任一种实施方式中的方法。
第七方面,本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得该计算机执行如前述第一方面或第一方面的任一种实施方式所介绍的方法。
第八方面,本申请实施例提供了一种计算机可读存储介质,包括指令,该指令包括如第一方面或第一方面的任一种实施方式所介绍的转发表,当该指令在计算机上运行时,以 使得计算机执行如前述第一方面或第一方面的任一种实施方式所介绍的方法。
附图说明
图1为本申请实施例中报文处理方法的一个应用场景图;
图2A为本申请实施例中控制设备配置的转发表的一个实施例示意图;
图2B为本申请实施例中控制设备配置的转发表的另一个实施例示意图;
图3为本申请实施例中报文处理方法的一个流程图;
图4为本申请实施例中报文处理方法的另一个流程图;
图5A为本申请实施例中报文处理方法的一个实施例示意图;
图5B为本申请实施例中报文处理方法的另一个实施例示意图;
图6为本申请实施例中报文处理方法的另一个流程图;
图7为本申请实施例中报文处理方法的另一个实施例示意图;
图8为本申请实施例中转发设备的一个实施例示意图;
图9为本申请实施例中控制设备的一个实施例示意图;
图10为本申请实施例中报文处理***的一个实施例示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应理解,这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含。例如,包含了一系列步骤或单元的过程、方法、***、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
应理解,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
本申请实施例提供了一种报文处理方法、转发设备以及报文处理***,用于提高报文处理效率。
本申请实施例所提出的报文处理方法主要应用于控制与转发分离的报文处理场景中。以图1为例,控制设备101可以通过南向接口将转发表发送至各个转发设备102,然后,前述各个转发设备102可以采用本申请实施例提出的报文处理方法基于该转发表对接收到的报文进行处理,以提高报文处理效率。
其中,转发设备102可以为交换机(switch)。例如,协议无感知转发(protocol oblivious forwarding,POF)交换机,或者,openflow交换机等;该转发设备102也可以为路由设备(router)。例如,路由器。该转发设备102还可以为基于转发表执行一系列操作的网关设 备等,具体此处不做限定。此外,该控制设备101可以为控制器。例如,软件定义的网络(software defined network,SDN)控制器等。当该转发设备102为交换机时,该控制设备101为生成各种转发表的控制器,以通过前述各种转发表控制各个交换机对报文的处理。当该转发设备102为路由器时,该控制器101为生成各种路由表的控制器,以通过前述各种路由表控制各个路由器对报文的处理。具体此处不做限定。
应当理解的是,该转发设备102可以是上述任意一种设备或该设备中的芯片,具体此处不做限定。无论作为设备还是作为芯片,该转发设备102都可以作为独立的产品进行制造、销售或者使用。在本实施例以及后续实施例中,仅以转发设备为例进行介绍。
在介绍本申请实施例提出的报文处理方法之前,先对本申请实施例提出的转发表进行介绍。
转发表也被称为流表,是由控制设备配置(或生成)的。具体地,控制设备可以基于***转发数据库驱动各种业务的转发流程配置前述转发表。该转发表包括至少一个数据结构。该数据结构可以理解为是可以由转发设备单独执行的处理命令。当该转发表包括多个数据结构时,该多个数据结构中至少存在两个数据结构可以同时被转发设备执行。也可以理解为,当转发设备中存在多个数据结构时,该转发设备可以同时执行前述多个数据结构中的至少两个数据结构。
前述各个数据结构包含域值类型和该域值类型对应的内容。其中,域值类型,也可以被称为域类型,指该数据结构指示的动作的种类。也可以理解为,转发设备执行该数据结构时,该转发设备对报文处理的动作的种类。该域值类型对应的内容指执行该数据结构的域值类型对应的动作时转发设备需要的信息。也可以理解为,该实现该域值类型对应的动作所需要的数据。
当该转发表中仅包含一个数据结构时,该数据结构为第一数据结构。当该转发表包括多个数据结构时,该多个数据结构包括一个第一数据结构以及一个或多个第二数据结构。其中,第一数据结构也可以被称为主数据结构,第二数据结构也可以被称为转发数据结构。本申请实施例不对前述数据结构在实际应用中的称谓进行限定。其中,第一数据结构的域值类型包括接口、查找、单播、多播、选路、封装、丢弃或异常等。第二数据结构的域值类型包括解析、编辑、镜像、分片/重组、压缩、加密、排序、统计、重传、逻辑运算或赋值等。在实际应用中,不同应用场景下可以使用不同域值类型的数据结构,具体组合方式在此不做限定。
第一数据结构与多个第二数据结构中的一个第二数据结构相连,前述多个第二数据结构之间也可以存在连接关系。为便于理解,以图2A中的转发表21为例进行介绍。该转发表21包括多个数据结构。具体地,该转发表21包括一个第一数据结构(例如第一数据结构211)和多个第二数据结构(例如,第二数据结构212和第二数据结构213)。其中,第一数据结构211与第二数据结构212相连,第二数据结构212与第二数据结构213相连。
两个数据结构相连指的是两个数据结构在被转发设备执行时存在关联。可以理解为,该转发设备执行两个数据结构中的其中一个时,可以获知另一个数据结构的存在,并触发执行另一个数据结构。具体地,若两个数据结构相连,则两个数据结构中的其中一个包含 一个标识信息,用于指示与该数据结构相连的另一个数据结构。例如,该标识信息可以为另一个数据结构的存储地址。依然以前述图2A中的转发表21为例,该转发表21中的第一数据结构211中存在一个标识信息,用于指示与第一数据结构211相连的第二数据结构212。类似地,该第二数据结构212中存在一个标识信息,用于指示与该第二数据结构212相连的第二数据结构213。以此类推,不再赘述。
可选地,多个转发表之间也存在连接关系。具体地,一个转发表与另一个转发表之间的连接可以通过其中一个转发表中的第一数据结构和另一个转发表中的第一数据结构之间的连接实现。以图2A中的转发表21为例,第一转发表21包括第一数据结构211、第二数据结构212和第二数据结构213;第一转发表22包括第一数据结构221和第二数据结构222。其中,第一数据结构211中包含一个标识信息,用于指示第一数据结构221。因此,第一转发表21与第二转发表22之间通过第一数据结构211和第一数据结构221之间的标识信息实现连接,即转发设备在执行第一转发表21中的第一数据结构211时可以获知第二转发表22中的第一数据结构221的存在。
前述多个转发表通过各个第一数据结构之间的连接可以形成链状分布或树状分布。以图2B为例,转发表A、转发表B、转发表C以及转发表D称树状分布。其中,转发表A中的第一数据结构(a0)的域值类型为“接口”,该转发表A中的第二数据结构分别为的域值类型为“运算”、“赋值”和“统计”。该转发表A中的第一数据结构(a0)同时与转发表B中的第一数据结构(b0)和转发表C中的第一数据结构(c0)相连,该转发表B中的第一数据结构(b0)的域值类型为“异常”,该转发表C中的第一数据结构(c0)的域值类型为“查找”。此外,该转发表B中与该第一数据结构(b0)相连的第二数据结构的域值类型为“统计”。该转发表C中该第一数据结构(c0)下依次连接的第二数据结构的域值类型分别为“运算”、“赋值”和“算法”。此外,该转发表C中的第一数据结构(c0)还与转发表D中的第一数据结构(d0)相连,该第一数据结构(d0)的域值类型为“单播”。由此可见,不同的域值类型的数据结构在组成转发表时存在差异,进而造成各个转发表之间的连接关系存在差异。应当理解的是,图2B为便于介绍仅示出了域值类型、省略了各个域值类型对应的内容,但并不代表各个数据结构中不存在域值类型对应的内容。
下面将基于前述各种数据结构组成的转发表对本实施例中报文处理方法进行介绍,如图3所示,该报文处理方法中的转发设备执行的步骤包括如下:
301、转发设备接收第一报文。
其中,该第一报文可以来自与该转发设备相连的其他转发设备,例如,路由转发设备、交换机转发设备;也可以来自其他非转发设备,例如,业务网关、信令网关、安全网关、服务器以及终端设备等,具体此处不做限定。
302、该转发设备获取由控制设备配置的与该第一报文对应的第一转发表。
由于该转发设备对第一报文的处理是基于转发表中的各个数据结构而进行的,因此,该转发设备需要获取与该第一报文对应的第一转发表,该第一转发表是由控制设备配置的。该转发设备可以直接从控制设备获取该第一报文对应的第一转发表。也可以由该控制设备直接向该转发设备发送该第一报文对应的第一转发表。还可以由该控制设备将该第一报文 对应的第一转发表存储于网络管理设备或者其他外部存储设备中,由该转发设备从前述网络管理设备或者其他外部存储设备中获取该第一报文对应的第一转发表。具体此处不做限定。可选的,该转发设备可以将该第一转发表存储于该转发设备中的存储器中,因此,该转发设备中的存储器也可以被称为表存储器。
其中,该第一转发表包括至少一个数据结构,该至少一个数据结构中的每个数据结构包括域值类型和该域值类型对应的内容。该第一转发表的具体结构可以参阅前述图2A对应的相关介绍,该域值类型和该域值类型对应的内容的定义可以参阅前述实施例中的相关介绍,具体此处不再赘述。
303、该转发设备分别基于该至少一个数据结构的域值类型和该域值类型对应的内容处理该第一报文,得到每个域值类型的域值。
其中,域值指数据结构指示的动作的处理结果。该域值可以转发设备计算出的一个或多个数值,也可以为转发设备从第一报文中获取的某个字符或字段,还可以是转发设备基于前述域值类型对应的内容配置的一个或多个字符。本申请实施例中,不对前述域值的具体取值进行限定。
获取前述第一转发表之后,该转发设备解析前述第一转发表,从而确定该第一转发表中的数据结构组成,即确定各个数据结构中的域值类型和该域值类型对应的内容。然后,该转发设备将分别基于该至少一个数据结构的域值类型和该域值类型对应的内容处理该第一报文,得到每个该域值类型的域值。例如,若该第一转发表中包含第一数据结构和第二数据结构,并且,第一数据结构中包含第一域值类型和该第一域值类型对应的内容。该第二数据结构中包含第二域值类型和该第二域值类型对应的内容。此时,该转发设备将基于前述第一域值类型和该第一域值类型对应的内容对该第一报文进行处理得到第一域值,并且,转发设备将基于前述第二域值类型和该第二域值类型对应的内容对该第一报文进行处理得到第二域值。类似地,若该第一转发表中包含多个数据结构,该转发设备也可以分别基于多个数据结构对该第一报文进行处理得到多个域值。
本实施例中,转发表由控制设备配置为多个可以并行处理的数据结构,当转发设备获取了第一转发表之后,该转发设备可以分别基于至少一个数据结构中的域值类型和该域值类型对应的内容处理该第一转发表对应的第一报文,即该转发设备可以对同一张转发表中的多个数据结构进行并行处理,因此,相比于现有技术中对同一张转发表中的数据一次进行解析处理的方式更加快捷高效,因此可以提高报文的处理效率。
基于前述图3对应的报文处理方法,若对前述第一转发表中的各个数据结构进行进一步定义可以使各个数据结构之间形成有序的关联。因此,可以使转发设备在读取一个数据结构时触发对另一数据结构的处理。下面将对这种方案进行介绍,如图4所示,该报文处理方法中的转发设备执行的步骤包括如下:
401、转发设备接收第一报文。
步骤401与前述步骤301类似,请参阅前述步骤301中的相关介绍,此处不再赘述。
402、该转发设备获取由控制设备配置的与该第一报文对应的第一转发表。
该转发设备可以从控制设备中直接获取该第一报文对应的第一转发表;也可以从网络 管理设备或者其他外部存储设备中间接获取该第一报文对应的第一转发表,其中,该网络管理设备或者其他外部存储设备中的第一转发表是由该控制设备配置的。具体地,可以参阅前述步骤302中的相关介绍,此处不再赘述。还应理解的是,前述第一转发表存储于该转发设备中的表存储器中。
其中,该第一转发表包括至少一个数据结构,该至少一个数据结构中的每个数据结构包括域值类型和该域值类型对应的内容。
在一种可选的实施方式中,该至少一个数据结构包括第一数据结构。此时,该第一数据结构除了第一域值类型、该第一域值类型对应的内容之外,该第一数据结构还包括至少一个第一标识信息。该第一标识信息用于指示与该第一转发表相连的第二转发表中的第一主数据结构,该第二转发表与该第一报文对应。以前述图2A为例,该第一转发表21中的第一数据结构211中包括一个第一标识信息,该第一标识信息用于指示与该第一转发表21相连的第二转发表22中的第一数据结构221。
在另一种可选的实施方式中,该至少一个数据结构包括一个第一数据结构和一个或多个第二数据结构。其中,该第一数据结构除了第一域值类型、该第一域值类型对应的内容、以及前述第一标识信息之外,该第一数据结构还包括一个第二标识信息。该第二标识信息用于指示该第一转发表中与该第一数据结构相连的该第二数据结构。可选的,该第二数据结构还包括一个第三标识信息,该第三标识信息用于指示该第一转发表中与该第二数据结构相连的另一个第二数据结构。依然以前述图2A为例,该第一转发表21中的第一数据结构211中包括一个第二标识信息,该第二标识信息用于指示该第一转发表21中与该第一数据结构211相连的第二数据结构212。
应当注意的是,在后续步骤403和步骤404中,仅以该第一转发表中包含一个第一数据结构和一个第二数据结构为例进行介绍。但是,在实际应用中,该第一转发表中除了包含一个第一数据结构之外,可以包含多个第二数据结构,具体此处不做限定。
403、该转发设备分别基于前述第一转发表中的第一数据结构和第二数据结构对该第一报文进行处理,分别获得第一域值和第二域值。
具体地,该转发设备读取该第一转发表中的第一数据结构,并从该第一数据结构中获取该第二标识信息,并基于该第二标识信息读取该第一转发表中与该第一数据结构相连的该第二数据结构。可选的,该转发设备从该第一数据结构中的第一域值类型对应的内容中获取该第二标识信息。然后,该转发设备分别基于该第一数据结构的第一域值类型和该第一域值类型对应的内容,和该第二数据结构的第二域值类型和该第二域值类型对应的内容处理该第一报文,分别获得第一域值和第二域值。
下面结合该转发设备的内部结构对前述步骤进行介绍。图5A为该转发设备的内部结构示意图。如图5A所示,该转发设备包括处理器、表存储器和报文描述符存储器。其中,处理器包括第一处理器和第二处理器。第一处理器用于处理各个转发表的第一数据结构。第二处理器用于处理各个转发表的第二数据结构。表存储器用于存储各个转发表。报文描述符存储器用于存储报文处理过程中产生的中间数据。例如,该处理器输出的各个域值。当该转发设备分别基于前述第一数据结构和第二数据结构对该第一报文进行处理的过程中, 该转发设备中的第一处理器将读取该第一数据结构中的第一域值类型和该第一域值类型对应的第一内容(后文简称第一内容),并基于该第一域值类型对应的第一内容中的第二标识信息确定第二数据结构的存储地址(即该第二数据结构在该表存储器中的存储地址),并将该第二数据结构的存储地址发送至该第二处理器。与此同时,该第一处理器将基于前述第一域值类型和该第一域值类型对应的第一内容处理该第一报文,并将确定的第一域值存储至报文描述符存储器中。当该第二处理器收到该第二数据结构的存储地址之后,该第二处理器将从该表存储器中的对应地址读取该第二数据结构的第二域值类型以及该第二域值类型对应的第二内容(后文简称第二内容)。然后,该第二处理器基于该第二数据结构的第二域值类型以及该第二域值类型对应的第二内容对该第一报文进行处理,并将确定的第一域值存储至报文描述符存储器中。
由于,该第一处理器基于第二标识信息确定第二数据结构的存储地址耗费的时间以及将该第二数据结构发送至第二处理器耗费的时间极短,并且远小于该第一处理器基于第一域值类型和第一内容处理第一报文的时间和基于第二域值类型和第二内容处理第一报文的时间。因此,前述第一处理器基于第一域值类型和第一内容处理第一报文的过程与前述第二处理器基于第二域值类型和第二内容处理第一报文的过程是并行进行的。因此,可以提高该转发设备处理该第一报文的效率。
404、该转发设备基于该第一标识信息获取由控制设备配置的该第二转发表,并基于该第二转发表处理该第一报文,得到该第二转发表中的域值类型对应的域值。
该第二转发表与该第一报文相关,即该第二转发表用于为该转发设备提供处理该第一报文的数据。该转发设备可以基于该第二转发表中的各个数据结构中的域值类型和该域值类型对应的内容处理该第一报文,得到该第二转发表中的域值类型对应的域值。
需要说明的是,步骤404是可选。当该转发设备执行步骤404时,该转发设备可以同时执行前述步骤403和步骤404。
下面结合图5B对前述过程进行介绍。该转发设备中的第一处理器在读取第一转发表中的第一域值类型1和该第一域值类型1对应的第一内容1(后文简称第一内容1)的同时,该第一处理器基于该第一内容1中的第二标识信息可以确定该第一转发表中的第二数据结构的存储地址,并且,该第一处理器还将基于该第一内容1中的第一标识信息确定该第二转发表中的第一数据结构的存储地址。当该第一处理器基于前述第一域值类型1和该第一内容1对该第一报文进行处理的同时,该第一处理器可以从该第二转发表中的第一数据结构的存储地址读取该第二转发表中的第一域值类型2和该第一域值类型2对应的第一内容2(后文简称第一内容2)。以使得该第一处理器在处理完前述第一内容1之后可以立即处理第一内容2,而无需再耗费时间执行解析地址、读取第一域值类型2以及第一内容2等操作。因此,有利于该前述第一处理器快速地输出第一域值类型1对应的第一域值1和第一域值类型2对应的第一域值2,并将前述第一域值1和第二域值2存储于报文描述符存储器中。进而可以提高第一处理器的处理效率,即提高转发设备的处理效率。
类似的,在该转发设备的第二处理器中,该第二处理器在基于第一转发表中的第二域值类型1和第二域值类型1对应的第二内容1(后文简称第二内容1)对该第一报文进行处理 的同时,该第二处理器也将从第一处理器接收该第二转发表中的第二数据结构的存储地址。以使得该第二处理器在基于前述第二域值类型1和第二内容1处理完该第一报文之后,该第二处理器可以基于该第二转发表中的第二域值类型2和该第二域值类型2对应的第二内容2(后文简称第二内容2)对该第一报文进行处理。进而促使提高该第二处理器输出第二域值类型1对应的第二域值1和第二域值类型2对应的第二域值2的速率,进而提高该第二处理器处理该第一报文的效率。
本实施例中,该第一报文可以对应多个转发表,该转发设备在基于第一转发表中的各个数据结构处理该第一报文的同时,该转发设备也将解析第二转发表的地址,以使得该转发设备中的第一处理器基于第一转发表中的第一数据结构处理完该第一报文后,可以立即基于第二转发表中的第一数据结构对该第一报文进行处理。因此,可以提高该转发设备处理该第一报文的效率。
基于前述实施方式,在一种可选的实施方式中,前述各个数据结构中的域值类型对应的内容也将影响该转发设备处理该第一报文的效率。下面将对这种方案进行介绍,如图6所示,该报文处理方法中的转发设备执行的步骤包括如下:
601、转发设备接收第一报文。
步骤601与前述步骤401类似,请参阅前述步骤401中的相关介绍,此处不再赘述。
602、该转发设备获取由控制设备配置的与该第一报文对应的第一转发表,该第一转发表包括多个数据结构。
步骤602与前述步骤402类似,请参阅前述步骤402中的相关介绍,此处不再赘述。
603、该转发设备解析各个数据结构中的域值类型对应的内容。
在一种可选的实施方式中,该域值类型对应的内容包括协议指示信息,该协议指示信息用于指示该第一报文使用的协议类型。应理解,该协议指示信息并非协议名称,而是可以反映协议类型的字段。其中,该协议指示信息包括如下至少一项:虚拟局域网(virtual local area network,VLAN)标识符,媒体接入控制(media access control,MAC)地址,网际互连协议(internet protocol,IP)地址,多协议标记交换(multi-protocol label switching,MPLS)标签,端口号以及自动保护倒换(automatic protection switching,APS)字段。为便于理解,以IP地址为例进行介绍。IP地址可以为基于IPv4协议或IPv6的IP地址。若某数据结构的第一数据结构的域值类型为接口,当该域值类型对应的内容包括IP地址时,该IP地址可以为指示传输控制协议(transmission control protocol,TCP)的IP地址、指示用户数据报协议(user datagram protocol,UDP)的IP地址,指示因特网控制报文协议(internet control message protocol,ICMP)的IP地址,指示因特网组管理协议(internet group management protocol,IGMP)的IP地址,或者指示流控制传输协议(stream control transmission protocol,SCTP)的IP地址中的任意一种或多种。在实际应用中,前述IP地址可以按照实际需求组合,具体此处不做限定。类似地,也可以通过前述VLAN标识符、MAC地址、MPLS标签以及端口号等确定报文使用的协议类型,此处不再赘述。
在另一种可选的实施方式中,该域值类型对应的内容包括偏移和长度,该偏移和长度用于指示该转发设备读取的字段在该第一报文中的位置。例如,某数据结构的域值类型对 应的内容可以为{偏移=16bit,长度=8bit}。其中,“偏移=16bit”指指针从该第一报文头的起始位指偏移16bit处开始读取数据,“长度=8bit”指该转发设备在读取该第一报文中的数据时,读取8bit的数据。
604a、当该域值类型对应的内容为协议指示信息时,该转发设备基于该协议指示信息确定该第一报文使用的协议类型,并基于该第一报文使用的协议类型确定该域值类型对应的域值。
604b、当该域值类型对应的内容为偏移和长度时,该转发设备读取该偏移和长度指示的位于该第一报文中的字段,并基于该第一报文中的字段确定该域值类型对应的域值。
本实施例中,由于转发表包括多个数据结构,并且各个数据结构中的域值类型对应的内容可以不同,因此,存在同一转发表中的第一数据结构中的第一域值类型对应的第一内容为协议指示信息,第二数据结构中的第二域值类型对应的第二内容为偏移和长度的情况,因此,在该转发设备对该第一报文进行处理的过程中,前述步骤604a和步骤604b可以同时存在。也就是说,在一个仅由第一数据结构和第二数据结构组成的转发表中,可能存在如下四种情况:
(1)第一数据结构中的第一域值类型对应的第一内容为协议指示信息;第二数据结构中的第二域值类型对应的第二内容为偏移和长度。
(2)第一数据结构中的第一域值类型对应的第一内容为偏移和长度;第二数据结构中的第二域值类型对应的第二内容为协议指示信息。
(3)第一数据结构中的第一域值类型对应的第一内容和第二数据结构中的第二域值类型对应的第二内容均为协议指示信息,并且,该协议指示信息指示的该第一报文使用的协议可以相同,也可以不同。
(4)第一数据结构中的第一域值类型对应的第一内容和第二数据结构中的第二域值类型对应的第二内容均为偏移和长度。
应当理解的是,当前述转发表中包含一个第一数据结构和多个第二数据结构时,同一个转发表中各个数据结构中的域值类型对应的内容的情况将更加复杂化。具体此处不再展开介绍。但是,应当理解的是,当该转发设备解析的多个域值类型对应的内容中主要为协议指示信息时,该转发设备可以利用已支持的协议更加快速地对该第一报文进行处理。当该转发设备解析的多个域值类型对应的内容中主要为偏移和长度时,该转发设备可以支持的用户自定义的协议,有利于提高该转发设备处理该第一报文的灵活性。
应当注意的是,前述步骤604a和前述步骤604b执行的先后顺序是依据前述步骤403和步骤404中转发设备对各个数据结构的处理的先后而决定的。具体可以参阅前述步骤403和前述步骤404中的相关描述,此处不再赘述。
本实施例中,转发表由控制设备配置为多个可以并行处理的数据结构,当转发设备获取了第一转发表之后,该转发设备可以分别基于至少一个数据结构中的域值类型和该域值类型对应的内容处理该第一转发表对应的第一报文。因此,可以提高报文的处理效率。此外,当该转发设备解析的多个域值类型对应的内容中主要为协议指示信息时,该转发设备可以利用已支持的协议更加快速地对该第一报文进行处理。当该转发设备解析的多个域值 类型对应的内容中主要为偏移和长度时,该转发设备可以支持的用户自定义的协议,有利于提高该转发设备处理该第一报文的灵活性。
下面将结合虚拟专用局域网业务(virtual privatelan service,VPLS)场景对前述报文处理方法进行介绍。图7为转发设备完成前述VPLS业务所需的多个转发表。如图7所示,可以将VPLS业务的处理流程所需的多个转发表按域划分,包括接口域、路由域、转发域及封装域。其中,每个域中包含一个或多个转发表。例如,接口域包含转发表1和转发表2;路由域包含转发表4和转发表5;转发域包含转发表6;封装域包含转发表7。每个转发表中包含一个或多个数据结构,并且,同一张转发表中可以有协议相关的数据结构(即该数据结构的域值类型对应的内容为协议指示信息)和协议无关的数据结构(即该数据结构的域值类型对应的内容包括偏移和长度)。例如,转发表1的第一数据结构(即主数据结构)为协议无关的数据结构。其中,该转发表1的第一数据结构的域值类型为“接口”,该域值类型对应的内容为“直接查找,{6bit,8bit}”。又例如,转发表4的第一数据结构(即主数据结构)为协议相关的数据结构。其中,该转发表4的第一数据结构的域值类型为“桥接”,该域值类型对应的内容为“桥标识、VLANID及目的MAC地址”。又例如,转发表5的第二数据结构(即转发数据结构)为协议无关的数据结构。其中,该转发表5的第二数据结构的域值类型为“路由”,该域值类型对应的内容为“设置出接口,{2bit,6bit}”。其余数据结构与前述实例类似,具体此处不再赘述。
具体地,在接口域中,该转发设备在读取转发表1中的各个数据结构时,可以在该转发表1对应的报文1中的偏移为6bit长度为8bit处直接查找。与此同时,该转发设备还将设置物理接口,并将该物理接口写入该报文1中偏移为2bit长度为8bit的位置。然后,该转发设备分别解析协议指示信息VLAN ID和MAC地址以确定该报文1使用的协议类型。然后,该转发设备将读取转发表2中的数据结构,可以在该转发表2对应的报文1中的偏移为2bit长度为18bit处查找获取逻辑接口。然后,该转发设备将读取转发表3中的数据结构,可以在该转发表3对应的报文1中的偏移为2bit长度为8bit处设置桥标识,以完成桥标识的查找。
在路由域中,该转发设备将读取转发表4中的数据结构,将桥标识、VLANID及目的MAC地址作为关键字,查找桥转发表。该转发设备读取转发表5中的数据结构时,可以在该转发表5对应的报文1中的偏移为0bit长度为10bit处查找。与此同时,该转发设备还将设置出接口,并将该出接口写入该报文1中偏移为2bit长度为6bit的位置。
在转发域中,该转发设备将读取转发表6中的各个数据结构,在转发表6对应的报文1中的偏移为2bit长度为6bit处查找。然后,完成交换网信息的处理,包括目的单板、目标端口及封装表索引等信息。
在封装域中,该转发设备将读取转发表7中的各个数据结构,在转发表7对应的报文1中的偏移为2bit长度为6bit处查找。然后,完成以太网首部封装,包括目的MAC地址、源MAC地址及以太网类型等信息。
应当理解的是,前述实施例中,偏移的比特数值以及长度的比特数据仅仅用于举例。在实际应用中,偏移的比特数值和长度的比特数值可能与前述示例存在差异,具体本实施例不对前述偏移的比特数值和长度的比特数值进行限定。
上面对本申请实施例所提出的报文处理方法进行了介绍,下面将对执行该报文处理方法涉及的转发设备的具体结构进行介绍。
如图8所示,本实施例提供了一种转发设备80的结构示意图。前述图3、图4和图6所对应的方法实施例中的转发设备可以基于本实施例中图8所示的转发设备80的结构。此外,前述图5A以及图5B对应的示例中的转发设备可以与本实施例中图8所示的转发设备80结合。
转发设备80包括至少一个处理器801和至少一个存储器802。其中,该处理器801,也可以被称为报文处理器或包处理器,可以用于对转发表中的数据结构(例如,前述第一数据结构和前述第二数据结构;或者,前述主数据结构和前述转发数据结构)以及报文(例如,前述第一报文)进行处理,以及对整个转发设备进行控制,执行软件程序,处理软件程序的数据,例如用于支持该转发设备80执行前述实施例中所描述的动作。转发设备80中的处理器801可以包括第一处理器8011和第二处理器8012。其中,该第一处理器8011用于对各个转发表中的第一数据结构(或主数据结构)进行处理,该第二处理器8012用于对各个转发表中的第二数据结构(或转发数据结构)进行处理。应当理解的是,该第一处理器8011和该第二处理器8012可以为两个独立的处理器,也可以为前述处理器801中的两个独立的不同功能的模块,具体此处不做限定。该第一处理器8011和该第二处理器8012之间可以进行数据交互。例如,第一处理器8011可以将基于第一数据结构中的第二标识信息指示的第二数据结构的存储地址发送给第二处理器8012。
存储器802主要用于存储控制设备配置的各个转发表、报文以及前述处理器801输出的域值等数据。例如,第一转发表、第二转发表、第一报文、第一域值以及第二域值等。存储器802可以是独立存在,与处理器801相连。或者,该存储器802也可以和该处理器801集成于一体,例如集成于一个或多个芯片之内。存储器802还用于存储执行本申请实施例的技术方案的程序代码。前述程序代码可以由处理器801来控制执行,被执行的各类计算机程序代码也可被视为是处理器801的驱动程序。可选的,该存储器802包括表存储器8021和报文描述符存储器8022。其中,表存储器8021用于存储于报文相关的各个转发表(例如,第一转发表和第二转发表等)。该报文描述符存储器8022用于存储处理器801在报文处理过程中产生的数据。该数据可以为该处理器801输出的域值类型对应的域值(例如,第一域值和第二域值等)。
应当理解的是,图8仅给出了一个表存储器和一个报文描述符存储器的转发设备示例。在实际应用中,转发设备80可包括多个表存储器或多个文描述符存储器,此处不做限定。
具体地,处理器801用于获取由控制设备配置的与第一报文对应的第一转发表,并将该转发表存储于前述表存储器8021中。其中,该第一转发表包括至少一个数据结构,该至少一个数据结构中的每个数据结构包括域值类型和该域值类型对应的内容。此外,该处理器801还用于分别基于该至少一个数据结构的域值类型和该域值类型对应的内容处理该第一报文,得到每个域值类型的域值,并将前述各个域值存储于前述报文描述符存储器8022中。其余可以参考前述图3、图4以及图6对应的实施例中转发设备所执行的步骤,此处不再赘述。
图9为本申请实施例提供了一种控制设备90的结构示意图。前述图3、图4和图6所对应的方法实施例中的控制设备可以基于本实施例中图9所示的控制设备90的结构。
控制设备90包括至少一个处理器901和至少一个存储器902。其中,该处理器901用于配置与报文对应的各个转发表(例如,前述第一转发表和第二转发表)以及对整个控制设备进行控制,执行软件程序,处理软件程序的数据,例如用于支持该控制设备90执行前述实施例中所描述的动作。
存储器902主要用于存储控制设备配置的各个转发表。例如,第一转发表、第二转发表等。该存储器902可以是独立存在,与处理器901相连。可选的,该存储器902也可以和该处理器901集成于一体。例如集成于一个或多个芯片之内。其中,该存储器902还用于存储执行本申请实施例的技术方案的程序代码。前述程序代码可以由处理器901来控制执行,被执行的各类计算机程序代码也可被视为是处理器901的驱动程序。
可选地,该控制设备90还包括接口装置903,用于与转发设备或外部存储器相连,并通过该接口装置903输出前述各个转发表。可选地,该接口装置903可以为南向接口。
应当理解的是,图9仅示出了一个处理器和一个存储器。在实际应用中,该控制设备90可以存在多个处理器或多个存储器,具体此处不做限定。其余可参考前述实施例中控制设备所执行的步骤,此处不再赘述。
图10为本申请实施例提供了一种报文处理***100的结构示意图。如图10所示,该报文处理***100包括控制设备1001和转发设备1002。控制设备1001和转发设备1002通过南向接口相连。具体地,转发设备1002的具体结构可以参阅图8对应的实施例,控制设备1001的具体结构可以参阅图9对应的实施例,此处不再赘述。
可选地,报文处理***100还包括外部存储设备1003,用于存储该控制设备1001配置的转发表,以供转发设备1002从外部存储设备1003处获取该转发表。可选地,外部存储设备1003还可以存储报文,转发设备1002可以从外部存储设备1003处接收该报文。
应当理解的是,前述转发设备可以存在与转发设备的方法或者流程的步骤对应的功能单元(means)。以上模块或单元的一个或多个可以软件、硬件或二者结合来实现。当以上任一模块或单元以软件实现的时候,所述软件以计算机程序指令的方式存在,并被存储在存储器中,处理器可以用于执行所述程序指令以实现以上方法流程。
本申请实施例中的处理器可以包括但不限于以下至少一种:中央处理单元CPU、微处理器、数字信号处理器(digital signal processor,DSP)、微控制器(microcontroller unit,MCU)、网络处理器(network processor,NP)或人工智能处理器等各类运行软件的计算设备,每种计算设备可包括一个或多个用于执行软件指令以进行运算或处理的核。该处理器可以是个单独的半导体芯片,也可以跟其他电路一起集成为一个半导体芯片,例如,可以跟其他电路(如编解码电路、硬件加速电路或各种总线和接口电路)构成一个片上***(system-on-a-chip,SoC),或者也可以作为一个特殊应用集成电路(application specific integrated circuit,ASIC)的内置处理器集成在所述ASIC当中,该集成了处理器的ASIC可以单独封装或者也可以跟其他电路封装在一起。该处理器除了包括用于执行软件指令以进行运算或处理的核外,还可进一步包括必要的硬件加速器,如现场可编程门阵列(field programmable gate array,FPGA)、可编程逻辑器件(programmable logic device,PLD)、或者实现专用逻辑运算的逻辑电路。
本申请实施例中的存储器,可以包括如下至少一种类型:只读存储器ROM或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器RAM或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programable read-only memory,EEPROM)。具体此处不做限定。
应当理解的是,本申请实施例中,不同的附图中相同的附图标记可视为同一对象。除在有特别说明,前述各个附图之间相同的附图标记的解释可以相互引用。所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
以上实施例仅用以说明本申请的技术方案,而非对其限制。尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (12)

  1. 一种报文处理方法,其特征在于,包括:
    转发设备接收第一报文;
    所述转发设备获取由控制设备配置的与所述第一报文对应的第一转发表,所述第一转发表包括至少一个数据结构,所述至少一个数据结构中的每个数据结构包括域值类型和所述域值类型对应的内容;
    所述转发设备分别基于所述至少一个数据结构的域值类型和所述域值类型对应的内容处理所述第一报文,得到每个所述域值类型的域值。
  2. 根据权利要求1所述的方法,其特征在于,所述至少一个数据结构包括第一数据结构,所述第一数据结构包括至少一个第一标识信息,所述第一标识信息用于指示与所述第一转发表相连的第二转发表中的第一主数据结构,所述第二转发表与所述第一报文对应。
  3. 根据权利要求2所述的方法,其特征在于,所述至少一个数据结构还包括一个或多个第二数据结构,所述第一数据结构还包括一个第二标识信息,所述第二标识信息用于指示所述第一转发表中与所述第一数据结构相连的所述第二数据结构;
    所述转发设备分别基于所述至少一个数据结构的域值类型和所述域值类型对应的内容处理所述第一报文,包括:
    所述转发设备从所述第一数据结构中获取所述第二标识信息,并基于所述第二标识信息读取所述第一转发表中与所述第一数据结构相连的所述第二数据结构;
    所述转发设备分别基于所述第一数据结构的第一域值类型和所述第一域值类型对应的内容,和所述第二数据结构的第二域值类型和所述第二域值类型对应的内容处理所述第一报文。
  4. 根据权利要求3所述的方法,其特征在于,所述第二数据结构还包括一个第三标识信息,所述第三标识信息用于指示所述第一转发表中与所述第二数据结构相连的另一个第二数据结构。
  5. 根据权利要求2至4中任意一项所述的方法,其特征在于,所述转发设备分别基于所述至少一个域值类型和所述域值类型对应的内容处理所述第一报文之后,所述方法还包括:所述转发设备基于所述第一标识信息获取由控制设备配置的所述第二转发表,并基于所述第二转发表处理所述第一报文,得到所述第二转发表中的域值类型对应的域值。
  6. 根据权利要求1至5中任意一项所述的方法,其特征在于,所述域值类型对应的内容包括协议指示信息,所述协议指示信息用于指示所述第一报文使用的协议类型。
  7. 根据权利要求6所述的方法,其特征在于,所述协议指示信息包括如下至少一项:
    虚拟局域网VLAN标识符,媒体接入控制MAC地址,网际互连协议IP地址,多协议标记交换MPLS标签,端口号以及自动保护倒换APS字段。
  8. 根据权利要求1至7中任意一项所述的方法,其特征在于,所述域值类型对应的内容包括偏移和长度,所述偏移和长度用于指示所述转发设备读取的字段在所述第一报文中的位置。
  9. 根据权利要求6至8中任意一项所述的方法,其特征在于,所述转发设备分别基于所 述至少一个数据结构的域值类型和所述域值类型对应的内容处理所述第一报文,得到每个所述域值类型的域值,包括:
    所述转发设备解析各个数据结构中的域值类型对应的内容;
    当所述域值类型对应的内容为协议指示信息时,所述转发设备基于所述协议指示信息确定所述第一报文使用的协议类型,并基于所述第一报文使用的协议类型确定所述域值类型对应的域值;和/或,当所述域值类型对应的内容为偏移和长度时,所述转发设备读取所述偏移和长度指示的位于所述第一报文中的字段,并基于所述第一报文中的字段确定所述域值类型对应的域值。
  10. 一种转发设备,其特征在于,包括:处理器和存储器;其中,
    所述存储器,用于存储多个转发表,所述多个转发表包括与第一报文对应的第一转发表,所述第一转发表包括至少一个数据结构,所述至少一个数据结构中的每个数据结构包括域值类型和所述域值类型对应的内容;
    所述处理器,与所述存储器耦合,基于所述转发表处理所述第一报文,以使得实现如权利要求1至9中任意一项所述的方法。
  11. 根据权利要求10所述的转发设备,其特征在于,所述处理器包括第一数据结构处理器和第二数据结构处理器,其中,
    所述第一数据结构处理器,用于基于第一数据结构的第一域值类型和所述第一域值类型对应的内容处理所述第一报文,得到所述第一数据结构的第一域值类型的第一域值;
    所述第二数据结构处理器,用于:
    从所述第一数据结构中获取第二标识信息,并基于所述第二标识信息读取所述第二标识信息对应的第二数据结构的第二域值类型和所述第二域值类型对应的内容;和,基于所述第二数据结构的第二域值类型和所述第二域值类型对应的内容处理所述第一报文,得到所述第二数据结构的第二域值类型的第二域值。
  12. 一种报文处理***,其特征在于,包括:控制设备和如权利要求10或11所述的转发设备,所述控制设备用于配置如权利要求10或11所述的转发表。
PCT/CN2021/074967 2020-02-18 2021-02-03 报文处理方法、转发设备以及报文处理*** WO2021164546A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/889,701 US20220393978A1 (en) 2020-02-18 2022-08-17 Packet processing method, forwarding device, and packet processing system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010100254.6 2020-02-18
CN202010100254.6A CN113347090B (zh) 2020-02-18 2020-02-18 报文处理方法、转发设备以及报文处理***

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/889,701 Continuation US20220393978A1 (en) 2020-02-18 2022-08-17 Packet processing method, forwarding device, and packet processing system

Publications (1)

Publication Number Publication Date
WO2021164546A1 true WO2021164546A1 (zh) 2021-08-26

Family

ID=77390417

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/074967 WO2021164546A1 (zh) 2020-02-18 2021-02-03 报文处理方法、转发设备以及报文处理***

Country Status (3)

Country Link
US (1) US20220393978A1 (zh)
CN (1) CN113347090B (zh)
WO (1) WO2021164546A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103560957A (zh) * 2013-10-15 2014-02-05 华为技术有限公司 查表键值构造方法、微码下发方法、装置及***
US20150195098A1 (en) * 2002-11-18 2015-07-09 Fortinet, Inc. Hardware-accelerated packet multicasting
CN105812179A (zh) * 2016-03-09 2016-07-27 中国科学院信息工程研究所 一种协议无关转发网络事件处理方法
CN110601983A (zh) * 2019-10-15 2019-12-20 南京信息职业技术学院 一种协议无感知源路由转发方法及***
CN111865809A (zh) * 2019-04-30 2020-10-30 中国科学院声学研究所 基于协议无感知转发的设备状态感知方法、***及交换机

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100459574C (zh) * 2005-09-19 2009-02-04 北京大学 对网络流进行分类、状态跟踪和报文处理的装置和方法
WO2013059991A1 (zh) * 2011-10-25 2013-05-02 华为技术有限公司 数据报文处理方法和***、报文转发设备
CN104158745B (zh) * 2013-05-13 2018-11-06 南京中兴新软件有限责任公司 一种实现数据包转发的方法及***
CN105339934B (zh) * 2014-05-22 2018-10-19 华为技术有限公司 一种报文处理方法及装置
CN105591914B (zh) * 2014-10-21 2020-07-03 中兴通讯股份有限公司 一种openflow流表的查表方法和装置
CN105515975B (zh) * 2015-11-24 2019-01-04 武汉烽火网络有限责任公司 面向软件定义网络基于应用层转发的实现方法及***
CN107404440B (zh) * 2016-05-19 2021-01-29 华为技术有限公司 一种转发表项发送方法、报文转发方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150195098A1 (en) * 2002-11-18 2015-07-09 Fortinet, Inc. Hardware-accelerated packet multicasting
CN103560957A (zh) * 2013-10-15 2014-02-05 华为技术有限公司 查表键值构造方法、微码下发方法、装置及***
CN105812179A (zh) * 2016-03-09 2016-07-27 中国科学院信息工程研究所 一种协议无关转发网络事件处理方法
CN111865809A (zh) * 2019-04-30 2020-10-30 中国科学院声学研究所 基于协议无感知转发的设备状态感知方法、***及交换机
CN110601983A (zh) * 2019-10-15 2019-12-20 南京信息职业技术学院 一种协议无感知源路由转发方法及***

Also Published As

Publication number Publication date
CN113347090B (zh) 2023-06-20
US20220393978A1 (en) 2022-12-08
CN113347090A (zh) 2021-09-03

Similar Documents

Publication Publication Date Title
EP3720066B1 (en) Packet sending and processing method and apparatus, pe node, and node
US11979322B2 (en) Method and apparatus for providing service for traffic flow
CN108781185B (zh) 提供用于网络设备的可编程包分类框架的***和方法
US9819551B2 (en) Systems and methods for testing networks with a controller
US6650642B1 (en) Network relaying apparatus and network relaying method capable of high-speed routing and packet transfer
CN103685009B (zh) 数据包的处理方法、控制器及***
Li et al. Improving SDN scalability with protocol-oblivious source routing: A system-level study
US11652735B2 (en) Multicast data packet processing method, and apparatus
WO2022100554A1 (zh) Bier报文转发的方法、设备以及***
US8693478B2 (en) Multiple shortest-path tree protocol
WO2022062506A1 (zh) 一种数据处理方法、装置、存储介质及电子装置
WO2021036328A1 (zh) 一种在sr网络中转发报文的方法、设备和***
US11855888B2 (en) Packet verification method, device, and system
TW201431320A (zh) 迴路偵測的方法及網路裝置
KR20220062347A (ko) 역 경로 포워딩 rpf 검사 방법 및 장치
EP3767900A1 (en) Method for discovering forwarding path, and related device thereof
US20210320929A1 (en) Packet Detection Method and First Network Device
US7324513B2 (en) IP multicast packet replication process for 4K VLANS
WO2021164546A1 (zh) 报文处理方法、转发设备以及报文处理***
WO2017036384A1 (zh) 运营商边缘设备及数据转发方法
WO2022100511A1 (zh) 转发表项的处理方法和装置
US11831547B2 (en) BIERV6 packet forwarding method, device, and system
WO2022116895A1 (zh) Bier报文转发的方法、设备以及***
WO2016197933A2 (zh) 报文转发
KR20230022251A (ko) Bier oam 검출 방법, 디바이스, 및 시스템

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21757099

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21757099

Country of ref document: EP

Kind code of ref document: A1