WO2014206364A1 - 一种多级流表查找方法和装置 - Google Patents

一种多级流表查找方法和装置 Download PDF

Info

Publication number
WO2014206364A1
WO2014206364A1 PCT/CN2014/081087 CN2014081087W WO2014206364A1 WO 2014206364 A1 WO2014206364 A1 WO 2014206364A1 CN 2014081087 W CN2014081087 W CN 2014081087W WO 2014206364 A1 WO2014206364 A1 WO 2014206364A1
Authority
WO
WIPO (PCT)
Prior art keywords
flow table
matching
information
data packet
keyword
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2014/081087
Other languages
English (en)
French (fr)
Inventor
丁万夫
林程勇
谢高岗
关洪涛
黄昆
于吉星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to EP14817047.5A priority Critical patent/EP2999176B1/en
Publication of WO2014206364A1 publication Critical patent/WO2014206364A1/zh
Priority to US14/980,102 priority patent/US9860180B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/64Hybrid switching systems
    • H04L12/6418Hybrid transport
    • 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
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2441Traffic characterised by specific attributes, e.g. priority or QoS relying on flow classification, e.g. using integrated services [IntServ]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/35Flow control; Congestion control by embedding flow control information in regular packets, e.g. piggybacking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables

Definitions

  • Multi-level flow table searching method and device The present application claims to be submitted to the Chinese Patent Office on June 28, 2013, the application number is 201310269726. 0, and the invention name is "a multi-stage flow table searching method and device" Chinese patent Priority of the application, the entire contents of which are incorporated herein by reference.
  • the present invention relates to the field of communications, and in particular, to a multi-stage flow table searching method and apparatus.
  • BACKGROUND With the development of new technologies for network devices, especially for the support of programmable and virtualized, network devices begin to develop in the direction of control and data plane separation. As one of them, OpenFlow has attracted widespread attention.
  • the OpenFlow network consists of three parts: OpenFlow switch, Flow Visor and Controller.
  • the OpenFlow switch is the core component of the entire OpenFlow network. It mainly manages the forwarding of the data layer.
  • the FlowVisor virtualizes the network and the Controller centrally controls the network. , to achieve the function of the control layer.
  • the OpenFlow switch After receiving the data packet, the OpenFlow switch first looks up the forwarding destination port on the local flow table. If there is no match, the packet is forwarded to the controller, and the control layer determines the forwarding port.
  • OpenFlow implements data forwarding on the OpenFlow switch, and implements data forwarding control on the controller, thereby realizing the separation of the data forwarding layer and the control layer.
  • the lookup of the flow table is an important link.
  • the matching domains of the existing multi-level flow table are fixed multi-level flow table matching domains, and the matching domain of each flow table is fixed.
  • Each flow table has an independent lookup unit, and once the data packet arrives, the lookup unit looks up its corresponding flow table. Then, the next flow table of the jump is judged by looking up the ID of the next flow table, and the result of the search is added to the instruction set. The jump of the flow table can be jumped across the table.
  • the ID of the next flow table can be specified after each flow table is matched, as long as the ID is greater than the current table ID. For example, if the matching result of the specified flow table 1 is jumped to the flow table 3, the flow table 1 can directly jump to the flow table 3 without going through the flow table 2.
  • the above-mentioned existing method for searching for a multi-level flow table has the main disadvantage that each single flow table in the multi-level flow table is a fixed matching domain, and the hardware logic needs to be modified each time the matching domain is replaced, which lacks flexibility.
  • a first aspect of the present invention provides a multi-level flow table searching method, where the method includes: extracting matching information of the data packet when receiving a data packet;
  • the corresponding instruction is executed. If the current primary flow table is not the last level flow table or has an instruction to perform an action, the corresponding action is performed.
  • the method further includes: The matching information of the extracted data packet is modified.
  • the matching from the data packet Select keywords in the message including:
  • the keyword is composed of the determined matching information.
  • the matching from the data packet Select keywords in the message including:
  • the keyword is composed of the determined matching information.
  • a second aspect of the present invention provides a multi-stage flow table searching apparatus, where the apparatus includes: an extracting module, configured to extract matching information of the data packet when receiving a data packet; and a keyword generating module, configured to use the flow table Matching domain configuration information, selecting a keyword from the matching information of the data packet;
  • a search module configured to use the keyword as a search key, start from a first-level flow table in the multi-level flow table, and search a matching domain of each level flow table in the multi-level flow table to perform the search keyword Matching with the match i or
  • An execution module configured to execute a corresponding instruction if the matching of the matching domain of the current level flow table is completed, and execute the corresponding action if the current primary flow table is not the last level flow table or has an instruction to perform an action .
  • the apparatus further includes:
  • a modifying module configured to modify the matching information of the extracted data packet.
  • the first possible implementation manner of the second aspect, or the second possible implementation manner of the second aspect in a third possible implementation manner of the second aspect, the :
  • a first determining unit configured to determine, according to the flow table matching domain configuration information represented by the bitmap, matching information used for performing matching of the flow table matching domain from the matching information of the data packet;
  • a first combining unit configured to form the keyword by using the determined matching information.
  • the first possible implementation manner of the second aspect, or the second possible implementation manner of the second aspect in a fourth possible implementation manner of the second aspect, the :
  • a second determining unit configured to determine, according to the flow table matching domain configuration information represented by the fixed code, matching information used for performing matching of the flow table matching domain from the matching information of the data packet; Forming the keyword with the determined matching information.
  • the flow table matching domain configuration information is information that can be modified by using software according to requirements, so that the flow table matching domain does not need to be modified by modifying the hardware logic, so as to generate the matching domain configuration information according to the flow table.
  • the keyword matches each of the multi-level flow tables The matching domain of the table.
  • the single flow table in the multi-level flow table is a fixed matching domain, and each time the matching domain needs to be modified, the flow table matches the domain configuration information. It can be configured through software, so the fixed match domain becomes a changeable match domain, which increases the flexibility of the flow table matching domain and reduces the cost of modifying the hardware logic when changing the matching domain.
  • FIG. 1 is a schematic flowchart of a multi-level flow table searching method according to an embodiment of the present invention
  • FIG. 1 is a schematic diagram of matching in a multi-level flow table searching method according to an embodiment of the present invention
  • FIG. 1 is a schematic diagram of matching in a multi-level flow table searching method according to another embodiment of the present invention
  • FIG. 2 is a schematic diagram of matching in a multi-level flow table searching method according to another embodiment of the present invention
  • FIG. 2 is a schematic diagram of matching in a multi-level flow table searching method according to another embodiment of the present invention
  • the structure diagram of the multi-stage flow table searching device provided by the example;
  • FIG. 3 is a schematic structural diagram of a multi-stage flow table searching device according to another embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a multi-stage flow table searching device according to another embodiment of the present invention
  • FIG. 5-a is a schematic structural diagram of a multi-stage flow table searching device according to another embodiment of the present invention
  • FIG. 5-b is a schematic diagram of a multi-stage flow table searching device according to another embodiment of the present invention
  • Schematic diagram of the structure of the flow class lookup device are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
  • FIG. 1 is a schematic flowchart of a multi-level flow table searching method according to an embodiment of the present invention, which mainly includes S101, S102, S103, and S104, and is described in detail as follows:
  • the matching information of the packet is the information in the packet that will match the content of the matching field in the flow table.
  • a flow table is composed of a large number of flow entries, and each flow entry is a forwarding rule.
  • the data packet entering the switch is obtained by querying the flow table to obtain the forwarded destination port.
  • a flow entry consists of a header field, a counter, and an operation.
  • the header field is an information tuple, for example, a quintuple, which is an identifier of a flow entry, and is also a matching domain of the flow table, and the content thereof is to be compared with the extracted data packet.
  • the matching information is used to match the specific information, and the counter is used to count the statistics of the flow entry, and the operation indicates the operation that the data packet matching the flow entry should perform.
  • the matching information of the data packet is extracted according to the fixed matching field of the single flow table, and thus the multiple matching is required.
  • all the matching information of the data packet is extracted as the data packet is received.
  • all the matching information of the data packet may be extracted when the data packet is received, and the entire matching information may exist in the form of a data structure.
  • the match field of each flow table in the multi-level flow table is fixed, and is embodied on the hardware to allocate a fixed storage space for the matching fields of the flow tables. If you want to replace the matching domain of the flow table, you need to modify the hardware logic, such as re-allocating the global storage space, which undoubtedly increases the cost.
  • a multi-level flow table including three flow tables, the specific content of the matching domain of the first-level flow table is IP, and the specific content of the matching domain of the second-level flow table is MAC, and the matching domain of the third-pole flow table The specific content is the VLAN ID.
  • To modify the specific content of the matching domain of the first-level flow table to the port number you can only modify the specific hardware logic. For example, re-edit the original allocation to the first-level flow table. Match the storage space of the domain.
  • the storage space is also allocated for each matching domain of the flow table, and once the storage space is allocated, unless it is fixed by modifying the hardware logic, it may be through the software convection table.
  • the matching field that matches the matching information of the data packet is identified. This action is performed by using the flow table matching domain configuration information in the embodiment of the present invention. Since the flow table matching domain configuration information can be configured by software, therefore, although the flow table is The matching domain is fixed. The matching field in the flow table that matches the matching information of the data packet can be changed according to the flow table matching domain configuration information.
  • the flow table that is, a physical flow table corresponds to a fixed physical storage space.
  • the flow table matching domain configuration information mentioned in the embodiment of the present invention is specifically used to identify a matching domain in the flow table physical to be matched with the selected matching information by software.
  • a matching field that matches the selected matching information in the physical flow table is matched, according to the flow table matching domain configuration information
  • an embodiment of selecting a keyword from the matching information of the data packet may be matched according to the flow table.
  • the domain configuration information selects a plurality of matching information generation keywords from all the matching information of the data packet.
  • the keyword selected in step S102 is a search key, starting from a first-level flow table in the multi-level flow table, searching for a matching domain of each level flow table in the multi-level flow table, performing the searching The match of the keyword to the matching domain.
  • the foregoing embodiments of S101 and S102 are: extracting all matching information of the data packet when receiving the data packet, and selecting a plurality of matching information from all the matching information of the data packet according to the flow table matching domain configuration information.
  • the keyword selected by S102 is a search key, starting from the first-level flow table in the multi-level flow table, and searching for each level flow table in the multi-level flow table.
  • the matching field performs matching between the search key and the matching domain.
  • the corresponding instruction is executed, if the current primary flow table is not the last level flow table or When there is an instruction to perform an action, the corresponding action may be performed: starting with the first-level logical flow table in the multi-level logical flow table by using the keyword as a search key, searching for each of the multi-level logical flow tables The matching field of the first-level logical flow table performs matching between the search key and the matching domain, and if the matching domain matching of the current primary logical flow table is completed, Corresponding instructions are executed, and if the current level one logic flow table is not the last level logic flow table or there is an instruction to perform an action, the corresponding action is performed.
  • the multi-level logic flow table is a plurality of physical flow tables, and the so-called multi-level logic flow table is according to the foregoing embodiment.
  • the flow table matching domain configuration information is formed by cascading logical flow table configurations obtained by physical flow table configuration.
  • the reason why it is a logical flow table is because the functions that these single logical flow tables can implement, such as the matching domain used to match the matching information of the data packets, are the same as the functions that a single physical flow table can achieve, but there is no Allocate physical storage space for a single logical flow table, but all logical flow tables share a storage space allocated for the physical flow table.
  • the cascading of multiple logical flow tables (that is, the multi-level logical flow table) is also similar to the cascading of multiple physical flow tables. For example, after searching for a flow table, the ID is used to indicate the next one to be searched. Flow table.
  • the execution of an instruction includes a modification of an action (action) of a certain data, a jump between flow tables, and the like, and an action (action) is specifically for the data packet. Actions, such as dropping, forwarding packets, and so on. If the matching domain matching of the current level one logical flow table is completed and the current level one logical flow table is the last level logical flow table, the processing flow of the data packet ends. After searching the matching domain of the first-level logical flow table in the multi-level logical flow table to perform matching between the search key and the matching domain, the search key may be searched with the matching domain of the first-level logical flow table in the multi-level logical flow table.
  • the matching domain of the second-level logical flow table in the multi-level logical flow table is searched for matching between the search key and the matching domain, until the last-level logical flow table.
  • the action of the multi-stage flow table pipeline can only be performed after the matching field of the last flow table is matched, and the execution of the hardware repetitive action has a certain limitation, and the method provided by the embodiment of the present invention Through the configurability of a single logical flow table of a multi-level logical flow table, combined with the division of the flow table, the multi-stage flow table pipeline can be well realized, and the repeated execution of actions can be realized at the same time.
  • the matching information of the extracted data packets may be further modified. If the packet header is operated during the matching domain execution of a matching flow table, for example, the header of the data packet is modified, so that the matching information of the previously extracted data packet partially fails. In this case, it is not necessary to re-extract all the matching information of the data packet, and only need to correspondingly tamper with the partial matching information.
  • the matching domain that matches the data packet matching information in the physical flow table may be matched by the flow table matching domain configuration information, and the flow table matching domain configuration information may be Modification by software, as needed, so that a plurality of logical flow tables are not required to be modified by modifying the matching fields in the physical flow table to form a multi-level flow table, so that the keywords generated according to the flow table matching domain configuration information match the plurality of The matching domain of each level flow table in the level flow table.
  • the single flow table in the multi-level flow table is a fixed matching domain, and each time the matching domain needs to be modified, the flow table matches the domain configuration information.
  • the generated keywords are also changeable, which is equivalent to turning the physical flow table into a logical flow table, the fixed matching domain becomes a changeable matching domain, and the flow table is enhanced.
  • the flexibility of the matching domain also reduces the cost of modifying the hardware logic when changing the matching domain.
  • the method may be: matching the domain configuration according to the flow table indicated by the bitmap.
  • Information determining, from the matching information of the data packet, matching information for performing flow table matching domain matching; forming the keyword by using the determined matching information, preferably, according to a flow table represented by a bitmap Matching the configuration information of the domain, determining, from the total matching information of the data packet, a plurality of matching information for performing matching of the matching table of the flow table, and forming the keyword by using the determined matching information, so that the keyword is
  • the search keyword matches the matching domain configured according to the flow table matching domain configuration information in the physical flow table.
  • a plurality of matching information for performing flow table matching domain matching are determined from all the matching information of the data packet, and the determined matching information is composed of the determined matching information.
  • the embodiment of the keyword is described below by way of further example.
  • all matching information of the data packet is extracted when the data packet is received, for example, a MAC address, a VLAN ID, an IP address, and a port number.
  • the flow table matching domain configuration information is represented by a bitmap, " ⁇ " is used to select a keyword generated by selecting a plurality of matching information from the all matching information according to the flow table matching domain configuration information, and "0" is The flow table matching domain configuration information is invalidated by selecting a plurality of matching information generated from the matching information.
  • the flow table matching domain configuration information also identifies that the physical flow table is to be matched with the selected matching information.
  • Matching domain therefore, in the flow table matching domain configuration information represented by the bitmap, " ⁇ also identifies the matching domain in the physical flow table that will match the selected matching information, and "0" identifies the physical The matching field in the flow table that does not match the selected matching information, that is, the matching field in the physical flow table is masked. As shown in Figure 1-b, all the matching information of the data packet is MAC. The address, VLAN ID, IP address, and port number are used as an example. Assume that the flow table matching domain configuration information represented by the bitmap is "1001", and the matching domain in the physical flow table includes matching domain 1, matching domain 2, and matching domain 3.
  • the meaning of " ⁇ and "0" in the domain configuration information indicates that Select the MAC address and port number in the four matching information of the MAC address, VLAN ID, IP address, and port number as the search key, and match the matching domain 1 and the matching domain 4 in the physical flow table, but the physical Match field 2 in the flow table Field shield 3, not involved in the matching information packet match.
  • a new physical flow table is obtained without modifying the hardware logic, and only the flow table matching domain configuration needs to be modified.
  • the information can be, for example, if it is necessary to modify the matching field in the physical flow table that matches the matching information from the original matching domain 1 and the matching domain 4 to match domain 2 and matching domain 4, then only need to
  • the flow table matching domain configuration information represented by the bitmap is modified to "0101".
  • the VLANs in the four matching information of the MAC address, the VLAN ID, the IP address, and the port number are selected.
  • the ID and port number are used as lookup keys to match match field 2 and match field 4 in the physical flow table, as shown in Figure 1-c.
  • another embodiment of selecting a keyword from the matching information of the data packet according to the flow table matching domain configuration information in the present invention may be: matching the flow table according to the fixed coding.
  • the domain configuration information, the matching information for performing the matching of the flow table matching domain is determined from the matching information of the data packet; and the keyword is formed by the determined matching information, preferably, may be:
  • a plurality of matching information for performing flow table matching domain matching are determined from all the matching information of the data packet, and the determined plurality of pieces are determined.
  • the embodiment in which the matching information constitutes the keyword is described below by way of example.
  • all matching information of the data packet is extracted when the data packet is received, for example, a MAC address, a VLAN ID, an IP address, and a port number.
  • the flow table matching domain configuration information is represented by a fixed code
  • a keyword generated by selecting a plurality of matching information from the all matching information according to the flow table matching domain configuration information corresponds to the fixed code.
  • the flow table matching domain configuration information also identifies a matching domain in the physical flow table that is to be matched with the selected matching information. Therefore, the flow table matching domain configuration information represented by the fixed coding also identifies the physical flow table. A matching field to be matched with the selected matching information. As shown in FIG.
  • the entire matching information of the data packet is a MAC address, a VLAN ID, an IP address, and a port number.
  • the flow table matching domain configuration information represented by the fixed code is "0x 15”
  • the matching fields in the physical flow table include matching domain 1, matching domain 2, matching domain 3, and matching domain. 4
  • the corresponding content is a MAC address, a VLAN ID, an IP address, and a port number
  • the flow table matching the domain configuration information according to the above fixed coding indicates that the MAC address, the VLAN ID, the IP address, and the MAC address, the VLAN ID, and the IP address are selected.
  • the "MAC address" and "port number” in the four matching information of the port number are used as search keys to match the matching domain 1 and the matching domain 4 in the physical flow table.
  • a new physical flow table is obtained without modifying the hardware logic, and only the flow table matching domain configuration needs to be modified.
  • the information can be, for example, if it is necessary to modify the matching field in the physical flow table that matches the matching information from the original matching domain 1 and the matching domain 4 to match domain 2 and matching domain 4, then only the above needs to be Modify the flow table matching domain configuration information represented by the fixed code "0x 15", for example, to "Ox 24".
  • the modified flow table matching domain configuration information select the MAC address, VLAN ID, IP address, and The VLAN ID and port number in the four matching information of the port number are used as search keys to match the matching field 2 and the matching field 4 in the physical flow table, as shown in Figure 1-e.
  • the search key is a combination of the MAC address and the IP address, and the contents used to match the physical flow table are respectively the MAC address and the IP address.
  • the search key is A combination of a MAC address and an IP address, which can form a search key, is a combination of a MAC address and an IP address.
  • FIG. 2 it is a schematic structural diagram of a multi-stage flow table searching apparatus according to an embodiment of the present invention. For the convenience of description, only parts related to the embodiment of the present invention are shown.
  • the multi-stage flow table lookup apparatus illustrated in Fig. 2 includes an extraction module 201, a keyword generation module 202, a lookup module 203, and an execution module 204, where:
  • the extracting module 201 is configured to extract matching information of the data packet when the data packet is received.
  • the matching information of the packet is the information in the packet that will match the content of the matching field in the flow table.
  • a flow table is composed of a large number of flow entries, and each flow entry is a forwarding rule.
  • the data packet entering the switch is obtained by querying the flow table to obtain the forwarded destination port.
  • a flow entry consists of a header field, a counter, and an operation.
  • the header field is an information tuple, for example, a quintuple, which is an identifier of a flow entry, and is also a matching domain of the flow table, and the content thereof is to be compared with the extracted data packet.
  • the matching information is used to match the specific information, and the counter is used to count the statistics of the flow entry, and the operation indicates the operation that the data packet matching the flow entry should perform.
  • the extraction module 201 can receive data when extracting matching information of a data packet according to a fixed matching field of a single flow table. When the packet is extracted, all matching information of the data packet is extracted, and the entire matching information may exist in the form of a data structure.
  • the keyword generating module 202 is configured to select a keyword from the matching information of the data packet according to the flow table matching domain configuration information.
  • the match field of each flow table in the multi-level flow table is fixed, and the hardware is configured to allocate a fixed storage space for the matching fields of the flow tables. If you want to replace the matching domain of the flow table, you need to modify the hardware logic, such as reallocating the global storage space, which undoubtedly increases the cost.
  • the specific content of the matching domain of the first-level flow table is IP
  • the specific content of the matching domain of the second-level flow table is MAC
  • the third pole The specific content of the matching field of the flow table is the VLAN ID.
  • To modify the specific content of the matching domain of the first-level flow table to the port number it can only be implemented by modifying the specific hardware logic. For example, re-editing the original allocation to The storage space of the matching domain of the first level flow table.
  • the storage space is also allocated for each matching domain of the flow table, and once the storage space is allocated, unless it is fixed by modifying the hardware logic, it may be through the software convection table.
  • the matching field that matches the matching information of the data packet is identified. This action is performed by using the flow table matching domain configuration information in the embodiment of the present invention. Since the flow table matching domain configuration information can be configured by using software, if the matching domain of the flow table is fixed, the matching domain in the flow table that matches the matching information of the data packet can match the domain configuration information according to the flow table. Change and change.
  • the flow table that is, a physical flow table corresponds to a fixed physical storage space.
  • the flow table matching domain configuration information mentioned in the embodiment of the present invention is specifically used to identify a matching domain in the flow table physical to be matched with the selected matching information by software.
  • the extraction module 201 extracts the matching information of the data packet when receiving the data packet, and the flow table matching domain configuration information is used to identify, by the software, a matching domain in the physical flow table that is to be matched with the selected matching information.
  • the keyword generating module 202 matches the domain configuration information according to the flow table, an embodiment of selecting a keyword from the matching information of the data packet may be based on the flow table matching domain configuration information, and all matching information from the data packet. Select several matching information to generate keywords.
  • the searching module 203 is configured to start, by using the keyword as a search key, a first-level flow table in the multi-level flow table, and search a matching domain of each level flow table in the multi-level flow table to perform the search key.
  • the word matches the match i or .
  • the executing module 204 is configured to: if the matching field of the current level flow table is matched, execute the corresponding instruction, if the current level flow table is not the last level flow table or has an instruction to perform an action, execute the corresponding action.
  • the extracting module 201 extracts the matching information of the data packet when receiving the data packet, and the flow table matching domain configuration information is used to identify, by the software, a matching letter to be selected with the selected one of the physical flow table.
  • the keyword generating module 202 selects a plurality of matching information generating keywords from all the matching information of the data packet according to the matching table configuration information of the flow table, and the searching module 203 is specifically configured to generate the keyword.
  • the keyword generated by the module 202 is a search key, starting from a first-level logical flow table in the multi-level logical flow table, searching for a matching domain of each logical flow table in the multi-level logical flow table to perform the search keyword.
  • the executing module 204 is specifically configured to: if the matching domain matching of the current level one logical flow table is completed, execute the corresponding instruction, if the current level one logical flow table is not the last level logic flow table or When there is an instruction to execute an action, the corresponding action is executed.
  • the multi-level logical flow table is a multi-level flow table relative to the prior art, and the multi-level flow table is a plurality of physical flow tables.
  • the table is formed by concatenating the logical flow table configured by the physical flow table according to the flow table matching domain configuration information involved in the foregoing embodiment.
  • the reason why it is a logical flow table is because the functions that these single logical flow tables can implement, such as the matching domain used to match the matching information of the data packets, are the same as the functions that a single physical flow table can achieve, but there is no Allocate physical storage space for a single logical flow table, but all logical flow tables share a storage space allocated for the physical flow table.
  • the cascading of multiple logical flow tables is also similar to the cascading of multiple physical flow tables. For example, after searching for a flow table, the ID is used to indicate the next one to be searched.
  • Flow table The execution of an instruction includes the modification of an action (action) of a certain data, the jump between flow tables, and the like, and the action (action) is specifically for the operation of the data packet, for example, discarding, forwarding Packets and more. If the matching domain matching of the current level one logical flow table is completed and the current level one logical flow table is the last level logical flow table, the processing flow of the data packet ends.
  • the search key After searching the matching domain of the first-level logical flow table in the multi-level logical flow table to perform matching between the search key and the matching domain, the search key may be searched with the matching domain of the first-level logical flow table in the multi-level logical flow table. Similar to the matching of the matching domain, the matching domain of the second-level logical flow table in the multi-level logical flow table is searched for matching between the search key and the matching domain, until the last-level logical flow table.
  • the action of the multi-stage flow table pipeline can only be performed after the matching field of the last flow table is matched, and the execution of the hardware repetitive action has a certain limitation, and the method provided by the embodiment of the present invention Through the configurability of a single logical flow table of a multi-level logical flow table, combined with the division of the flow table, the multi-stage flow table pipeline can be well realized, and the action can be repeated. carried out.
  • each functional module is merely an example, and the actual application may be implemented according to requirements, such as corresponding hardware configuration requirements or software implementation.
  • the above function assignment is performed by different functional modules, that is, the internal structure of the multi-stage flow table searching device is divided into different functional modules to complete all or part of the functions described above.
  • the corresponding functional modules in this embodiment may be implemented by corresponding hardware, or may be performed by corresponding hardware to execute corresponding software.
  • the foregoing extraction module may be configured to perform the foregoing upon receipt.
  • the hardware for extracting the matching information of the data packet may also be a general processor or other hardware device capable of executing a corresponding computer program to perform the foregoing functions; and the keyword generating module as described above may be
  • the hardware having the function of selecting a keyword from the matching information of the data packet according to the flow table matching domain configuration information, such as a keyword generator may also be a general processor capable of executing a corresponding computer program to perform the foregoing functions or Other hardware devices (the various described embodiments of the present specification apply the above described principles).
  • the flow table matching domain configuration information is information that can be modified by using software according to requirements, so that the flow table matching domain does not need to be modified by modifying hardware logic for
  • the keyword generated by the flow table matching domain configuration information matches the matching domain of each level flow table in the multi-level flow table.
  • the single flow table in the multi-level flow table is a fixed matching domain, and each time the matching domain needs to be modified, the flow table matches the domain configuration information. It can be configured through software, so the fixed match domain becomes a changeable match domain, which increases the flexibility of the flow table matching domain and reduces the cost of modifying the hardware logic when changing the matching domain.
  • each flow table has an independent search unit. Due to the similarity of the logic functions of each search unit, certain logical resource waste is caused.
  • the multi-stage flow table searching device exemplified in FIG. 2 through the cyclic multi-level flow table search, although the matching domain of each flow table is configured by software, the search itself is performed in the same module, and different implementations can be implemented.
  • the matching domain table shares a lookup module 203, which saves certain logical resources.
  • the multi-stage flow table search device illustrated in FIG. 2 may further include a modification module 301, such as the multi-stage flow table search device provided by another embodiment of the present invention as shown in FIG.
  • the modification module 301 pairs the extraction module 201 The matching information of the extracted data packet is modified.
  • the keyword generating module 202 includes a first determining unit 401 and a first combining unit 402, as shown in FIG. 4-a to FIG. 4-b.
  • the first determining unit 401 is configured to determine, according to the flow table matching domain configuration information represented by the bitmap, matching information used for performing matching of the flow table matching domain from the matching information of the data packet; the first combining unit 402 And constituting the keyword with the determined matching information.
  • the execution of the first determining unit 401 and the first combining unit 402 can be referred to the aforementioned FIG. 1-b and FIG.
  • the method embodiment corresponding to c is the same as the method embodiment corresponding to FIG. 1-b and FIG. 1-c, and details are not described herein.
  • the keyword generating module 202 includes a second determining unit 501 and a second combining unit 502, as shown in FIG. 5-a to FIG. 5-b.
  • a second determining unit 501 configured to determine, according to the flow table matching domain configuration information that is represented by a fixed code, matching information for performing flow table matching domain matching from the matching information of the data packet; the second combining unit 502 And constituting the keyword with the determined matching information.
  • the execution of the second determining unit 501 and the second combining unit 502 can be referred to the aforementioned FIG. 1-d and FIG.
  • the method embodiment corresponding to e is the same as the method embodiment corresponding to FIG. 1-d and FIG. 1-e, and details are not described herein.
  • Embodiments of the present invention also provide a multi-stage flow table lookup device, the device including a memory, and one or more programs, wherein one or more programs are stored in the memory and configured to be processed by one or more
  • the execution of one or more programs includes instructions for performing the following operations:
  • the corresponding instruction is executed. If the current primary flow table is not the last level flow table or has an instruction to perform an action, the corresponding action is performed.
  • the memory of the device further includes an instruction for performing the following operations:
  • the keyword is composed of the determined matching information.
  • the memory of the device further includes an instruction for performing the following operations:
  • the keyword is composed of the determined matching information.
  • Still another embodiment of the present invention provides a computer readable storage medium, which may be a computer readable storage medium included in the memory in the above embodiment; There is a computer readable storage medium that is not assembled into the terminal.
  • the computer readable storage medium stores one or more programs, the one or more programs being used by one or more processors to perform a multi-level flow table lookup method, the method comprising:
  • the method further include:
  • the selecting according to the flow table matching domain configuration information, a keyword from the matching information of the data packet, including :
  • the keyword is composed of the determined matching information.
  • the selecting according to the flow table matching domain configuration information, a keyword from the matching information of the data packet, including :
  • the keyword is composed of the determined matching information.

Landscapes

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

Abstract

本发明实施例提供一种多级流表查找方法和装置,以增强流表匹配域配置的灵活性。所述方法包括:在收到数据包时抽取数据包的匹配信息;根据流表匹配域配置信息,从数据包的匹配信息中选择关键字;以关键字为查找关键字,从多级流表中第一级流表开始,查找所述多级流表中每一级流表的匹配域进行查找关键字与匹配域的匹配;若当前一级流表的匹配域匹配完成,则执行相应的指令,若当前一级流表不是最后一级流表或者有执行动作的指令时,则执行相应的动作。本发明实施例提供的方法中,其流表匹配域配置信息可以通过软件配置,因此,固定的匹配域变成了可变化的匹配域,增强了流表匹配域的灵活性,也减少了因为更改匹配域时修改硬件逻辑带来的成本。

Description

一种多级流表查找方法和装置 本申请要求于 2013 年 6 月 28 日提交中国专利局、 申请号为 201310269726. 0 , 发明名称为 "一种多级流表查找方法和装置" 的中国专 利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域 本发明涉及通信领域, 尤其涉及一种多级流表查找方法和装置。 背景技术 随着网络设备新技术的发展, 特别是出于对可编程、 虚拟化的支持, 网络设备开始向控制、数据平面分离的方向发展, OpenFlow作为其中之一, 引发了广泛的关注。 OpenFlow网络由 OpenFlow交换机、 Flow Visor和控制 器(Controller )三部分组成, 其中, OpenFlow交换机是整个 OpenFlow网络 的核心部件, 主要管理数据层的转发, FlowVisor对网络进行虚拟化, Controller对网络进行集中控制, 实现控制层的功能。 OpenFlow交换机接收 到数据包后, 首先在本地的流表(flow table )上查找转发目标端口。 如果 没有匹配, 则将数据包转发给控制器, 由控制层决定转发端口。 OpenFlow 在 OpenFlow交换机上实现数据转发, 而在控制器上实现数据的转发控制, 从而实现了数据转发层和控制层的分离。
从上述数据包在 OpenFlow网络上的处理过程可知, 对流表的查找是一 个重要环节。 一般地, 本地流表不止一个, 而是由多个流表串接起来组成 多级流表。 现有的多级流表的匹配域都为固定多级流表匹配域, 其每个流 表的匹配域固定。 每个流表具有独立的查找单元, 一旦数据包到达, 则查 找单元查找其对应的流表。 然后, 通过查找所得下一个流表的 ID判断跳转 的下一个流表, 并将查找的结果添加对应的动作到指令集。 流表的跳转是 可以跨表跳转的, 根据 OpenFlow协议规定, 每个流表匹配完成后可以指定 下一个流表的 ID, 只要该 ID大于当前表 ID即可。 例如, 指定流表 1的匹配结 果为跳转到流表 3 , 则流表 1可以不经过流表 2直接跳转到流表 3。 上述现有的对多级流表的查找方法, 其主要缺点在于多级流表中每个 单个的流表为固定匹配域, 每次更换匹配域需要修改硬件逻辑, 缺乏灵活 性。 发明内容 本发明实施例提供一种多级流表查找方法和装置, 以增强流表匹配域 配置的灵活性。
本发明第一方面提供一种多级流表查找方法, 所述方法包括: 在收到数据包时抽取所述数据包的匹配信息;
根据流表匹配域配置信息, 从所述数据包的匹配信息中选择关键字; 以所述关键字为查找关键字, 从多级流表中第一级流表开始, 查找所 述多级流表中每一级流表的匹配域进行所述查找关键字与所述匹配域的匹 配;
若当前一级流表的匹配域匹配完成, 则执行相应的指令, 若所述当前 一级流表不是最后一级流表或者有执行动作的指令时, 则执行相应的动作。
结合第一方面或第一方面的第一种可能的实现方式, 在第一方面的第 二种可能的实现方式中, 所述执行相应的指令和动作后, 所述方法还包括: 对所述抽取的数据包的匹配信息进行修改。
结合第一方面、 第一方面的第一种可能的实现方式或第一方面的第二 种可能的实现方式, 在第一方面的第三种可能的实现方式中, 从所述数据 包的匹配信息中选择关键字, 包括:
根据以位图表示的所述流表匹配域配置信息, 从所述数据包的匹配信 息中确定用于进行流表匹配域匹配的匹配信息;
以所述确定的匹配信息组成所述关键字。
结合第一方面、 第一方面的第一种可能的实现方式或第一方面的第二 种可能的实现方式, 在第一方面的第四种可能的实现方式中, 从所述数据 包的匹配信息中选择关键字, 包括:
根据以固定编码表示的所述流表匹配域配置信息, 从所述数据包的匹 配信息中确定用于进行流表匹配域匹配的匹配信息; 以所述确定的匹配信息组成所述关键字。
本发明第二方面提供一种多级流表查找装置, 所述装置包括: 抽取模块, 用于在收到数据包时抽取所述数据包的匹配信息; 关键字生成模块, 用于根据流表匹配域配置信息, 从所述数据包的匹 配信息中选择关键字;
查找模块, 用于以所述关键字为查找关键字, 从多级流表中第一级流 表开始, 查找所述多级流表中每一级流表的匹配域进行所述查找关键字与 所述匹配 i或的匹配;
执行模块, 用于若当前一级流表的匹配域匹配完成, 则执行相应的指 令, 若所述当前一级流表不是最后一级流表或者有执行动作的指令时, 则 执行相应的动作。
结合第二方面或第二方面的第一种可能的实现方式, 在第二方面的第 二种可能的实现方式中, 所述装置还包括:
修改模块, 用于对所述抽取的数据包的匹配信息进行修改。
结合第二方面、 第二方面的第一种可能的实现方式或第二方面的第二 种可能的实现方式, 在第二方面的第三种可能的实现方式中, 从关键字生 成模块, 包括:
第一确定单元, 用于根据以位图表示的所述流表匹配域配置信息, 从 所述数据包的匹配信息中确定用于进行流表匹配域匹配的匹配信息;
第一组合单元, 用于以所述确定的匹配信息组成所述关键字。
结合第二方面、 第二方面的第一种可能的实现方式或第二方面的第二 种可能的实现方式, 在第二方面的第四种可能的实现方式中, 从关键字生 成模块, 包括:
第二确定单元, 用于根据以固定编码表示的所述流表匹配域配置信息, 从所述数据包的匹配信息中确定用于进行流表匹配域匹配的匹配信息; 第二组合单元, 用于以所述确定的匹配信息组成所述关键字。
从上述本发明实施例可知, 由于流表匹配域配置信息是可以根据需要 釆用软件进行修改的信息, 使得无需通过修改硬件逻辑来改变流表匹配域, 以供根据流表匹配域配置信息生成的关键字匹配所述多级流表中每一级流 表的匹配域。 与现有技术中多级流表中每个单个的流表为固定匹配域, 每 次更换匹配域需要修改硬件逻辑相比, 由于本发明实施例提供的方法中, 其流表匹配域配置信息可以通过软件配置, 因此, 固定的匹配域变成了可 变化的匹配域, 增强了流表匹配域的灵活性, 也减少了因为更改匹配域时 修改硬件逻辑带来的成本。 附图说明 为了更清楚地说明本发明实施例的技术方案, 下面将对现有技术或实 施例描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的 附图仅仅是本发明的一些实施例, 对于本领域技术人员来讲, 还可以如这 些附图获得其他的附图。
图 1-a是本发明实施例提供的多级流表查找方法流程示意图;
图 1-b是本发明实施例提供的多级流表查找方法中的匹配示意图; 图 1-c是本发明另一实施例提供的多级流表查找方法中的匹配示意图; 图 1-d是本发明另一实施例提供的多级流表查找方法中的匹配示意图; 图 1-e是本发明另一实施例提供的多级流表查找方法中的匹配示意图; 图 2是本发明实施例提供的多级流表查找装置结构示意图;
图 3是本发明另一实施例提供的多级流表查找装置结构示意图; 图 4-a是本发明另一实施例提供的多级流表查找装置结构示意图; 图 4-b是本发明另一实施例提供的多级流表查找装置结构示意图; 图 5-a是本发明另一实施例提供的多级流表查找装置结构示意图; 图 5-b是本发明另一实施例提供的多级流表查找装置结构示意图。 具体实施方式 下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进 行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域技术人员所获得的 所有其他实施例, 都属于本发明保护的范围。 请参阅附图 1-a,是本发明实施例提供的多级流表查找方法流程示意图, 主要包括 S101、 S102、 S103和 S104, 详细说明如下:
5101 , 在收到数据包时抽取所述数据包的匹配信息。
数据包的匹配信息是该数据包中将要与流表中匹配域的内容进行匹配 的信息。 所谓流表(flow table ), 是由很多个流表项组成, 每个流表项就是 一个转发规则。 进入交换机的数据包通过查询流表来获得转发的目的端口。 流表项由头域、 计数器和操作组成, 其中, 头域是信息元组, 例如五元组, 是流表项的标识, 也是流表的匹配域, 其内容就是将要与所抽取的数据包 的匹配信息进行匹配的具体信息, 计数器用来计数流表项的统计数据, 操 作标明了与该流表项匹配的数据包应该执行的操作。 与现有技术每次根据 单个流表固定的匹配域去抽取数据包的匹配信息、 从而需要多次抽取不同, 在本发明实施例中, 作为在收到数据包时抽取数据包的全部匹配信息的一 个优选实施例, 可以是在收到数据包时抽取数据包的全部匹配信息, 该全 部匹配信息可以以数据结构的形式存在。
5102, 根据流表匹配域配置信息, 从所述数据包的匹配信息中选择关 键字。
现有技术中, 多级流表中的每个流表的匹配域 ( match field )是固定的, 在硬件上体现为为这些流表的匹配域分配了固定的存储空间。 如果要更换 流表的匹配域, 则需要修改硬件逻辑, 例如对全局的存储空间进行重新分 配, 这无疑增大了成本。 例如, 包含三个流表的多级流表, 第一级流表的 匹配域的具体内容是 IP , 第二级流表的匹配域的具体内容是 MAC , 第三极 流表的匹配域的具体内容是 VLAN ID, 若要将第一级流表的匹配域的具体 内容修改为端口号, 则只能通过修改具体的硬件逻辑来实现, 例如, 重新 修改原来分配给第一级流表的匹配域的存储空间。
在本发明实施例中, 虽然也为流表的各个匹配域分配了存储空间, 并 且存储空间一旦分配完成, 除非通过修改硬件逻辑, 否则也是固定不变的, 但是, 可以通过软件对流表中将要与数据包的匹配信息匹配的匹配域进行 标识, 这一动作是釆用本发明实施例中的流表匹配域配置信息来完成。 由 于流表匹配域配置信息是可以釆用软件进行配置的, 因此, 虽然流表的匹 配域固定, 流表中将要与数据包的匹配信息进行匹配的匹配域是可以根据 流表匹配域配置信息变化而变化的。 需要说明的是, 无论是现有技术的流 表还是本发明实施例中通过软件对流表中将要与数据包的匹配信息匹配的 匹配域进行标识所涉及的 "流表", 两者都是物理的流表, 即一个物理的流 表对应固定的物理存储空间。 从这个角度而言, 本发明实施例提及的流表 匹配域配置信息, 具体是用于通过软件标识物理的流表中将要与所述选择 的匹配信息进行匹配的匹配域。
当在收到数据包时抽取所述数据包的全部匹配信息作为在收到数据包 时抽取所述数据包的匹配信息的一个优选实施例, 并且, 流表匹配域配置 信息用于通过软件标识物理的流表中将要与所述选择的匹配信息进行匹配 的匹配域时, 根据流表匹配域配置信息, 从所述数据包的匹配信息中选择 关键字的一个实施例可以是根据流表匹配域配置信息, 从所述数据包的全 部匹配信息中选择若干个匹配信息生成关键字。
5103 , 以步骤 S102选择出的所述关键字为查找关键字, 从多级流表中 第一级流表开始, 查找所述多级流表中每一级流表的匹配域进行所述查找 关键字与所述匹配域的匹配。
5104 , 若当前一级流表的匹配域匹配完成, 则执行相应的指令, 若所 述当前一级流表不是最后一级流表或者有执行动作的指令时, 则执行相应 的动作。
当前述 S101和 S102的实施例是: 在收到数据包时抽取所述数据包的全 部匹配信息, 根据流表匹配域配置信息, 从所述数据包的全部匹配信息中 选择若干个匹配信息生成关键字时, 作为本发明一个优选实施例, 以 S102 选择出的关键字为查找关键字, 从多级流表中第一级流表开始, 查找所述 多级流表中每一级流表的匹配域进行所述查找关键字与所述匹配域的匹 配, 若当前一级流表的匹配域匹配完成, 则执行相应的指令, 若所述当前 一级流表不是最后一级流表或者有执行动作的指令时, 则执行相应的动作 可以是: 以所述关键字为查找关键字, 从多级逻辑流表中第一级逻辑流表 开始, 查找所述多级逻辑流表中每一级逻辑流表的匹配域进行所述查找关 键字与所述匹配域的匹配, 若当前一级逻辑流表的匹配域匹配完成, 则执 行相应的指令, 若所述当前一级逻辑流表不是最后一级逻辑流表或者有执 行动作的指令时, 则执行相应的动作。
需要说明的是, 本发明实施例中的多级逻辑流表是相对于现有技术的 多级流表是多个物理的流表而言, 所谓多级逻辑流表是根据前述实施例中 涉及的流表匹配域配置信息对物理的流表配置所得的逻辑流表级联而成。 之所以说是逻辑流表, 是因为这些单个逻辑流表能够实现的功能, 例如其 匹配域用于对数据包的匹配信息进行匹配, 与单个物理的流表能够实现的 功能相同, 但并没有为单个逻辑流表分配物理的存储空间, 而是所有的逻 辑流表共享一个为物理的流表所分配的存储空间。多个逻辑流表的级联(即 多级逻辑流表)也类似于多个物理的流表的级联, 例如, 都是在查找完一 个流表后通过其中的 ID指示下一个将要查找的流表。
在本发明实施例中, 指令(instruction ) 的执行, 包括对某个数据进行 的动作(action )的修改、 流表之间的跳转等等, 而执行动作(action )是专 门针对数据包的操作, 例如, 丟弃、 转发数据包等等。 如果当前一级逻辑 流表的匹配域匹配完成且所述当前一级逻辑流表是最后一级逻辑流表, 则 对该数据包的处理流程结束。 在查找多级逻辑流表中第一级逻辑流表的匹 配域进行查找关键字与匹配域的匹配后, 可以与查找多级逻辑流表中第一 级逻辑流表的匹配域进行查找关键字与匹配域的匹配类似的方法, 查找多 级逻辑流表中第二级逻辑流表的匹配域进行查找关键字与匹配域的匹配, 直至最后一级逻辑流表。 现有技术中, 多级流表流水线的动作 (action )只 能在最后一个流表的匹配域匹配完毕以后才能执行, 硬件重复动作的执行 具有一定的限制, 而本发明实施例提供的方法中, 通过对多级逻辑流表单 个逻辑流表的可配置性, 结合流表的划分, 能够很好地实现多级流表流水 线, 同时可以实现动作的重复执行。
在执行相应的指令和动作后, 进一步地, 可以对抽取的数据包的匹配 信息进行修改。 如果在某一次匹配流表的匹配域执行过程中对数据包头部 进行了操作, 例如修改了数据包的头部, 从而导致之前抽取的数据包的匹 配信息部分失效。 在这种情形下, 不需要重新抽取数据包的全部匹配信息, 而只需要对应爹改部分失效的匹配信息即可。 从上述本发明实施例提供的多级流表查找方法可知, 物理的流表中将 要与数据包匹配信息进行匹配的匹配域可以通过流表匹配域配置信息标 识, 由于流表匹配域配置信息可以根据需要釆用软件进行修改, 使得无需 通过修改物理的流表中匹配域而得到多个逻辑的流表形成多级流表, 以供 根据流表匹配域配置信息生成的关键字匹配所述多级流表中每一级流表的 匹配域。 与现有技术中多级流表中每个单个的流表为固定匹配域, 每次更 换匹配域需要修改硬件逻辑相比, 由于本发明实施例提供的方法中, 其流 表匹配域配置信息可以通过软件配置, 因此, 生成的关键字也是可变化的, 这就相当于将物理的流表变成了逻辑的流表, 固定的匹配域变成了可变化 的匹配域, 增强了流表匹配域的灵活性, 也减少了因为更改匹配域时修改 硬件逻辑带来的成本。
对于上述实施例, 作为本发明中根据流表匹配域配置信息, 从所述数 据包的匹配信息中选择关键字的一个实施例, 可以是: 根据以位图表示的 所述流表匹配域配置信息, 从所述数据包的匹配信息中确定用于进行流表 匹配域匹配的匹配信息; 以所述确定的匹配信息组成所述关键字, 优选地, 可以是根据以位图表示的流表匹配域配置信息, 从数据包的全部匹配信息 中确定若干个用于进行流表匹配域匹配的匹配信息, 以所述确定的若干个 匹配信息组成所述关键字, 从而以所述关键字为查找关键字, 匹配所述物 理的流表中根据所述流表匹配域配置信息配置的匹配域。
为了说明上述根据以位图表示的流表匹配域配置信息, 从数据包的全 部匹配信息中确定若干个用于进行流表匹配域匹配的匹配信息, 以所述确 定的若干个匹配信息组成所述关键字这一实施例, 以下进一步举例进行说 明。
假设在收到数据包时抽取了该数据包的全部匹配信息, 例如, MAC地 址、 VLAN ID、 IP地址和端口号等。在流表匹配域配置信息以位图(bitmap ) 表示时, 使用 "Γ 表示根据流表匹配域配置信息从所述全部匹配信息中选 择若干个匹配信息生成的关键字有效, "0" 表示根据流表匹配域配置信息 从所述全部匹配信息中选择若干个匹配信息生成的关键字无效。 由于流表 匹配域配置信息也标识了物理的流表中将要与所述选择的匹配信息进行匹 配的匹配域, 因此, 以位图表示的流表匹配域配置信息中, "Γ 也标识了 物理的流表中将要与所述选择的匹配信息进行匹配的匹配域, "0" 则标识 物理的流表中不与所述选择的匹配信息进行匹配的匹配域, 即对物理的流 表中的匹配域进行了屏蔽。 如附图 1-b所示, 以数据包的全部匹配信息是 MAC地址、 VLAN ID、 IP地址和端口号为例, 假设以位图表示的流表匹配 域配置信息是 "1001" , 物理的流表中的匹配域包括匹配域 1、 匹配域 2、 匹 配域 3和匹配域 4 , 并且对应包含的内容分别是 MAC地址、 VLAN ID、 IP地 址和端口号, 则按照上述以位图表示的流表匹配域配置信息中 "Γ 和 "0" 的含义 , 表示将选择 MAC地址、 VLAN ID、 IP地址和端口号这四个匹配信 息中的 MAC地址和端口号作为查找关键字,与物理的流表中的匹配域 1和匹 配域 4进行匹配, 而对物理的流表中的匹配域 2、 匹配域 3进行了屏蔽, 不参 与对数据包的匹配信息进行匹配。 若要修改物理的流表中将要与匹配信息 进行匹配的匹配域, 在本发明实施例中, 无需重新修改硬件逻辑而得到一 个新的物理的流表, 而是只需要修改流表匹配域配置信息即可, 例如, 若 需要将物理的流表中将要与匹配信息进行匹配的匹配域由原来的匹配域 1 和匹配域 4进行匹配修改为匹配域 2和匹配域 4 , 则只需要将上述以位图表示 的流表匹配域配置信息修改为 "0101" , 如此, 根据修改后的流表匹配域配 置信息, 选择 MAC地址、 VLAN ID、 IP地址和端口号这四个匹配信息中的 VLAN ID和端口号作为查找关键字 , 与物理的流表中的匹配域 2和匹配域 4 进行匹配, 如附图 1-c所示。
对于上述实施例, 作为本发明中根据流表匹配域配置信息, 从所述数 据包的匹配信息中选择关键字的另一实施例, 也可以是: 根据以固定编码 表示的所述流表匹配域配置信息, 从所述数据包的匹配信息中确定用于进 行流表匹配域匹配的匹配信息; 以所述确定的匹配信息组成所述关键字, 优选地, 可以是: 根据以固定编码表示的所述流表匹配域配置信息, 从所 述数据包的全部匹配信息中确定若干个用于进行流表匹配域匹配的匹配信 息, 以所述确定的若干个匹配信息组成所述关键字, 从而以所述关键字为 查找关键字, 匹配所述物理的流表中根据所述流表匹配域配置信息配置的 匹配域。 为了说明上述根据以固定编码表示的所述流表匹配域配置信息, 从所 述数据包的全部匹配信息中确定若干个用于进行流表匹配域匹配的匹配信 息, 以所述确定的若干个匹配信息组成所述关键字这一实施例, 以下进一 步举例进行说明。
假设在收到数据包时抽取了该数据包的全部匹配信息, 例如, MAC地 址、 VLAN ID、 IP地址和端口号等。 在流表匹配域配置信息以固定编码表 示时, 表示根据流表匹配域配置信息从所述全部匹配信息中选择若干个匹 配信息生成的关键字与该固定编码对应。 由于流表匹配域配置信息也标识 了物理的流表中将要与所述选择的匹配信息进行匹配的匹配域, 因此, 以 固定编码表示的流表匹配域配置信息也标识了物理的流表中将要与所述选 择的匹配信息进行匹配的匹配域。 如附图 1-d所示, 以数据包的全部匹配信 息是 MAC地址、 VLAN ID、 IP地址和端口号为例 , 假设以固定编码表示的 流表匹配域配置信息是 "0x 15" , 其与从全部匹配信息中选择的若干个匹配 信息生成的关键字 "MAC地址"、 "端口号" 对应, 物理的流表中的匹配域 包括匹配域 1、 匹配域 2、 匹配域 3和匹配域 4, 并且对应包含的内容分别是 MAC地址、 VLAN ID、 IP地址和端口号, 则按照上述以固定编码表示的流 表匹配域配置信息的含义, 表示将选择 MAC地址、 VLAN ID、 IP地址和端 口号这四个匹配信息中的 "MAC地址" 和 "端口号" 作为查找关键字, 与 物理的流表中的匹配域 1和匹配域 4进行匹配。 若要修改物理的流表中将要 与匹配信息进行匹配的匹配域, 在本发明实施例中, 无需重新修改硬件逻 辑而得到一个新的物理的流表, 而是只需要修改流表匹配域配置信息即可, 例如, 若需要将物理的流表中将要与匹配信息进行匹配的匹配域由原来的 匹配域 1和匹配域 4进行匹配修改为匹配域 2和匹配域 4 , 则只需要将上述以 固定编码 "0x 15"表示的流表匹配域配置信息进行修改, 例如,修改为 "Ox 24" ,如此,根据修改后的流表匹配域配置信息,选择 MAC地址、 VLAN ID、 IP地址和端口号这四个匹配信息中的 VLAN ID和端口号作为查找关键字 , 与物理的流表中的匹配域 2和匹配域 4进行匹配, 如附图 1-e所示。
不失一般性, 对于上述抽取的 MAC地址、 VLAN ID、 IP地址和端口号 等数据包的匹配信息, 如果以位图 (bitmap )表示的流表匹配域配置信息, 例如 "1010" (其中, "Γ 表示该位有效, "0" 表示无效), 则查找关键字 为 MAC地址和 IP地址的组合, 用于匹配物理的流表中内容分别为 MAC地址 和 IP地址的匹配域。 对于上述抽取的 MAC地址、 VLAN ID、 IP地址和 ACL 规则等数据包的匹配信息, 如果以固定编码表示的流表匹配域配置信息, 例如 "0x 13" , 则查找关键字为 MAC地址和 IP地址的组合, 可以组成查找 的关键字为 MAC地址和 IP地址等的组合。
请参阅附图 2, 是本发明实施例提供的多级流表查找装置结构示意图。 为了便于说明, 仅仅示出了与本发明实施例相关的部分。 附图 2示例的多级 流表查找装置包括抽取模块 201、 关键字生成模块 202、 查找模块 203和执行 模块 204, 其中:
抽取模块 201 , 用于在收到数据包时抽取所述数据包的匹配信息。
数据包的匹配信息是该数据包中将要与流表中匹配域的内容进行匹配 的信息。 所谓流表(flow table ), 是由很多个流表项组成, 每个流表项就是 一个转发规则。 进入交换机的数据包通过查询流表来获得转发的目的端口。 流表项由头域、 计数器和操作组成, 其中, 头域是信息元组, 例如五元组, 是流表项的标识, 也是流表的匹配域, 其内容就是将要与所抽取的数据包 的匹配信息进行匹配的具体信息, 计数器用来计数流表项的统计数据, 操 作标明了与该流表项匹配的数据包应该执行的操作。 与现有技术每次根据 单个流表固定的匹配域去抽取数据包的匹配信息、 从而需要多次抽取不同, 在本发明实施例中, 作为一个优选实施例, 抽取模块 201可以在收到数据包 时抽取数据包的全部匹配信息, 该全部匹配信息可以以数据结构的形式存 在。
关键字生成模块 202, 用于根据流表匹配域配置信息, 从所述数据包的 匹配信息中选择关键字。
现有技术中, 多级流表中的每个流表的匹配域 ( match field )是固定的, 在硬件上体现为为这些流表的匹配域分配了固定的存储空间。 如果要更换 流表的匹配域, 则需要修改硬件逻辑, 例如对全局的存储空间进行重新分 配, 这无疑增大了成本。 例如, 包含三个流表的多级流表, 第一级流表的 匹配域的具体内容是 IP , 第二级流表的匹配域的具体内容是 MAC , 第三极 流表的匹配域的具体内容是 VLAN ID, 若要将第一级流表的匹配域的具体 内容修改为端口号, 则只能通过修改具体的硬件逻辑来实现, 例如, 重新 修改原来分配给第一级流表的匹配域的存储空间。
在本发明实施例中, 虽然也为流表的各个匹配域分配了存储空间, 并 且存储空间一旦分配完成, 除非通过修改硬件逻辑, 否则也是固定不变的, 但是, 可以通过软件对流表中将要与数据包的匹配信息匹配的匹配域进行 标识, 这一动作是釆用本发明实施例中的流表匹配域配置信息来完成。 由 于流表匹配域配置信息是可以釆用软件进行配置的, 因此, 虽然流表的匹 配域固定, 流表中将要与数据包的匹配信息进行匹配的匹配域是可以根据 流表匹配域配置信息变化而变化的。 需要说明的是, 无论是现有技术的流 表还是本发明实施例中通过软件对流表中将要与数据包的匹配信息匹配的 匹配域进行标识所涉及的 "流表", 两者都是物理的流表, 即一个物理的流 表对应固定的物理存储空间。 从这个角度而言, 本发明实施例提及的流表 匹配域配置信息, 具体是用于通过软件标识物理的流表中将要与所述选择 的匹配信息进行匹配的匹配域。
当抽取模块 201在收到数据包时抽取所述数据包的匹配信息, 并且, 流 表匹配域配置信息用于通过软件标识物理的流表中将要与所述选择的匹配 信息进行匹配的匹配域时, 关键字生成模块 202根据流表匹配域配置信息, 从所述数据包的匹配信息中选择关键字的一个实施例可以是根据流表匹配 域配置信息, 从所述数据包的全部匹配信息中选择若干个匹配信息生成关 键字。
查找模块 203 , 用于以所述关键字为查找关键字, 从多级流表中第一级 流表开始, 查找所述多级流表中每一级流表的匹配域进行所述查找关键字 与所述匹配 i或的匹配。
执行模块 204, 用于若当前一级流表的匹配域匹配完成, 则执行相应的 指令, 若所述当前一级流表不是最后一级流表或者有执行动作的指令时, 则执行相应的动作。
抽取模块 201在收到数据包时抽取所述数据包的匹配信息, 并且, 流表 匹配域配置信息用于通过软件标识物理的流表中将要与所述选择的匹配信 息进行匹配的匹配域, 关键字生成模块 202根据流表匹配域配置信息, 从所 述数据包的全部匹配信息中选择若干个匹配信息生成关键字时, 查找模块 203具体用于以关键字生成模块 202生成的关键字为查找关键字, 从多级逻 辑流表中第一级逻辑流表开始, 查找所述多级逻辑流表中每一级逻辑流表 的匹配域进行所述查找关键字与所述匹配域的匹配; 执行模块 204具体用于 若当前一级逻辑流表的匹配域匹配完成, 则执行相应的指令, 若所述当前 一级逻辑流表不是最后一级逻辑流表或者有执行动作的指令时, 则执行相 应的动作。
需要说明的是, 在附图 2示例的多级流表查找装置中, 多级逻辑流表是 相对于现有技术的多级流表是多个物理的流表而言, 所谓多级逻辑流表是 根据前述实施例中涉及的流表匹配域配置信息对物理的流表配置所得的逻 辑流表级联而成。 之所以说是逻辑流表, 是因为这些单个逻辑流表能够实 现的功能, 例如其匹配域用于对数据包的匹配信息进行匹配, 与单个物理 的流表能够实现的功能相同, 但并没有为单个逻辑流表分配物理的存储空 间, 而是所有的逻辑流表共享一个为物理的流表所分配的存储空间。 多个 逻辑流表的级联(即多级逻辑流表)也类似于多个物理的流表的级联, 例 如, 都是在查找完一个流表后通过其中的 ID指示下一个将要查找的流表。 指令(instruction )的执行包括对某个数据进行的动作(action )的修改、 流 表之间的跳转等等, 而执行动作(action )是专门针对数据包的操作, 例如, 丟弃、 转发数据包等等。 如果当前一级逻辑流表的匹配域匹配完成且所述 当前一级逻辑流表是最后一级逻辑流表, 则对该数据包的处理流程结束。 在查找多级逻辑流表中第一级逻辑流表的匹配域进行查找关键字与匹配域 的匹配后, 可以与查找多级逻辑流表中第一级逻辑流表的匹配域进行查找 关键字与匹配域的匹配类似的方法, 查找多级逻辑流表中第二级逻辑流表 的匹配域进行查找关键字与匹配域的匹配, 直至最后一级逻辑流表。 现有 技术中, 多级流表流水线的动作(action )只能在最后一个流表的匹配域匹 配完毕以后才能执行, 硬件重复动作的执行具有一定的限制, 而本发明实 施例提供的方法中, 通过对多级逻辑流表单个逻辑流表的可配置性, 结合 流表的划分, 能够很好地实现多级流表流水线, 同时可以实现动作的重复 执行。
需要说明的是, 以上附图 2示例的多级流表查找装置的实施方式中, 各 功能模块的划分仅是举例说明, 实际应用中可以根据需要, 例如相应硬件 的配置要求或者软件的实现的便利考虑, 而将上述功能分配由不同的功能 模块完成, 即将所述多级流表查找装置的内部结构划分成不同的功能模块, 以完成以上描述的全部或者部分功能。 而且, 实际应用中, 本实施例中的 相应的功能模块可以是由相应的硬件实现, 也可以由相应的硬件执行相应 的软件完成, 例如, 前述的抽取模块, 可以是具有执行前述在收到数据包 时抽取所述数据包的匹配信息的硬件, 例如抽取器, 也可以是能够执行相 应计算机程序从而完成前述功能的一般处理器或者其他硬件设备; 再如前 述的关键字生成模块, 可以是具有执行前述根据流表匹配域配置信息, 从 所述数据包的匹配信息中选择关键字功能的硬件, 例如关键字生成器, 也 可以是能够执行相应计算机程序从而完成前述功能的一般处理器或者其他 硬件设备(本说明书提供的各个实施例都可应用上述描述原则 )。
从上述附图 2示例的多级流表查找装置可知, 由于流表匹配域配置信息 是可以根据需要釆用软件进行修改的信息, 使得无需通过修改硬件逻辑来 改变流表匹配域, 以供根据流表匹配域配置信息生成的关键字匹配所述多 级流表中每一级流表的匹配域。 与现有技术中多级流表中每个单个的流表 为固定匹配域, 每次更换匹配域需要修改硬件逻辑相比, 由于本发明实施 例提供的方法中, 其流表匹配域配置信息可以通过软件配置, 因此, 固定 的匹配域变成了可变化的匹配域, 增强了流表匹配域的灵活性, 也减少了 因为更改匹配域时修改硬件逻辑带来的成本。
现有技术中的多级流表流水线中, 每个流表具有独立的查找单元。 由 于各个查找单元的逻辑功能具有一定的相似性, 造成了一定的逻辑资源浪 费。 而在附图 2示例的多级流表查找装置中, 通过循环的多级流表查找, 尽 管通过软件配置了每个流表的匹配域, 但查找本身是在同一个模块进行, 可以实现不同匹配域的表共享一个查找模块 203 , 节省了一定的逻辑资源。
附图 2示例的多级流表查找装置还可以包括修改模块 301 , 如附图 3所示 本发明另一实施例提供的多级流表查找装置。 修改模块 301对抽取模块 201 抽取的数据包的匹配信息进行修改。
在附图 2或附图 3任一示例的多级流表查找装置中, 关键字生成模块 202 包括第一确定单元 401和第一组合单元 402,如附图 4-a至附图 4-b任一示例的 多级流表查找装置, 其中:
第一确定单元 401 , 用于根据以位图表示的所述流表匹配域配置信息, 从所述数据包的匹配信息中确定用于进行流表匹配域匹配的匹配信息; 第一组合单元 402, 用于以所述确定的匹配信息组成所述关键字。
附图 4-a或附图 4-b任一示例的多级流表查找装置中, 其第一确定单元 401和第一组合单元 402的执行可以参阅前述附图 1-b和附图 1-c对应的方法 实施例, 其带来的有益效果也与附图 1-b和附图 1-c对应的方法实施例相同, 这里不做赘述。
在附图 2至附图 3任一示例的多级流表查找装置中, 关键字生成模块 202 包括第二确定单元 501和第二组合单元 502,如附图 5-a至附图 5-b任一示例的 多级流表查找装置, 其中:
第二确定单元 501 , 用于根据以固定编码表示的所述流表匹配域配置信 息, 从所述数据包的匹配信息中确定用于进行流表匹配域匹配的匹配信息; 第二组合单元 502, 用于以所述确定的匹配信息组成所述关键字。
附图 5-a或附图 5-b任一示例的多级流表查找装置中, 其第二确定单元 501和第二组合单元 502的执行可以参阅前述附图 1-d和附图 1-e对应的方法 实施例, 其带来的有益效果也与附图 1-d和附图 1-e对应的方法实施例相同, 这里不做赘述。
本发明实施例还提供一种多级流表查找设备, 该设备包括有存储器, 以及一个或者一个以上的程序, 其中一个或者一个以上程序存储于存储器 中, 且经配置以由一个或者一个以上处理器执行述一个或者一个以上程序 包含用于进行以下操作的指令:
在收到数据包时抽取所述数据包的匹配信息;
根据流表匹配域配置信息, 从所述数据包的匹配信息中选择关键字; 以所述关键字为查找关键字, 从多级流表中第一级流表开始, 查找所 述多级流表中每一级流表的匹配域进行所述查找关键字与所述匹配域的匹 配;
若当前一级流表的匹配域匹配完成, 则执行相应的指令, 若所述当前 一级流表不是最后一级流表或者有执行动作的指令时, 则执行相应的动作。
4叚设上述为第一种可能的实施方式, 则在第一种可能的实施方式作为 基础而提供的第三种可能的实施方式中, 所述设备的存储器中, 还包含用 于执行以下操作的指令:
对所述抽取的数据包的匹配信息进行修改。
在第一种或者第二可能的实施方式作为基础而提供的第三种可能的实 施方式中, 所述设备的存储器中, 还包含用于执行以下操作的指令:
根据以位图表示的所述流表匹配域配置信息, 从所述数据包的匹配信 息中确定用于进行流表匹配域匹配的匹配信息;
以所述确定的匹配信息组成所述关键字。
在第一种或者第二可能的实施方式作为基础而提供的第四种可能的实 施方式中, 所述设备的存储器中, 还包含用于执行以下操作的指令:
根据以固定编码表示的所述流表匹配域配置信息, 从所述数据包的匹 配信息中确定用于进行流表匹配域匹配的匹配信息;
以所述确定的匹配信息组成所述关键字。
作为另一方面, 本发明再一实施例还提供了一种计算机可读存储介质 , 该计算机可读存储介质可以是上述实施例中的存储器中所包含的计算机可 读存储介质; 也可以是单独存在, 未装配入终端中的计算机可读存储介质。 所述计算机可读存储介质存储有一个或者一个以上程序, 所述一个或者一 个以上程序被一个或者一个以上的处理器用来执行一个多级流表查找方 法, 所述方法包括:
在收到数据包时抽取所述数据包的匹配信息;
根据流表匹配域配置信息, 从所述数据包的匹配信息中选择关键字; 以所述关键字为查找关键字, 从多级流表中第一级流表开始, 查找所 述多级流表中每一级流表的匹配域进行所述查找关键字与所述匹配域的匹 配;
若当前一级流表的匹配域匹配完成, 则执行相应的指令, 若所述当前 一级流表不是最后一级流表或者有执行动作的指令时, 则执行相应的动作。 4叚设上述为第一种可能的实施方式, 则在第一种可能的实施方式作为 基础而提供的第二种可能的实施方式中, 所述执行相应的指令和动作后, 所述方法还包括:
对所述抽取的数据包的匹配信息进行修改。
在第一种或者第二种可能的实施方式作为基础而提供的第三种可能的 实施方式中, 所述根据流表匹配域配置信息, 从所述数据包的匹配信息中 选择关键字, 包括:
根据以位图表示的所述流表匹配域配置信息, 从所述数据包的匹配信 息中确定用于进行流表匹配域匹配的匹配信息;
以所述确定的匹配信息组成所述关键字。
在第一种或者第二种可能的实施方式作为基础而提供的第四种可能的 实施方式中, 所述根据流表匹配域配置信息, 从所述数据包的匹配信息中 选择关键字, 包括:
根据以固定编码表示的所述流表匹配域配置信息, 从所述数据包的匹 配信息中确定用于进行流表匹配域匹配的匹配信息;
以所述确定的匹配信息组成所述关键字。
需要说明的是, 上述装置各模块 /单元之间的信息交互、 执行过程等内 容, 由于与本发明方法实施例基于同一构思, 其带来的技术效果与本发明 方法实施例相同, 具体内容可参见本发明方法实施例中的叙述, 此处不再 赘述。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分 是可以通过程序来指令相关的硬件来完成, 该程序可以存储于一计算机可 读存储介质中,存储介质可以包括:只读存储器( ROM, Read Only Memory )、 随机存取存储器 (RAM, Random Access Memory ), 磁盘或光盘等。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的 各示例的单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件 的结合来实现。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方 案的特定应用和设计约束条件。 专业技术人员可以对每个特定的应用来使 用不同方法来实现所描述的功能, 但是这种实现不应认为超出本发明的范 围。
以上对本发明实施例提供的一种多级流表查找方法和装置进行了详细 上实施例的说明只是用于帮助理解本发明的方法及其核心思想; 同时, 对 于本领域的一般技术人员, 依据本发明的思想, 在具体实施方式及应用范 围上均会有改变之处, 综上所述, 本说明书内容不应理解为对本发明的限 制。

Claims

权利要求
1、 一种多级流表查找方法, 其特征在于, 所述方法包括:
在收到数据包时抽取所述数据包的匹配信息;
根据流表匹配域配置信息, 从所述数据包的匹配信息中选择关键字; 以所述关键字为查找关键字, 从多级流表中第一级流表开始, 查找所 述多级流表中每一级流表的匹配域进行所述查找关键字与所述匹配域的匹 配;
若当前一级流表的匹配域匹配完成, 则执行相应的指令, 若所述当前 一级流表不是最后一级流表或者有执行动作的指令时, 则执行相应的动作。
2、 如权利要求 1所述的方法, 其特征在于, 所述执行相应的指令和动 作后, 所述方法还包括:
对所述抽取的数据包的匹配信息进行修改。
3、 如权利要求 1至 2任意一项所述的方法, 其特征在于, 所述根据流表 匹配域配置信息, 从所述数据包的匹配信息中选择关键字, 包括:
根据以位图表示的所述流表匹配域配置信息, 从所述数据包的匹配信 息中确定用于进行流表匹配域匹配的匹配信息;
以所述确定的匹配信息组成所述关键字。
4、 如权利要求 1至 2任意一项所述的方法, 其特征在于, 所述根据流表 匹配域配置信息, 从所述数据包的匹配信息中选择关键字, 包括:
根据以固定编码表示的所述流表匹配域配置信息, 从所述数据包的匹 配信息中确定用于进行流表匹配域匹配的匹配信息;
以所述确定的匹配信息组成所述关键字。
5、 一种多级流表查找装置, 其特征在于, 所述装置包括:
抽取模块, 用于在收到数据包时抽取所述数据包的匹配信息; 关键字生成模块, 用于根据流表匹配域配置信息, 从所述数据包的匹 配信息中选择关键字;
查找模块, 用于以所述关键字为查找关键字, 从多级流表中第一级流 表开始, 查找所述多级流表中每一级流表的匹配域进行所述查找关键字与 所述匹配 i或的匹配;
执行模块, 用于若当前一级流表的匹配域匹配完成, 则执行相应的指 令, 若所述当前一级流表不是最后一级流表或者有执行动作的指令时, 则 执行相应的动作。
6、 如权利要求 5所述的装置, 其特征在于, 所述装置还包括: 修改模块, 用于对所述抽取的数据包的匹配信息进行修改。
7、 如权利要求 5至 6任意一项所述的装置, 其特征在于, 所述关键字生 成模块包括:
第一确定单元, 用于根据以位图表示的所述流表匹配域配置信息, 从 所述数据包的匹配信息中确定用于进行流表匹配域匹配的匹配信息;
第一组合单元, 用于以所述确定的匹配信息组成所述关键字。
8、 如权利要求 5至 6任意一项所述的装置, 其特征在于, 所述关键字生 成模块包括:
第二确定单元, 用于根据以固定编码表示的所述流表匹配域配置信息, 从所述数据包的匹配信息中确定用于进行流表匹配域匹配的匹配信息; 第二组合单元, 用于以所述确定的匹配信息组成所述关键字。
PCT/CN2014/081087 2013-06-28 2014-06-30 一种多级流表查找方法和装置 Ceased WO2014206364A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP14817047.5A EP2999176B1 (en) 2013-06-28 2014-06-30 Searching method and device for multilevel flow table
US14/980,102 US9860180B2 (en) 2013-06-28 2015-12-28 Multi-level flow table search method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310269726.0 2013-06-28
CN201310269726.0A CN103354522B (zh) 2013-06-28 2013-06-28 一种多级流表查找方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/980,102 Continuation US9860180B2 (en) 2013-06-28 2015-12-28 Multi-level flow table search method and apparatus

Publications (1)

Publication Number Publication Date
WO2014206364A1 true WO2014206364A1 (zh) 2014-12-31

Family

ID=49310837

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/081087 Ceased WO2014206364A1 (zh) 2013-06-28 2014-06-30 一种多级流表查找方法和装置

Country Status (4)

Country Link
US (1) US9860180B2 (zh)
EP (1) EP2999176B1 (zh)
CN (1) CN103354522B (zh)
WO (1) WO2014206364A1 (zh)

Families Citing this family (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103354522B (zh) 2013-06-28 2016-08-10 华为技术有限公司 一种多级流表查找方法和装置
CN103560951A (zh) * 2013-11-13 2014-02-05 华为技术有限公司 报文处理方法及物理转发设备
CN103647718B (zh) * 2013-12-13 2018-02-13 华为技术有限公司 数据包的处理方法和装置
EP3079327B1 (en) * 2013-12-30 2018-06-06 Huawei Technologies Co., Ltd. Information transmission method, device and system
CN105099913B (zh) 2014-04-21 2018-07-20 新华三技术有限公司 一种报文转发方法及设备
CN104168222B (zh) * 2014-07-15 2018-08-03 新华三技术有限公司 一种报文传输方法和设备
CN105591914B (zh) * 2014-10-21 2020-07-03 中兴通讯股份有限公司 一种openflow流表的查表方法和装置
US9571412B2 (en) * 2014-11-21 2017-02-14 Cavium, Inc. Systems and methods for hardware accelerated timer implementation for openflow protocol
CN104518969B (zh) * 2014-12-12 2018-12-25 北京智谷睿拓技术服务有限公司 数据报文处理方法、装置及交换机
CN104518970B (zh) * 2014-12-12 2018-12-25 北京智谷睿拓技术服务有限公司 流表更新方法、装置及控制器
CN104579941A (zh) * 2015-01-05 2015-04-29 北京邮电大学 一种OpenFlow交换机中的报文分类方法
CN105227466B (zh) * 2015-08-20 2019-01-11 北京百度网讯科技有限公司 通信处理方法和装置
CN105915467B (zh) * 2016-05-17 2019-06-18 清华大学 一种面向软件定义的数据中心网络流量均衡方法及装置
CN107547409B (zh) * 2016-06-24 2020-12-25 华为技术有限公司 一种路由查找方法、装置和路由设备
CN106254244B (zh) * 2016-07-28 2020-01-07 上海斐讯数据通信技术有限公司 一种基于sdn网络的合并流表项方法
CN106330722B (zh) * 2016-10-26 2019-11-12 杭州迪普科技股份有限公司 一种创建路由缓存项的方法、转发报文的方法及装置
CN108011823B (zh) * 2016-11-01 2021-11-19 中兴通讯股份有限公司 多域流表的多级化方法及装置、多级流表查找方法及装置
US10491520B2 (en) * 2017-04-06 2019-11-26 Ca, Inc. Container-based software appliance
CN107707479B (zh) * 2017-10-31 2021-08-31 北京锐安科技有限公司 五元组规则的查找方法及装置
CN108259353B (zh) * 2018-01-10 2021-02-26 浙江工商大学 一种基于匹配字段具体值重复率的多级流表设计方法
CN110324245B (zh) * 2018-03-31 2021-03-23 华为技术有限公司 一种基于集成流表转发报文的方法及装置
CN111294280B (zh) * 2018-12-07 2022-03-15 中国电信股份有限公司 消息查重方法和装置、数据转发方法、设备和系统
CN109921996B (zh) * 2018-12-29 2021-11-09 长沙理工大学 一种高性能的OpenFlow虚拟流表查找方法
CN109996026B (zh) * 2019-04-23 2021-01-19 广东小天才科技有限公司 基于穿戴式设备的视频特效互动方法、装置、设备及介质
CN113688289B (zh) * 2020-05-19 2023-11-24 中移(成都)信息通信科技有限公司 数据包关键字段匹配方法、装置、设备及存储介质
CN112632079B (zh) * 2020-12-30 2023-07-21 联想未来通信科技(重庆)有限公司 一种数据流标识的查询方法及装置
CN113515485B (zh) * 2021-07-12 2024-04-02 合肥芯荣微电子有限公司 一种SoC芯片控制寄存器模块RTL代码自动生成方法
CN113645137B (zh) * 2021-08-02 2022-05-31 清华大学 一种软件定义网络多级流表压缩方法及系统
CN115374147B (zh) * 2022-08-22 2025-08-26 烽火通信科技股份有限公司 一种流分类时关键字匹配的方法和装置
CN115314564A (zh) * 2022-08-30 2022-11-08 中兴通讯股份有限公司 报文匹配方法、计算机设备和计算机可读存储介质
CN116366521B (zh) * 2022-12-29 2024-11-26 天翼云科技有限公司 一种针对网卡的数据包的流表规则统计方法和装置
CN119603214B (zh) * 2024-11-28 2025-11-07 深圳星云智联科技有限公司 流表拆分方法、设备及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080019360A1 (en) * 2006-07-20 2008-01-24 Sun Microsystems, Inc. Multi-level packet classification
CN102957603A (zh) * 2012-11-09 2013-03-06 盛科网络(苏州)有限公司 基于多级流表的Openflow报文转发方法及系统
CN103095583A (zh) * 2012-11-09 2013-05-08 盛科网络(苏州)有限公司 通过芯片环回实现Openflow两级流表的方法及系统
CN103354522A (zh) * 2013-06-28 2013-10-16 华为技术有限公司 一种多级流表查找方法和装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7389462B1 (en) * 2003-02-14 2008-06-17 Istor Networks, Inc. System and methods for high rate hardware-accelerated network protocol processing
US7784094B2 (en) * 2005-06-30 2010-08-24 Intel Corporation Stateful packet content matching mechanisms
WO2007044562A1 (en) * 2005-10-07 2007-04-19 Agere Systems Inc. Media data processing using distinct elements for streaming and control processes
CN101247337B (zh) * 2008-02-18 2012-11-21 华为技术有限公司 一种报文转发的方法和设备
US8964563B2 (en) * 2011-07-08 2015-02-24 Telefonaktiebolaget L M Ericsson (Publ) Controller driven OAM for OpenFlow
US8718064B2 (en) * 2011-12-22 2014-05-06 Telefonaktiebolaget L M Ericsson (Publ) Forwarding element for flexible and extensible flow processing software-defined networks
US8831000B2 (en) * 2012-10-10 2014-09-09 Telefonaktiebolaget L M Ericsson (Publ) IP multicast service join process for MPLS-based virtual private cloud networking

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080019360A1 (en) * 2006-07-20 2008-01-24 Sun Microsystems, Inc. Multi-level packet classification
CN102957603A (zh) * 2012-11-09 2013-03-06 盛科网络(苏州)有限公司 基于多级流表的Openflow报文转发方法及系统
CN103095583A (zh) * 2012-11-09 2013-05-08 盛科网络(苏州)有限公司 通过芯片环回实现Openflow两级流表的方法及系统
CN103354522A (zh) * 2013-06-28 2013-10-16 华为技术有限公司 一种多级流表查找方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2999176A4 *

Also Published As

Publication number Publication date
EP2999176A1 (en) 2016-03-23
CN103354522A (zh) 2013-10-16
EP2999176A4 (en) 2016-06-01
US9860180B2 (en) 2018-01-02
EP2999176B1 (en) 2019-01-02
US20160112329A1 (en) 2016-04-21
CN103354522B (zh) 2016-08-10

Similar Documents

Publication Publication Date Title
WO2014206364A1 (zh) 一种多级流表查找方法和装置
EP3593503B1 (en) Packet processor in virtual filtering platform
US10778612B2 (en) Variable TCAM actions
JP5518135B2 (ja) データセンター向けの拡張可能なマルチキャスト転送方法および装置
TWI766893B (zh) 虛擬專有網路及規則表生成方法、裝置及路由方法
US10348603B1 (en) Adaptive forwarding tables
US10397116B1 (en) Access control based on range-matching
WO2014177097A1 (zh) 一种流表条目生成方法及相应设备
CN103339887A (zh) 用于优化网络前缀列表搜索的方法
US10547547B1 (en) Uniform route distribution for a forwarding table
WO2014186170A1 (en) Compressing singly linked lists sharing common nodes for multi-destination group expansion
CN101707550B (zh) 一种确定镜像数据流的方法和设备
CN109672623B (zh) 一种报文处理方法和装置
WO2015101113A1 (zh) 处理报文的方法与设备
WO2012075818A1 (zh) 报文包头的解析方法、包头解析预处理装置和网络处理器
WO2014100981A1 (zh) 查找表的创建方法、查询方法、控制器、转发设备和系统
WO2017054439A1 (zh) 一种报文处理方法及装置
WO2013020429A1 (zh) 网络处理器镜像实现方法及网络处理器
CN101222434B (zh) 存储策略控制列表、策略搜索方法和三态寻址存储器
WO2015131720A1 (zh) 报文处理方法及装置
US20190044873A1 (en) Method of packet processing using packet filter rules
WO2014206208A1 (zh) 数据查询方法、设备和系统
Li et al. Towards full virtualization of SDN infrastructure
CN102148758A (zh) 优先级继承方法及装置
WO2017045574A1 (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: 14817047

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2014817047

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE