WO2017041737A1 - 报文处理 - Google Patents
报文处理 Download PDFInfo
- Publication number
- WO2017041737A1 WO2017041737A1 PCT/CN2016/098523 CN2016098523W WO2017041737A1 WO 2017041737 A1 WO2017041737 A1 WO 2017041737A1 CN 2016098523 W CN2016098523 W CN 2016098523W WO 2017041737 A1 WO2017041737 A1 WO 2017041737A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- packet
- hash
- entry
- matching
- module
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
- H04L45/7453—Address table lookup; Address filtering using hashing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/30—Definitions, standards or architectural aspects of layered protocol stacks
- H04L69/32—Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
- H04L69/322—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
- H04L69/324—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the data link layer [OSI layer 2], e.g. HDLC
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/30—Definitions, standards or architectural aspects of layered protocol stacks
- H04L69/32—Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
- H04L69/322—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
- H04L69/325—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the network layer [OSI layer 3], e.g. X.25
Definitions
- the network device needs to perform various types of operations on the packet according to the configuration information of the interface or the packet type to achieve forwarding or service processing. For example, Layer 2 forwarding, Layer 3 forwarding, unicast forwarding, multicast forwarding, and ACL (Access Control List) matching service processing.
- Layer 2 forwarding Layer 3 forwarding
- unicast forwarding Layer 3 forwarding
- multicast forwarding Layer 3 forwarding
- ACL Access Control List
- FIG. 1 is a flowchart of a packet processing method according to an embodiment of the present application.
- FIG. 2 is a flowchart of a packet processing method according to an embodiment of the present application.
- FIG. 3 is a schematic diagram of a hash table and a result table according to an embodiment of the present application.
- FIG. 4 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present application.
- FIG. 5 is another schematic structural diagram of a message processing apparatus according to an embodiment of the present application.
- FIG. 6 is still another schematic structural diagram of a message processing apparatus according to an embodiment of the present application.
- FIG. 7 is a schematic diagram of a hardware architecture of a message processing apparatus according to an embodiment of the present application.
- the following embodiments of the present application provide a message processing method, and a message processing apparatus to which the method can be applied.
- the following embodiments of the present application can be applied to a network device that needs to process a packet by searching for a hash.
- the Hash index table has two forms.
- the hash index table is a hash table, and the hash table includes a valid identifier, an operation type, and a processing manner.
- the structure of the hash table is as shown in Table 1.
- Valid is a valid identifier, which is used to indicate whether the corresponding entry is valid.
- Type is an operation type, which can be Layer 2 forwarding, Layer 3 IPv4 forwarding, Layer 3 IPv6 forwarding, multicast forwarding, and ACL matching services.
- the processing information is the processing mode of the packets matching the hash entries.
- the processing mode can include the following: sending the packets to the control plane to create Hash entries, sending them to the control plane for ARP learning, and discarding the packets.
- the processing mode of the packet is stored in the Hash table of the Hash table.
- the hash index table includes a hash table and a result table.
- the hash table includes at least a valid identifier and a result table pointer, and the hash table may further include an operation type, as shown in Table 2 or 3.
- Valid is a valid identifier, which is used to indicate whether the corresponding entry is valid.
- Type is an operation type, which can be Layer 2 forwarding, Layer 3 IPv4 forwarding, Layer 3 IPv6 forwarding, multicast forwarding, and ACL matching services.
- the processing information is a result table pointer, and the hash table item in the hash table is mapped to the result table item in the result table by using the result table pointer, and the result table pointer can be mapped to a result table item, or can be mapped to multiple result tables.
- Item the result table is shown in Table 4.
- the processing mode is the processing performed on the packets matching the result entry.
- the processing mode can include the following: sending a packet to the control plane to create a hash entry, discarding the packet, and so on.
- the result table may not be set; when the content of the processing method is large and cannot be stored in the hash table, the hash table and the result may be used.
- the processing mode is stored in the result table, and the mapping between the hash table and the result table is established by the result table pointer.
- a key may also be included in the hash table and/or the result table in the embodiment of the present application.
- Key is a key value, and the Keys corresponding to different Types are different.
- the Key when the Type is Layer 2 forwarding, the Key includes: a destination MAC (Media Access Control) address, a source MAC address, and a VPN (Virtual Private Network) ID (Identity, ID); when the Type is a Layer 3 IPv4 forwarding
- the Key includes: the destination IP (Internet Protocol) address, the source IP address, and the VPN ID.
- the Type is Layer 3 IPv6 forwarding
- the Key includes: the destination IP address, the source IP address, the VPN ID, and the Layer 3 protocol number.
- the Key When the Type is multicast forwarding, the Key includes: the destination IP address, the source IP address, the VPN ID, and the destination port number.
- the Type When the Type is an ACL (Access Control List) matching service, the Key includes: an ACL matching. All key values required. Obviously, the above is only an example of a Key that needs to be extracted for different Types, which is not limited in this application.
- Type and Key can be used to resolve hash conflicts. Assume that multiple hash index entries are stored in the Hash index table. The calculation result obtained by performing Hash calculation on the key value extracted from one message is a, and the calculation result obtained by performing Hash calculation on the key value extracted from another message is also a, and Hash occurs at this time. Conflict, generated based on these two messages Hash index entries are saved in the memory space where the hash entry is a. Determine which packet matches the Hash index entry by Type and Key.
- the hash index table is a hash table and is a linked list
- the hash result obtained by hashing the key values extracted by one packet is a, and a corresponds to multiple hash entries.
- it is also a kind of hash conflict, and a Hash entry is matched from multiple hash index entries by Type and Key.
- the Hash index table includes the Hash table and the result table, similar to the above process, only when the Hash table entry in the Hash table is matched, the result table pointer points to the result table query processing mode, and the description is not expanded.
- the placement of the Type and the Key can be adjusted according to different requirements of the Hash index table configuration. For example, the Type is placed in the Hash table, the Key is placed in the result table, the Type is placed in the Hash table and the result table, and the Key is placed in the Hash table. Alternatively, the Type and Key are placed in the Hash table, and the Type is not placed in the result table. Key and so on.
- FIG. 1 is a flowchart of a packet processing method according to an embodiment of the present application. As shown in FIG. 1, the packet processing method in the embodiment of the present application includes the following steps.
- Step S102 After receiving the message, identify the type of operation that the message needs to be performed.
- the related configuration information on the inbound interface of the packet can be obtained from the interface table.
- the type of operation (Type) that the packet needs to be executed is identified.
- the operation type may be Layer 2 forwarding, Layer 3 IPv4 forwarding, Layer 3 IPv6 forwarding, multicast forwarding, and ACL matching services.
- the type corresponding to the value of the Type is pre-configured by the user in the Hash index table and/or the result table. For example, the value of the Type corresponding to the Layer 2 forwarding is 01, and the value of the Type corresponding to the Layer 3 IPv4 forwarding is 02. Wait.
- the ACL matching service is used as an example.
- an interface is configured with at least one ACL.
- the at least one ACL rule is divided into at least one ACL matching service subclass according to a preset classification rule.
- the at least one ACL matching service subclass may be a Layer 2 ACL matching service subclass, a Layer 3 IPv4 ACL matching service subclass, and a Layer 3 IPv6 ACL matching service subclass. Then, the mapping between the interface and the at least one ACL matching service subclass is configured into the interface table.
- step S102 after receiving the message, the at least one ACL matching service subclass corresponding to the inbound interface of the packet is searched from the interface table, and the at least one ACL matching service subclass is found.
- the ACL matching service subclass matching the packet is determined as the type of operation that the packet needs to perform. For example, if the packet is a Layer 2 packet, the ACL matching service subclass matching the packet is a Layer 2 ACL matching service subclass; if the packet is a Layer 3 packet, and the packet is IPv4, If the packet is a Layer 3 IPv4 ACL matching service subclass, the packet is determined to be a Layer 3 IPv4 ACL matching service subclass. If the packet is a Layer 3 packet and the packet is an IPv6 packet, the packet is determined.
- the matched ACL matching service subclass is a Layer 3 IPv6 ACL matching service subclass.
- Step S104 Extract a plurality of key values (Key) from the message according to the identified operation type.
- the destination MAC address, the source MAC address, and the VPN ID of the packet are extracted.
- the destination IP address, source IP address, VPN ID, and Layer 3 protocol number of the packet are extracted.
- the operation type is an ACL matching service
- the key values required for ACL matching are extracted.
- step S106 a hash calculation is performed on the extracted key values.
- the extracted key values are hashed according to a specific algorithm
- the specific algorithm may be, for example, an exclusive OR algorithm, a CRC (Cyclic Redundancy Check) algorithm, or the like.
- step S108 the result of the calculation in step S106 is used as a hash entry, and at least one hash index entry is found from the hash index table on the device.
- At least one hash entry is found in step S108, and when the hash index table is a hash table, the searched hash entry includes a processing mode; when the hash index table includes a hash table and In the result table, at this time, the Hash table and/or the result table include the Type, and the searched Hash table includes the result table pointer.
- Step S110 Match the identified operation type with the at least one Hash index entry.
- step S112 it is determined whether a Hash index entry is hit. If yes, step S114 is performed; otherwise, step S116 is performed.
- Step S114 processing the packet according to the hit Hash index entry.
- the hash table when the hash index table is a hash table, the hash table includes a Type as shown in Table 1.
- the identified operation type and the found at least one hash entry are The matching is performed; in step S114, if a hash entry is hit, the packet is processed according to the processing manner included in the hit hash entry.
- the hash index table includes a hash table and a result table
- the hash table does not include a Type as shown in Table 2
- the result table includes a Type as shown in Table 4
- an index table is included according to the result table pointer included in the hash table item, and the corresponding result table is found, and then the found result table is found according to the identified operation type. If the result item is hit, in step S114, if a result item is hit, the message is processed according to the processing mode included in the result table item of the hit.
- the hash index table includes a hash table and a result table
- the hash table includes a Type as shown in Table 3
- the result table includes a Type as shown in Table 4
- the operation type matches the found at least one Hash entry. If a Hash entry is hit, the result table pointer included in the hit Hash entry is indexed, and the corresponding result table is found, and then, according to the identification
- the operation type matches the result table item in the found result table; in step S114, if a result item is hit, the message is processed according to the processing manner included in the hit result item.
- Step S116 performing corresponding operations on the packet according to the identified operation type. For example, the packet is discarded, or the packet is sent to the control plane to establish a hash index entry according to the packet.
- the default processing mode is set for each operation type.
- the default processing mode is determined according to the identified operation type, and processed according to the default processing mode.
- the default processing mode may include sending the packet to the control plane to create a new hash index entry, discarding the packet, and the like.
- the process of establishing a hash index entry according to the packet in step S116 is as follows: the calculation result obtained by performing hash calculation on the key value extracted from the packet is used as a hash entry, and the hash table is in the hash table. Add a hash entry.
- the hash index table is a hash table as shown in Table 1
- the added hash table includes: Valid, Type, and processing information, wherein the processing information is set to be processed.
- the hash index table includes: a hash table as shown in Table 2 and a result table as shown in Table 4
- the added hash table includes: Valid And processing information, wherein the processing information is set as a result table pointer.
- the Hash index table includes: a hash table as shown in Table 3 and a result table as shown in Table 4
- the added hash table includes: Valid, Type, and processing information, wherein the processing information is set as a result table pointer.
- the operation type Type is introduced in the Hash index table, and multiple Hash index tables corresponding to different operation types can be integrated into one Hash index table of the operation type, thereby avoiding different operation types.
- each Hash table needs to allocate a corresponding memory space for all data streams that can be processed by the device to store corresponding Hash entries.
- the network device needs to be configured for each Hash table. Allocate enough memory space Sum for storing Hash entries corresponding to all data streams.
- the Hash index table provided by the embodiment of the present invention occupies only one Sum memory space, so that different operation types multiplex the same memory space Sum, thereby saving the table space resources.
- the operation type is introduced in the Hash index table, so that only the key value Key corresponding to the operation type can be recorded in each Hash index table item, thereby further saving the table space resource.
- FIG. 2 is a flowchart of a message processing method according to an embodiment of the present application.
- the hash index table includes a hash table and a result table, and the hash table adopts a hash entry corresponding to a hash entry, and the hash table includes Valid, Type, Key, and result table pointers, and the result table is included in the result table. Includes Valid, Type, and processing.
- S1 Receives a packet and obtains configuration information configured on the inbound interface of the packet. For example, Layer 2 forwarding is configured on the inbound interface. The value of the corresponding Type is 01.
- S3 Perform a hash calculation based on the extracted key to obtain a hash entry, and obtain a hash entry corresponding to the hash entry.
- the hash table and result table involved in this example As shown in Figure 3.
- S5 The default processing mode is executed, that is, the packet is discarded.
- S6 Find a result table according to the result table pointer 1 of the hash entry, and obtain a corresponding result table entry.
- S7 Match the Type of the corresponding result entry according to the Type of the packet. If it matches, S8 is executed, and if it does not match, S5 is executed.
- S8 Processing the packet according to the processing manner in the result entry, for example, sending the packet to the control plane for ARP learning.
- the type stores different hash index tables, which saves the entry space of the packet processing device and improves the forwarding performance of the packet processing device.
- the embodiment of the present application further provides a packet processing apparatus that can apply the foregoing method, and the apparatus can be applied to a network device that needs to process a packet by searching a hash table.
- the message processing apparatus includes the following modules: a receiving module 201, an identification computing module 202, an entry search module 203, a matching module 204, and a message processing module 205.
- the receiving module 201 is configured to receive a message.
- the identification calculation module 202 is configured to identify the type of operation that the message needs to be performed after the receiving module 201 receives the message, extract key values from the message, and perform a hash calculation.
- the entry lookup module 203 is configured to use the calculation result of the recognition calculation module 202 as a hash entry to find at least one Hash index entry from the Hash index table on the device.
- the matching module 204 is configured to check the operation type and the entry identified by the recognition calculation module 202.
- the at least one Hash index entry found by the module 203 is matched.
- the message processing module 205 is configured to: if the matching module 204 hits a hash index entry, process the packet received by the receiving module 201 according to the hit hash index entry.
- the matching module 204 is configured to: match the operation type identified by the recognition calculation module 202 with at least one hash entry found by the entry search module 203; the packet processing module 205 is specifically configured. It is used to: if the matching module 204 hits a hash entry, the packet received by the receiving module 201 is processed according to the processing manner included in the hit hash entry.
- the matching module 204 includes: a search unit and a result table item matching unit.
- the search unit is configured to perform indexing on the hash table item that is found by the entry search module 203, and perform indexing according to the result table pointer included in the hash entry to find a corresponding result table.
- the result table matching unit is configured to match the result table item in the result table found by the searching unit according to the operation type recognized by the recognition calculation module 202.
- the packet processing module 205 is specifically configured to: if the result entry matching unit hits a result entry, process the packet received by the receiving module 201 according to the processing manner included in the hit result entry.
- the matching module 204 includes: a Hash entry matching unit, a search unit, and a result table matching unit.
- the Hash entry matching unit is configured to match the operation type identified by the recognition calculation module 202 with at least one Hash entry found by the entry search module 203.
- the locating unit is configured to perform indexing according to the result table pointer included in the hit Hash entry, and find the corresponding result table, if the Hash entry matching unit hits a Hash entry.
- the result table matching unit is configured to match the result table item in the result table found by the searching unit according to the operation type recognized by the recognition calculation module 202.
- the packet processing module 205 is specifically configured to: if the result entry matching unit hits a result entry, process the packet received by the receiving module 201 according to the processing manner included in the hit result entry.
- the packet processing apparatus further includes: an adding module 206 and a packet discarding module 207.
- the adding module 206 is configured to: when the matching module 204 does not hit any Hash index entry, determine the calculation result of the computing module 202 as a Hash entry when determining that the Hash index entry needs to be established according to the packet received by the receiving module 201.
- a Hash index entry including the operation type identified by the recognition calculation module 202 is added to the Hash index table.
- the packet discarding module 207 is configured to discard the packet when the matching module 204 does not hit any of the hash index entries, and then determines that the packet received by the receiving module 201 needs to be discarded.
- the message processing apparatus further includes: a partitioning module 208 and an interface table configuration module 209, wherein the identification computing module 202 includes a subclass searching unit and an operation type determining unit.
- the partitioning module 208 is configured to divide the at least one ACL rule into at least one ACL matching service subclass according to a preset classification rule when at least one ACL rule is configured on the interface.
- the interface table configuration module 209 is configured to configure the correspondence between the interface and the at least one ACL matching service subclass obtained by the dividing module 208 into the interface table.
- the sub-class search unit is configured to: after the receiving module 201 receives the packet, find, by the interface table, at least one ACL matching service sub-category corresponding to the inbound interface of the packet.
- the operation type determining unit is configured to determine, from the at least one ACL matching service sub-class found by the sub-class searching unit, an ACL matching service sub-class that matches the packet received by the receiving module 201 as an operation type to be performed by the packet. .
- the at least one ACL matching service subclass includes: a Layer 2 ACL matching service subclass, a Layer 3 IPv4 ACL matching service subclass, and a Layer 3 IPv6 ACL matching service subclass.
- the operation type determining unit is specifically used to:
- the ACL matching service subclass matching the packet is determined to be a Layer 2 ACL matching service subclass.
- the ACL matching service subclass matching the packet is a Layer 3 IPv4 ACL matching service subclass.
- the ACL matching service subclass matching the packet is a Layer 3 IPv6 ACL matching service subclass.
- the message processing apparatus of the embodiment of the present application may be a programmable device combining software and hardware, and FIG. 7 shows the hardware architecture of the message processing apparatus.
- the message processing apparatus includes: a nonvolatile memory, a CPU (Central Processing Unit), a forwarding chip, and a memory; wherein:
- the memory is used to store the instruction code.
- the operations are mainly a receiving module, a recognition computing module, an entry search module, a matching module, a packet processing module, an adding module, a packet discarding module, and a partitioning.
- the functions performed by the module and interface table configuration module are not detailed here.
- a CPU configured to communicate with a forwarding chip to perform packet transmission and reception; to communicate with a memory, to read and execute the instruction code stored in the memory, to complete a receiving module, a recognition computing module, and a table in the message processing device;
- Sexual memory communication reading/writing data in non-volatile memory, including hash tables, result tables, and interface tables.
- the forwarding chip is used to connect to other network devices through the port on the chip, and is responsible for receiving and processing the packet. Specifically, the received packet is sent to the CPU for table lookup processing.
- a non-volatile memory for storing various data, including: a hash table, a result table, and an interface table.
- the operation type Type is introduced in the Hash index table according to the embodiment of the present invention, and multiple Hash index tables corresponding to different operation types can be integrated into one Hash index table of the operation type to avoid different operation types respectively.
- Hash table In order to be able to process different data flows, each Hash table needs to allocate a corresponding memory space for all data streams that can be processed by the device to store corresponding Hash entries. Thus, the network device needs to be configured for each Hash table. Allocate enough memory space Sum for storing Hash entries corresponding to all data streams. In the embodiment of the present invention, the Hash index table occupies only one Sum memory space, so that different operation types multiplex the same memory space Sum, thereby saving the table space resources.
- the operation type is introduced in the Hash index table, so that only the key value Key corresponding to the operation type can be recorded in each Hash index table item, thereby further saving the table space resource.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
Valid | Type | 处理信息 |
Valid | 处理信息 |
Valid | Type | 处理信息 |
Valid | Type | 处理方式 |
Claims (14)
- 一种报文处理方法,其特征在于,包括:在接收到报文之后,识别该报文需要执行的操作类型,从该报文中提取关键值并进行哈希Hash计算;以所述Hash计算的计算结果作为Hash入口,从本设备上的Hash索引表中查找到至少一个Hash索引表项;将识别出的操作类型与所述至少一个Hash索引表项进行匹配;和若命中一个Hash索引表项,则根据命中的Hash索引表项对该报文进行处理。
- 根据权利要求1所述的方法,其特征在于,Hash索引表为Hash表;将识别出的操作类型与所述至少一个Hash索引表项进行匹配,包括:将识别出的操作类型与至少一个Hash表项进行匹配;若命中一个Hash索引表项,则根据命中的Hash索引表项对该报文进行处理,包括:若命中一个Hash表项,则根据命中的Hash表项中包括的处理方式,对该报文进行处理。
- 根据权利要求1所述的方法,其特征在于,Hash索引表包括:Hash表和结果表;将识别出的操作类型与所述至少一个Hash索引表项进行匹配,包括:针对每一个Hash表项,根据该Hash表项中包括的结果表指针进行索引,查找到对应的结果表;根据识别出的操作类型在查找到的结果表中匹配结果表项;若命中一个Hash索引表项,则根据命中的Hash索引表项对该报文进行处理,包括:若命中一个结果表项,则根据命中的结果表项中包括的处理方式,对该报文进行处理。
- 根据权利要求1所述的方法,其特征在于,Hash索引表包括:Hash表和结果表;将识别出的操作类型与所述至少一个Hash索引表项进行匹配,包括:将识别出的操作类型与至少一个Hash表项进行匹配;若命中一个Hash表项,则根据命中的Hash表项中包括的结果表指针进行索引,查找到对应的结果表;根据识别出的操作类型在查找到的结果表中匹配结果表项;若命中一个Hash索引表项,则根据命中的Hash索引表项对该报文进行处理,包括:若命中一个结果表项,则根据命中的结果表项中包括的处理方式,对该报文进行处理。
- 根据权利要求1所述的方法,其特征在于,在将识别出的操作类型与所述至少一个Hash索引表项进行匹配之后,还包括:若没有命中任一Hash索引表项,则在确定需要根据该报文建立Hash索引表项时,以所述计算结果作为Hash入口,在Hash索引表中添加一包括所述识别出的操作类型的Hash索引表项;在确定需要丢弃该报文时,将该报文丢弃。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:当接口上配置有至少一个访问控制列表ACL规则时,根据预设分类 规则将所述至少一个ACL规则划分成至少一个ACL匹配业务子类;将该接口与所述至少一个ACL匹配业务子类之间的对应关系配置到接口表中;在接收到报文之后,识别该报文需要执行的操作类型,包括:在接收到报文之后,从所述接口表中查找到与接收到的报文的入接口对应的至少一个ACL匹配业务子类;从查找到的至少一个ACL匹配业务子类中,确定与所述接收到的报文相匹配的ACL匹配业务子类作为该报文需要执行的操作类型。
- 根据权利要求6所述的方法,其特征在于,所述至少一个ACL匹配业务子类包括:二层ACL匹配业务子类、三层因特网协议第四版IPv4 ACL匹配业务子类和三层因特网协议第六版IPv6 ACL匹配业务子类;确定与所述接收到的报文相匹配的ACL匹配业务子类的方法包括:若该报文是二层报文,则确定该报文相匹配的ACL匹配业务子类为二层ACL匹配业务子类;若该报文是三层报文,且该报文是IPv4报文,则确定该报文相匹配的ACL匹配业务子类为三层IPv4 ACL匹配业务子类;若该报文是三层报文,且该报文是IPv6报文,则确定该报文相匹配的ACL匹配业务子类为三层IPv6 ACL匹配业务子类。
- 一种报文处理装置,其特征在于,包括:接收模块,用于接收报文;识别计算模块,用于在所述接收模块接收到报文之后,识别该报文需要执行的操作类型,从该报文中提取关键值并进行哈希Hash计算;表项查找模块,用于以所述识别计算模块的计算结果作为Hash入口,从本设备上的Hash索引表中查找到至少一个Hash索引表项;匹配模块,用于将所述识别计算模块识别出的操作类型与所述表项查找模块查找到的至少一个Hash索引表项进行匹配;和报文处理模块,用于若所述匹配模块命中一个Hash索引表项,则根据命中的Hash索引表项对所述接收模块接收到的报文进行处理。
- 根据权利要求8所述的装置,其特征在于,Hash索引表为Hash表;所述匹配模块具体用于:将所述识别计算模块识别出的操作类型与所述表项查找模块查找到的至少一个Hash表项进行匹配;所述报文处理模块具体用于:若所述匹配模块命中一个Hash表项,则根据命中的Hash表项中包括的处理方式,对所述接收模块接收到的报文进行处理。
- 根据权利要求8所述的装置,其特征在于,Hash索引表包括:Hash表和结果表;所述匹配模块包括:查找单元,用于针对所述表项查找模块查找到的每一个Hash表项,根据该Hash表项中包括的结果表指针进行索引,查找到对应的结果表;结果表项匹配单元,用于根据所述识别计算模块识别出的操作类型在所述查找单元查找到的结果表中匹配结果表项;所述报文处理模块具体用于:若所述结果表项匹配单元命中一个结果表项,则根据命中的结果表项中包括的处理方式,对所述接收模块接收到的报文进行处理。
- 根据权利要求8所述的装置,其特征在于,Hash索引表包括:Hash表和结果表;所述匹配模块包括:Hash表项匹配单元,用于将所述识别计算模块识别出的操作类型与所述表项查找模块查找到的至少一个Hash表项进行匹配;查找单元,用于若所述Hash表项匹配单元命中一个Hash表项, 则根据命中的Hash表项中包括的结果表指针进行索引,查找到对应的结果表;结果表项匹配单元,用于根据所述识别计算模块识别出的操作类型在所述查找单元查找到的结果表中匹配结果表项;所述报文处理模块具体用于:若所述结果表项匹配单元命中一个结果表项,则根据命中的结果表项中包括的处理方式,对所述接收模块接收到的报文进行处理。
- 根据权利要求8所述的装置,其特征在于,还包括:添加模块,用于若所述匹配模块没有命中任一Hash索引表项,则在确定需要根据所述接收模块接收到的报文建立Hash索引表项时,以所述识别计算模块的计算结果作为Hash入口,在Hash索引表中添加一包括所述识别计算模块识别出的操作类型的Hash索引表项;报文丢弃模块,用于若所述匹配模块没有命中任一Hash索引表项,则在确定需要丢弃所述接收模块接收到的报文时,将该报文丢弃。
- 根据权利要求8所述的装置,其特征在于,还包括:划分模块和接口表配置模块,其中,所述识别计算模块包括子类查找单元和操作类型确定单元;所述划分模块,用于当接口上配置有至少一个访问控制列表ACL规则时,根据预设分类规则将所述至少一个ACL规则划分成至少一个ACL匹配业务子类;所述接口表配置模块,用于将该接口与所述划分模块划分得到的至少一个ACL匹配业务子类之间的对应关系配置到接口表中;所述子类查找单元,用于在所述接收模块接收到报文之后,从所述接口表中查找到与该报文的入接口对应的至少一个ACL匹配业务子类;所述操作类型确定单元,用于从所述子类查找单元查找到的至少一个ACL匹配业务子类中,确定与所述接收模块接收到的报文相匹配的 ACL匹配业务子类作为该报文需要执行的操作类型。
- 根据权利要求13所述的装置,其特征在于,所述至少一个ACL匹配业务子类包括:二层ACL匹配业务子类、三层因特网协议第四版IPv4 ACL匹配业务子类和三层因特网协议第六版IPv6 ACL匹配业务子类;;所述操作类型确定单元具体用于:若所述接收模块接收到的报文是二层报文,则确定该报文相匹配的ACL匹配业务子类为二层ACL匹配业务子类;若所述接收模块接收到的报文是三层报文,且该报文是IPv4报文,则确定该报文相匹配的ACL匹配业务子类为三层IPv4 ACL匹配业务子类;若所述接收模块接收到的报文是三层报文,且该报文是IPv6报文,则确定该报文相匹配的ACL匹配业务子类为三层IPv6 ACL匹配业务子类。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018512600A JP6498356B2 (ja) | 2015-09-11 | 2016-09-09 | パケット処理 |
EP16843675.6A EP3349403B1 (en) | 2015-09-11 | 2016-09-09 | Packet processing |
US15/756,523 US10659361B2 (en) | 2015-09-11 | 2016-09-09 | Packet processing |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510575456.5 | 2015-09-11 | ||
CN201510575456.5A CN106533947B (zh) | 2015-09-11 | 2015-09-11 | 报文处理方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017041737A1 true WO2017041737A1 (zh) | 2017-03-16 |
Family
ID=58239133
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/098523 WO2017041737A1 (zh) | 2015-09-11 | 2016-09-09 | 报文处理 |
Country Status (5)
Country | Link |
---|---|
US (1) | US10659361B2 (zh) |
EP (1) | EP3349403B1 (zh) |
JP (1) | JP6498356B2 (zh) |
CN (1) | CN106533947B (zh) |
WO (1) | WO2017041737A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111935021A (zh) * | 2020-09-27 | 2020-11-13 | 翱捷智能科技(上海)有限公司 | 一种快速匹配网络数据包的方法及系统 |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10454965B1 (en) * | 2017-04-17 | 2019-10-22 | Symantec Corporation | Detecting network packet injection |
CN107911315B (zh) * | 2017-11-17 | 2020-09-11 | 成都西加云杉科技有限公司 | 报文分类方法及网络设备 |
CN109062801B (zh) * | 2018-08-01 | 2021-09-14 | 四川长虹电器股份有限公司 | 软件接口自动转换系统 |
CN113114574B (zh) * | 2021-03-30 | 2023-04-25 | 杭州迪普科技股份有限公司 | 一种报文转发方法及装置 |
US11962494B2 (en) | 2021-07-20 | 2024-04-16 | Pensando Systems Inc. | Methods and systems for data consistent search and storage using trees |
WO2024111088A1 (ja) * | 2022-11-24 | 2024-05-30 | 日本電信電話株式会社 | 分析装置、分析方法及び分析プログラム |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101247337A (zh) * | 2008-02-18 | 2008-08-20 | 华为技术有限公司 | 一种报文转发的方法和设备 |
CN102025643A (zh) * | 2010-12-30 | 2011-04-20 | 华为技术有限公司 | 一种流表查找方法和装置 |
CN102882810A (zh) * | 2012-10-26 | 2013-01-16 | 杭州迪普科技有限公司 | 一种报文快速转发方法及装置 |
US20140282830A1 (en) * | 2013-03-15 | 2014-09-18 | International Business Machines Corporation | Firewall Packet Filtering |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7324514B1 (en) * | 2000-01-14 | 2008-01-29 | Cisco Technology, Inc. | Implementing access control lists using a balanced hash table of access control list binary comparison trees |
US7474653B2 (en) * | 2003-12-05 | 2009-01-06 | Hewlett-Packard Development Company, L.P. | Decision cache using multi-key lookup |
CN100596062C (zh) * | 2007-08-16 | 2010-03-24 | 杭州华三通信技术有限公司 | 分布式报文传输安全保护装置和方法 |
JP5012674B2 (ja) | 2008-06-03 | 2012-08-29 | 日本電気株式会社 | Ipパケット制御装置におけるソフトウェア検索方法 |
US8515965B2 (en) * | 2010-05-18 | 2013-08-20 | Lsi Corporation | Concurrent linked-list traversal for real-time hash processing in multi-core, multi-thread network processors |
EP2693717B1 (en) * | 2012-07-29 | 2015-05-06 | Verint Systems Limited | System and method of high volume rule engine related applications |
CN103905311B (zh) | 2012-12-28 | 2017-02-22 | 华为技术有限公司 | 流表匹配方法和装置以及交换机 |
US9659046B2 (en) * | 2013-07-31 | 2017-05-23 | Oracle Inernational Corporation | Probing a hash table using vectorized instructions |
CN103595637B (zh) * | 2013-10-27 | 2017-03-29 | 西安电子科技大学 | 基于树与哈希表的内容中心网络结点处理数据方法 |
CN106326234A (zh) * | 2015-06-18 | 2017-01-11 | 深圳市中兴微电子技术有限公司 | 流分类方法及装置 |
JP6582723B2 (ja) * | 2015-08-19 | 2019-10-02 | 富士通株式会社 | ネットワークシステム、スイッチ装置、及びネットワークシステム制御方法 |
-
2015
- 2015-09-11 CN CN201510575456.5A patent/CN106533947B/zh active Active
-
2016
- 2016-09-09 EP EP16843675.6A patent/EP3349403B1/en active Active
- 2016-09-09 US US15/756,523 patent/US10659361B2/en active Active
- 2016-09-09 JP JP2018512600A patent/JP6498356B2/ja active Active
- 2016-09-09 WO PCT/CN2016/098523 patent/WO2017041737A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101247337A (zh) * | 2008-02-18 | 2008-08-20 | 华为技术有限公司 | 一种报文转发的方法和设备 |
CN102025643A (zh) * | 2010-12-30 | 2011-04-20 | 华为技术有限公司 | 一种流表查找方法和装置 |
CN102882810A (zh) * | 2012-10-26 | 2013-01-16 | 杭州迪普科技有限公司 | 一种报文快速转发方法及装置 |
US20140282830A1 (en) * | 2013-03-15 | 2014-09-18 | International Business Machines Corporation | Firewall Packet Filtering |
Non-Patent Citations (1)
Title |
---|
See also references of EP3349403A4 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111935021A (zh) * | 2020-09-27 | 2020-11-13 | 翱捷智能科技(上海)有限公司 | 一种快速匹配网络数据包的方法及系统 |
Also Published As
Publication number | Publication date |
---|---|
JP2018528699A (ja) | 2018-09-27 |
CN106533947B (zh) | 2019-10-08 |
US20180270152A1 (en) | 2018-09-20 |
EP3349403A4 (en) | 2018-11-07 |
EP3349403A1 (en) | 2018-07-18 |
JP6498356B2 (ja) | 2019-04-10 |
US10659361B2 (en) | 2020-05-19 |
EP3349403B1 (en) | 2020-10-21 |
CN106533947A (zh) | 2017-03-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017041737A1 (zh) | 报文处理 | |
CN106664261B (zh) | 一种配置流表项的方法、装置和系统 | |
US10608866B2 (en) | Forwarding Ethernet packets | |
CN101542979A (zh) | Mac地址的重复消除方法、网络设备管理系统、服务器以及信息设备 | |
CN100466627C (zh) | 地址前缀查找方法和装置以及报文转发方法和系统 | |
CN109714274B (zh) | 一种获取对应关系的方法和路由设备 | |
WO2020114239A1 (zh) | 组播报文的处理方法及装置、存储介质、处理器 | |
JP2009532919A5 (zh) | ||
CN107547407B (zh) | 报文传输方法、装置和实现装置 | |
WO2018082592A1 (zh) | 一种报文处理方法以及网络设备 | |
CN105282133B (zh) | 从分组内容形成哈希输入的方法及其装置 | |
US11621853B1 (en) | Protocol-independent multi-table packet routing using shared memory resource | |
WO2021135491A1 (zh) | 流表的匹配方法及装置 | |
CN108965136B (zh) | 基于空间网络层次化ip编址的转发方法及装置 | |
CN105991438B (zh) | 基于虚拟二层网络中数据包的处理方法和装置 | |
US10798014B1 (en) | Egress maximum transmission unit (MTU) enforcement | |
US10397113B2 (en) | Method of identifying internal destinations of network packets and an apparatus thereof | |
CN110519173A (zh) | 一种ip五元组表项的查找方法及查找系统 | |
CN111131049B (zh) | 路由表项的处理方法及装置 | |
US10313274B2 (en) | Packet forwarding | |
CN104539538B (zh) | 路由器的ip地址匹配方法和路由器的数据包转发方法 | |
TW201607274A (zh) | 擷取封包數據方法及裝置 | |
CN104539537B (zh) | 一种路由查找方法和装置 | |
CN105282102B (zh) | 数据流处理方法和系统以及IPv6数据处理设备 | |
CN107547687A (zh) | 一种报文传输方法和装置 |
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: 16843675 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 15756523 Country of ref document: US |
|
ENP | Entry into the national phase |
Ref document number: 2018512600 Country of ref document: JP Kind code of ref document: A |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2016843675 Country of ref document: EP |