WO2011108168A1 - Packet classifier, packet classification method, and packet classification program - Google Patents

Packet classifier, packet classification method, and packet classification program Download PDF

Info

Publication number
WO2011108168A1
WO2011108168A1 PCT/JP2010/072548 JP2010072548W WO2011108168A1 WO 2011108168 A1 WO2011108168 A1 WO 2011108168A1 JP 2010072548 W JP2010072548 W JP 2010072548W WO 2011108168 A1 WO2011108168 A1 WO 2011108168A1
Authority
WO
WIPO (PCT)
Prior art keywords
rule
node
circuit
rules
tree
Prior art date
Application number
PCT/JP2010/072548
Other languages
French (fr)
Japanese (ja)
Inventor
則夫 山垣
Original Assignee
日本電気株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電気株式会社 filed Critical 日本電気株式会社
Priority to JP2012502968A priority Critical patent/JP5673667B2/en
Publication of WO2011108168A1 publication Critical patent/WO2011108168A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/02Capturing of monitoring data
    • H04L43/028Capturing of monitoring data by 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
    • 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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Definitions

  • the present invention relates to a packet classifier, and more particularly to a packet classifier using a plurality of packet header fields as search keys.
  • Packet classification is an important technology for classifying packets into a series of packet sequences called flows in routers and switches on the network, and for providing QoS (Quality of Service) for individual flows.
  • QoS Quality of Service
  • NIDS Network Intrusion Detection System
  • NIPS Network Intrusion Prevention System
  • packet classification for example, it is defined in TCP (Transmission Control Protocol) / UDP (User Datagram Protocol) header in addition to the source IP address, destination IP address, and protocol number defined in the IP (Internet Protocol) header of the packet.
  • a plurality of packet header fields such as a transmission port number and a destination port number are used as search keys.
  • a series of packet sequences specified by this search key is called a flow.
  • the above five packet header fields are generally called 5-tuple.
  • This search key is defined in advance as a rule (sometimes referred to as a filter), and in particular, such packet classification using a plurality of packet header fields is referred to as Multi-Field Packet Classification.
  • Exact Match that defines the packet header field as a specific value
  • a plurality of upper bits in the packet header field are specified, but a lower number of bits is used by using a wild card (*).
  • Prefix Match defined as undefined Range Match defining a packet header field as a range of two specific values
  • Wildcard Match defining a packet header field by specifying a wild card in units of individual bits are used. For example, when an 8-bit packet header field is considered, the packet header field is designated as a specific value such as “00110101”, and the match header is designated as “0011 ***”, and the packet header field is designated as “0011 ***”.
  • Prefix Match "Specified as a value starting from 4 bits” is Prefix Match, and when the packet header field is considered as a decimal number, such as [3-64], it is only required to be in the range of 3 to 64.
  • a wildcard match is a wildcard that can be used in bit units of the packet header field, such as “0 ** 10 * 01”.
  • TCAM ternary content addressable memory
  • TCAM has problems such as high cost, large power consumption and circuit scale.
  • Range Match there is a problem that the number of rules increases because it is necessary to divide the rule into rules using Prefix Match.
  • Non-Patent Document 1 proposes a technique using a Decision Tree (decision tree) called HyperCuts. A method based on such a decision tree will be briefly described with reference to FIGS. 1, 2, and 3.
  • FIG. 1 is a diagram illustrating an example of a rule set including 12 rules R0 to R11 defined using two fields X and Y each having 4 bits.
  • the fields X and Y are 4 bits each here, but correspond to actual packet header fields such as a source IP address and a source port number.
  • the field X is expressed in binary, and “*” represents a wild card whose value may be 0 or 1.
  • the field Y is represented by Range Match, where “[a: b]” a is a lower limit value (decimal notation) and b is an upper limit value (decimal notation).
  • each rule is given a priority (Priority) and a method of handling a packet (Action) in the case of corresponding to the rule, but they are omitted here.
  • FIG. 2 shows the respective rules in a two-dimensional space of fields X and Y for such a rule set.
  • FIG. 2 is a diagram showing the rule set of FIG. 1 on a two-dimensional space (space represented by fields X and Y). Note that the numbers on the X-axis and the Y-axis are expressed in decimal numbers.
  • FIG. 3 is a diagram showing an example of a basic Decision Tree constructed for the rule set of FIG.
  • the threshold that is the number of rules in the divided area is set to 2. In FIG. 3, first, both X and Y are divided into two areas, which are divided into four areas.
  • the rule list managed in each area is [R5, R6, R7, R9] (area 0), [R0, R3, R5, R6, R11] (area 1), [R1, R2, R4]. , R10] (region 2), [R3, R4, R8] (region 3).
  • FIG. 3 is merely an example, and the algorithm for constructing the Decision Tree is described in Non-Patent Document 1, and is omitted here.
  • the method using Decision Tree reduces the number of rules to be searched by dividing an area focusing on a plurality of dimensions and performing a search on a small number of rules managed by the divided area. It is a technique to do.
  • rule duplication when a region is divided, it may be managed by a plurality of divided regions depending on the rule.
  • this is referred to as rule duplication.
  • FIG. 3 it can be seen that rules such as R3 and R4 are managed in a plurality of areas. The more such rules are replicated, the greater the management of address values to the replicated rules, or the management of the rules themselves, and apparently it will handle more rules than the actual rule set, The amount of data in Decision Tree increases.
  • Non-Patent Document 1 and Non-Patent Document 2 if a node that is not a leaf node also has a rule list and the rule is replicated between its child nodes (areas), There has been proposed a method for managing the rule to be duplicated in the rule list, so that the subsequent child nodes do not manage the rule, and consequently reduce the number of rules to be duplicated.
  • Non-Patent Document 3 proposes a multi-field packet classification method called Parallel Bit Vector (hereinafter referred to as “Parellel BV”).
  • Parelel BV pay attention to each field that constitutes a rule, and prepare a bit array (called Bit Vector (BV)) for each section of the focused field divided by each rule. To perform Packet Classification.
  • Bit Vector Bit Vector
  • FIG. 4 is a diagram showing an example of the BV for the rule set shown in FIG.
  • the bit position and the rule included in the rule set are associated with each other on a one-to-one basis, and each bit is '1' if the value of the section matches the associated rule. In this case, “0” is assigned.
  • R11, R10,..., R0 are assigned from the upper bits of each BV. Such BV is prepared for all the fields constituting the rule.
  • Parallel BV selects a rule that may match for each field constituting the rule, and finally determines the result of all fields in a comprehensive manner, thereby limiting the matching rule. It is a technique.
  • Non-Patent Document 2 proposes a hardware architecture that processes a method using a Decision Tree, such as HyperCuts, using a pipeline. Note that, as described above, Non-Patent Document 2 uses a technique for reducing the number of replicated rules by providing a rule list to a node that is not a leaf node.
  • FIG. 5 is a diagram showing an example of a decision tree constructed using the method of Non-Patent Document 2 for the rule set of FIG. Since the method of building the Decision Tree is described in Non-Patent Document 2, details are omitted, but as can be seen from a comparison of FIG. 3 and FIG. 5, a node that is not a leaf node also has a rule list. As a result, the number of rules to be duplicated can be reduced, and the height of the Decision Tree can be kept low.
  • Non-Patent Document 2 In the hardware architecture of Non-Patent Document 2, two pipelines are used in parallel: Tree Pipeline for tracing the Decision Tree and Rule Pipeline for searching all the rules included in the rule list at each node. Packet classification. There is only one Tree Pipeline, and basically there is a pipeline stage equal to the depth (height) of the Decision Tree, and each stage advances one deep node. On the other hand, when each node is reached, an address value to one of the rules included in the rule list is designated, and a process of matching it one by one at each stage of the Rule Pipeline is started.
  • the number of stages in Rule Pipeline is equal to the number of rules included in the rule list, that is, the number of thresholds, and the number of Rules Pipeline is one more than the number of stages in Tree Pipeline. Since the detailed architecture is described in Non-Patent Document 2, it is omitted here.
  • Non-Patent Document 2 the larger the sum of the header field lengths constituting one rule, the larger the required capacity of a memory that can be accessed at high speed, for example, SRAM, and the processing of one packet.
  • SRAM static random access memory
  • the dynamic power of the memory increases, resulting in an increase in overall power consumption.
  • Non-Patent Document 4 discloses an algorithm obtained by extending Parallel BV and a hardware architecture that processes the algorithm by a pipeline.
  • the memory capacity necessary for managing the BV usually increases by O (N 2 ) with respect to the number of rules N.
  • the field is divided into a plurality of subfields, and BVs are prepared for all possible values of the subfield composed of the small number of bits. For example, when a certain field is divided into 1-bit subfields, one BV is prepared with any value (0 or 1) that can be taken by the subfield. For this reason, the number of BVs that take bitwise AND increases, but the required memory capacity can be suppressed to a linear increase.
  • it is not necessary to perform matching using the rule itself in the Parellel BV it is possible to store the rule in, for example, a large capacity and low speed DRAM, and hold only the BV in a high speed SRAM. It is.
  • Parellel BV since one BV length is proportional to the number of rules N, the larger the number of rules, the more clock cycles are consumed to read BV from the memory, and N bits BV Specifically, since it is necessary to read out the number of fields constituting the rule, there is a problem that the dynamic power increases, resulting in an increase in power consumption.
  • Non-Patent Document 2 and Non-Patent Document 4 the above-described 5-tuple is assumed as packet header information used as a rule, and packet header information used as a rule is changed. It is necessary to change the hardware circuit again.
  • Non-Patent Document 5 discloses a method aiming to compensate for the disadvantages of both by combining HyperCuts and Parellel BV.
  • this method only the number of rules for which the BV read from the memory has a realistic bit length for high-speed processing is processed by the BV, and the rest are processed by HyperCuts.
  • HyperCuts when processing is performed with HyperCuts, it is possible to reduce the memory capacity required for HyperCuts by processing rules that require more copies with Parrel BV.
  • the multi-field packet classification method using hardware using a memory such as SRAM as described above has the following problems.
  • the first problem is that the larger the sum of the header field lengths that make up one rule, and the greater the number of rules, the more memory dynamic power increases, resulting in the overall hardware. This also increases power consumption.
  • the second problem is that the greater the number of rules, the greater the number of clock cycles required to read data from the memory.
  • the packet header information used as a rule for example, a hardware circuit is assembled assuming 5-tuple, and thus changing the hardware circuit is necessary. is there.
  • the change of packet header information here does not mean changing the packet header information used for each rule, but the packet header information that can be used for each rule is determined in advance. This means that the packet header information can be changed freely without changing the hardware circuit.
  • An object of the present invention is to provide a packet classifier, a packet classification method, and a packet classification program that can solve any of the problems described above.
  • the packet classifier of the present invention From a rule set composed of a large number of rules defined using a plurality of fields, a rule that matches the search key to be searched is selected using a plurality of types of bit arrays having a predetermined small number of lengths.
  • a packet classifier to search for Using a decision tree, we narrow down the rules that can be matched from a large number of rules to a predetermined number, Using a bit identifier having the same length as the number of rules narrowed down by the decision tree for each predetermined data in the search key, and using a rule identifier list having rule identifiers indicated by the bit positions of these bit arrays as a list Identify the matching rule from the narrowed-down rules, Determine the final matching rule according to the priority of the identified rule, It is characterized by that.
  • the packet classification method of the present invention includes: A packet classification method by a packet classifier that searches a rule set composed of a large number of rules defined using a plurality of fields and that matches a search key that is a search target, Using a decision tree, narrow down the number of rules that may match from a large number of rules to a predetermined number, Using a bit identifier having the same length as the number of rules narrowed down by the decision tree for each predetermined data in the search key, and using a rule identifier list having rule identifiers indicated by the bit positions of these bit arrays as a list Identify the matching rule from the narrowed-down rules, Determine the final matching rule according to the priority of the identified rule, It is characterized by that.
  • the packet classification program of the present invention is From a rule set consisting of a large number of rules defined using multiple fields to a computer that searches for a rule that matches the search key that is the search target, Using a decision tree, a process of narrowing down a rule that may be matched from a large number of rules to a predetermined number, Using a bit identifier having the same length as the number of rules narrowed down by the decision tree for each predetermined data in the search key, and using a rule identifier list having rule identifiers indicated by the bit positions of these bit arrays as a list Process to identify the matching rule from the narrowed down rules, Determining the final matching rule according to the priority of the identified rule; Is executed.
  • the present invention by combining a decision tree and a bit arrangement, it is possible to reduce the amount of data read from the memory in processing per packet, and the sum of the header field lengths constituting one rule. Even when the number of rules increases or the number of rules increases, an increase in the dynamic power of the memory can be suppressed, and as a result, the power consumption of the entire hardware can be prevented from increasing.
  • the number of rules that can be matched by the decision tree can be narrowed down even if the number of rules is large, so the bit length of the bit array can be reduced, An effect is obtained that an increase in the number of clock cycles necessary for reading data from the memory can be suppressed.
  • FIG. 1 It is a figure which shows the example of a rule set. It is the figure which represented the rule set of FIG. 1 on the two-dimensional space. It is a figure which shows an example of Decision Tree with respect to the rule set of FIG. It is a figure which shows an example of Bit Vector with respect to the rule set of FIG. It is a figure which shows an example of Decision Tree constructed
  • FIG. 13 is a diagram showing a rule list of node 0 in FIG. 12 on a two-dimensional space and showing a Bit Vector for valid bits of fields X and Y.
  • FIG. 13 is a diagram showing a rule list of a node 8 in FIG. 12 on a two-dimensional space and showing a Bit Vector for valid bits of fields X and Y.
  • FIG. 13 is a diagram showing a rule list of a node 8 in FIG. 12 on a two-dimensional space and showing a Bit Vector for valid bits of fields X and Y. It is a block diagram which shows the 1st Embodiment of this invention.
  • FIG. 1 It is a figure which shows the example of mapping to the Tree Pipeline Stage of the several Decision Tree node in the 1st Embodiment of this invention. It is a block diagram which shows the structure of Tree Pipeline Stage in the 2nd Embodiment of this invention. It is a figure which shows the example of the area
  • FIG. 6 is a diagram showing an example of Decision Tree used in the basic packet classification method according to the present invention.
  • FIG. 6 shows an example in which node 0 is a root node of a decision tree, and each node that is not a leaf node is divided into two or four regions.
  • Each leaf node manages a rule list (rule list indicated by a solid line in FIG. 6) which is a rule group having a threshold value L or less managed in each divided region.
  • a rule list (rule list indicated by a dotted line in FIG. 6) for reducing duplication of rules as proposed in Non-Patent Document 1 and Non-Patent Document 2 is maintained.
  • the method proposed by the nonpatent literature 1 and the nonpatent literature 2 shall be used, and detailed description is abbreviate
  • FIG. 7 is a diagram showing area division information in each node of the Decision Tree used in the basic packet classification method according to the present invention.
  • “Leaf Flag” indicating whether or not the node is a leaf node in the Decision Tree, and in order to divide the area in each node of the Decision Tree by the packet classification method.
  • the number of divisions (Num. Of Cutting) for the C fields used for the field the Base Address (base address) in which the area division information for the child node of the node is stored, and the node is not a real node but a virtual node “Virtual Flag” indicating the above.
  • the number of divisions is designated in the same manner as in Non-Patent Document 2, and when k is designated as the number of divisions, the number of divisions for the field is 2 k . Specific usage methods regarding other information will be described later. Note that this area division information is stored in the memory, and when the decision tree arrives at each node, the corresponding area division information is read from the memory.
  • FIG. 8 is a diagram showing Bit Vector (BV) information in each node of the Decision Tree used in the basic packet classification method according to the present invention.
  • BV Bit Vector
  • This rule ID list corresponds to the rule list in the node, and indicates the rule IDs of the maximum L rules managed in the divided area of the node and their priorities (in FIG. 8, The priority is not shown, but the priority is assumed to be managed together with the rule ID).
  • the length of BV is L bits, and as shown in FIG. 8, the bit position and the rule ID list have a one-to-one correspondence.
  • bit position of BV is expressed as BV [L-1], BV [L-2], BV [L-3],..., BV [0] from the upper order
  • the meaning which each bit of BV represents is the same as the existing Parallel BV, description is abbreviate
  • the effective bit length is managed in each field of the search key, and the BV is managed only for the bit length indicated by the effective bit length. Also, it is assumed that the rule ID list and BV are held in the memory.
  • FIG. 9 is a flowchart showing the basic operation of the basic packet classification method in the present invention.
  • step A1 when packet header information serving as a search key is input, processing starts from the root node of the Decision Tree (step A1).
  • a predetermined Parallel BV process is executed based on the managed rule ID list and search key (step A2).
  • the Parallel BV processing here is based on the methods described in Non-Patent Document 3, Non-Patent Document 4, and the like.
  • the optimal rule is selected from the rules including the processing node and the optimal rule from each processing node before the processing node (step A3).
  • step A4 the area division information in the processing node is read from the memory (step A4).
  • the memory address for the area division information of the node is determined at the time of processing in the parent node, notified to the processing node that is a child node, and the processing node is stored in the address value.
  • the area division information is read. From the leaf flag of the read area division information, check whether the node is a leaf node of the Decision Tree (step A5). If the node is not a leaf node (No in step A5), the area division information of the processing node
  • the memory address value in which the area division information of the next child node is stored is determined from the number of divisions for the field specified in (this is called selecting the next child node), and the child node is set as the processing node. (Step A6).
  • the first k bits of the effective bit length are checked among the values of the field of the search key, After combining them, by adding to the Base Address of the area division information, the memory address value storing the area division information for the next child node can be determined. It is possible to determine which child node.
  • the variable k is a value specified by the number of divisions of the region division information.
  • the effective bit length is updated by subtracting k specified by the area division information from the effective bit length of each field (step A7), and the process returns to step A2 and is repeated.
  • the effective bit length is managed as an internal variable, is initialized with the field length of the field, and is passed from the root node to the node following the Decision Tree.
  • the processing node is a leaf node of Decision Tree (Yes in step A5), the processing is terminated, and the optimal rule selected so far is set as the final solution.
  • FIG. 10 is a diagram illustrating an example of a rule set including 20 rules R0 to R19 defined using two fields X and Y each including 4 bits, as in the rule set of FIG. .
  • FIG. 11 is a diagram showing the rule set shown in FIG. 10 on a two-dimensional space of fields X and Y.
  • FIG. 12 shows the rule set shown in FIG. It is an example of Decision Tree constructed by a packet classification method. However, the threshold L (the number of rules that can be included in the rule ID list) in the Decision Tree in FIG.
  • the node 0 which is the root node of the Decision Tree is set as a processing node, and processing is started (step A1). Since the rule list of node 0 includes R7 and R8, the rule ID list is (R7, R8), and the BVs for fields X and Y are “10” and “01”, respectively.
  • FIG. 13a is a diagram showing the rule list of the node 0 in the two-dimensional space and showing the BV for the fields X and Y. From FIG. 13a, it can be seen that the BVs for the fields X and Y at node 0 are "10" and "01", respectively.
  • step A2 the bitwise AND of the acquired BV is taken to obtain the final BV “00” in the processing node 0 (step A2). From this result, it can be determined that there is no optimal solution up to this processing node and no matching rule exists (step A3).
  • step A4 the area division information at node 0 is read (step A4). In this example, detailed area division information is not shown, but the number of divisions for fields X and Y used for area division is shown in each node of FIG.
  • the Leaf Flag from the node 5 to the node 7 and the node 9 to the node 14 is 1, that is, a leaf node, and the other Leaf Flags are all 0, that is, not a leaf node.
  • the virtual flags are all 0, that is, all nodes are real nodes. Since it can be determined from the area division information of node 0 that node 0 is not a leaf node of the decision tree (No in step A5), area division is performed, and the next child node is selected to be a processing node (step A6). . In this case, since 1 is designated as the division number k for the fields X and Y, and the effective bit length of each field is 4, the leading bits for the effective bits of the fields X and Y of the search key are concatenated. By adding Base Address to 11 ′′, the memory address value in which the area division information of the node 4, which is the next processing node, is stored is determined. Finally, the effective bit length is updated by reducing the effective bit length by 1, which is the number of divisions (step A7).
  • FIG. 13B is a diagram showing the rule list of the node 4 in a two-dimensional space and showing BVs for the fields X and Y. Since the effective bit length for the fields X and Y is 3 at the node 4, BVs for the lower 3 bits that are effective bits are prepared, and the area portions that are not effective bits are filled. From FIG.
  • step A6 the area division information of the node 4 is read (step A4). Since the node 4 is not a leaf node of the Decision Tree (No in Step A5), the area is divided and the next processing node is selected (Step A6).
  • 1 is designated as the number of divisions for the fields X and Y, and the effective bit length of each field is 3, so that the effective bits of the search key fields X and Y are “001” and “111”.
  • Base Address By adding Base Address to “01” obtained by concatenating the leading bits for “,” the memory address value in which the area division information of the next processing node, node 8, is stored is determined. Finally, the effective bit length is decreased by 1 (step A7).
  • FIG. 13c is a diagram showing the rule list of the node 8 in a two-dimensional space and showing BVs for the fields X and Y. Note that since the effective bit length for the fields X and Y is 2 at the node 8, BVs for the lower 2 bits that are effective bits are prepared, and the area portions that are not effective bits are filled. The obtained BV is bitwise ANDed to obtain the final BV “11” in the processing node 8 (step A2).
  • the matching rules at node 8 are R17 and R18, and there is no matching rule at the previous processing nodes (node 0 and node 4), so the priority of R17 and R18 is confirmed and high priority is given.
  • the rule of degree is the optimal solution (although it is omitted in the rule set of FIG. 10, it is assumed that individual priority is set for each rule included in the rule set).
  • the area division information of the node 8 is read (step A4), and it can be seen that the node 8 is not a leaf node of the Decision Tree (No in step A5), so the area is divided and the next processing node is selected ( Step A6).
  • 1 is designated as the number of divisions for the fields X and Y, and the effective bit length of each field is 2, so that the effective bits of the search key fields X and Y are “01” and “11”.
  • Base Address By adding Base Address to “01” obtained by concatenating the leading bits for “,” the memory address value for the area division information of the node 12 that is the next processing node is determined. Finally, the effective bit length is decreased by 1 (step A7).
  • FIG. 13d is a diagram showing the rule list of the node 12 in a two-dimensional space and showing BVs for the fields X and Y. Since the effective bit length for each of the fields X and Y is 1 at the node 12, a BV for the lower 1 bit that is an effective bit is prepared, and an area portion that is not an effective bit is filled. The obtained BV bitwise AND is taken to obtain the final BV “00” in the processing node 12 (step A2).
  • step A3 the region division information of the node 12 is read (step A4), and since the node 12 is found to be a leaf node of the Decision Tree (Yes in step A5), the processing is terminated and the current optimum rule R17, Or let R18 be the final solution.
  • the rule is defined only using the two fields X and Y.
  • more fields are defined.
  • the field to be divided and the number of divisions are specified in each node of the Decision Tree.
  • FIG. 14 is a block diagram illustrating the packet classifier according to the first embodiment of this invention.
  • the packet classifier 1 according to the first exemplary embodiment of the present invention is realized as a hardware circuit.
  • a search key is input as an input 2 and a rule ID of an optimal rule is output as an output 3. Is output.
  • the packet classifier 1 includes a tree pipeline (tree pipeline processing circuit) 10 and a priority pipeline (priority pipeline processing circuit) 20.
  • Tree Pipeline 10 has a pipeline structure, and executes the process of tracing the Decision Tree when performing packet classification of the present invention.
  • Tree Pipeline 10 is an H-stage pipeline consisting of Tree Pipeline Stage (Tree Pipeline Processing Unit) 10-1, Tree Pipeline Stage 10-2, Tree Pipeline Stage 10-3, ..., Pipe Pipeline Stage 10-H. Yes.
  • H is equivalent to the height (depth) of the Division Tree, and in this embodiment, the Division Tree having a height of H or less is configured and used.
  • FIG. 15 is a diagram illustrating a mapping example of each node to the Tree Pipeline Stage in the Decision Tree according to the first embodiment of this invention.
  • a decision tree of height 4 composed of 15 nodes from node 0 to node 14 is basically the same depth (referred to as a level), as in the case of Tree Pipeline in Non-Patent Document 2.
  • a node at a certain level may be arranged in a stage after that level.
  • the node 10 has a depth of 3, but is not a Pipe Pipeline Stage # 3 but a Pipe Pipeline Stage # that is a level after that. 4 is arranged.
  • the node arrangement means the arrangement of the area division information of the node as shown in FIG.
  • FIG. 16 is a block diagram showing the configuration of the Tree Pipeline Stage in the first embodiment of the present invention.
  • each of the Pipe Pipeline Stages 10-1 to 10-H according to the present invention performs region division processing at a node that performs processing at the stage, and as a result, includes region division information of the next node.
  • the area division circuit 100 for determining the address value of the next stage, the memory controller 101 for reading the area division information of the processing node at the address value designated from the previous stage, and the stage are arranged.
  • a region division information storage block 102 formed of a storage medium such as a memory that stores region division information of a node of the Decision Tree, a valid bit update length circuit 103 that updates a valid bit length of a search key, and Search key entered on stage Provided to have a certain delay, the search key delay circuit 104 to synchronize with other outputs, the.
  • each Tree Pipeline Stage the area division that holds the search key that is the search target, its effective bit length, and the area division information of the node that is the processing target in the Tree Pipeline Stage, from the previous Pipe Pipeline Stage
  • the address value of the information storage block 102 is input.
  • the input search key is input to the area dividing circuit 100 and the search key delay circuit 104.
  • the search key is configured as a bit string including all packet header field information included in the rule targeted by this packet classifier, and information such as the bit length of each field is preliminarily stored on the circuit. It is assumed that this packet classifier can uniquely refer to or cut out the field.
  • the input effective bit length is input to the area dividing circuit 100 and the effective bit length update circuit 103.
  • the effective bit length is set for each packet header field that is set in advance in the packet header field included in the search key and is used for region division by this packet classifier indicated in the region division information. And a bit string representing the effective bit length.
  • the address value is input to the Memory Controller 101.
  • the search key described above is given as an input 2 to the packet classifier 1.
  • the effective bit length is specified as the length of each header field itself, that is, all are valid, and the address value is the address value of the area division information storage block 102 in which the area division information of the root node of the Decision Tree is stored. Are designated as input 2, or may be designated within the packet classifier 1.
  • the memory controller 101 to which the address value has been input reads the area division information as shown in FIG. 7 stored in the address value designated for the area division information storage block 102, and reads it out with the area division circuit 100 and the effective bit. Output to the long update block 103.
  • the effective bit length update block 103 updates the effective bit length from the input effective bit length and the region division information. Specifically, in the region division information, the division number k is designated for each header field used for region division by this packet classifier, but the effective bit length update block 103 is obtained from the input effective bit length, It is updated by subtracting the number of divisions k, and the updated effective bit length is output to the tree pipeline stage at the subsequent stage.
  • the search key delay circuit 104 delays the input search key by a predetermined interval using a register or the like, and an effective bit length output from the effective bit length update circuit 103 or an address output from the area dividing circuit 100 described later.
  • the search key is output at the same timing as the value.
  • FIG. 17 is a block diagram showing a configuration of the area dividing circuit 100 according to the first embodiment of the present invention.
  • the area division circuit 100 includes an area division information separation circuit 1000 that extracts the number of divisions for each header field used for area division from the input area division information, a multiplexer 1001, and a field division circuit 100-. 1, 100-2,..., 100-C, an OR gate 1002, and an adder 1003.
  • the area division information input to the area division circuit 100 is input to the area division information separation circuit 1000.
  • the area division information is composed of information as shown in FIG. 7, but the area division information separation circuit 1000 cuts out each of these pieces of information and outputs the information to a circuit that uses the information.
  • the Virtual Flag is output to the multiplexer 1001
  • the number of divisions for the C fields is output from the field division circuits 100-1 to 100-C
  • the Base Address is output to the adder 1003.
  • the search key and effective bit length input to the area dividing circuit 100 are input to the field dividing circuit that processes the field according to each field.
  • a search key in which a plurality of fields are bundled or effective bit length data itself may be input to each field division circuit, and the field data in charge within the circuit may be cut out. Data of each field may be cut out and input to each field dividing circuit.
  • the OR gate 1002 takes a logical sum (OR) of the output results of each field dividing circuit described later and inputs the result to the adder 1003.
  • the adder 1003 adds the Base Address included in the area division information and the output result of the OR gate 1002, and outputs the result as the address value of the area division information of the child node processed in the subsequent Pipe Pipeline Stage.
  • FIG. 18 is a block diagram showing the configuration of the field dividing circuit in the first embodiment of the present invention.
  • the field division circuit includes a subtracter 1004, a right shifter 1005, an adder 1006, and a left shifter 1007.
  • the effective bit length input to the field division circuit and the division number of the area division information are input to the subtractor 1004, and the division number is subtracted from the effective bit length. This result is output to the Right Shifter 1005, and the Right Shifter 1005 shifts the field of the input search key to the right by the value of the result of the subtractor 1004.
  • the value input from the lower field division circuit and the division number are added by an adder 1006, and the result is output to the Left Shifter 1007 and the upper field division circuit.
  • the value input to the adder 1006 from the lower stage is zero.
  • the adder 1006 of each field division circuit adds the number of divisions input to the addition result from the lower field division circuit, but does not use the lower result and adds up to that point. All the power division numbers may be added by the adder 1006.
  • the left shifter 1007 shifts the result of the right shifter 1005 to the left by the value of the result of the adder 1006, and outputs the result to the OR gate 1002.
  • the OR gate 1002 calculates the logical sum of the results of the field division circuits, and for the field used for the division specified by the region division information, the first k bits of the effective bits of the field are cut out and the region division is performed. It is possible to determine the relative address value of the next node according to the number of divisions of each field used for. Then, by adding the Base Address and this relative address value in the adder 1003, it is possible to specify an address value in which the area division information of the next node in the subsequent Pipe Pipeline Stage is stored.
  • FIG. 19 is a diagram illustrating an example of the Virtual Node according to the first embodiment of this invention.
  • the node 10 which is a child node of the node 4
  • the node 10 is originally arranged in the Tree Pipeline Stage next to the node 4, but here is further arranged in the Tree Pipeline Stage one stage after.
  • the node 4 calculates the address values of the subsequent nodes 7, 8, 9, and 10, but the node 4 calculates the address where the area division information of the node 7 is stored as Base Address. To do.
  • the address value calculated from the Base Address in the node 4 is the node value. It is difficult to determine 10 address values. For this reason, when arrange
  • the node V ⁇ b> 0 is arranged as the virtual node of the node 10.
  • the node V0 Since the node V0 is not a real node, it does not have a rule list. In other words, there is no need to store BV in Priority Pipeline Stage. As a result, as in Non-Patent Document 2, it is possible to increase the number of memory words in Tree Pipeline Stage and map the Decision Tree more flexibly. .
  • the node 4 can determine the address value in which the area division information of the nodes 7, 8, 9, and V0 that are the child nodes is stored by performing the above-described processing in the area division circuit 100. .
  • the node Pipe 0 in the subsequent stage of the node 4 designates the node V 0, reads the area division information, and performs the same area division processing.
  • FIG. 20 is a diagram illustrating an arrangement example of the area division information of the Virtual Node according to the first embodiment of this invention.
  • Tree Pipeline Stage Segmentation information the number of words W T of the storage block 102, and the number of words that the number of words that can be stored Bit Vector of Priority Pipeline Stage and W P (here, means the number of nodes and things. that is, the actual node in the Tree Pipeline Stage, W T node content including virtual nodes, the Priority Pipeline Stage, which shall be able to store the W P nodes worth of BV).
  • one of the W T node in the Tree Pipeline Stage, W P node is a real node, can have a rule ID list. Therefore, in the present invention, from the address value 0 for each of a plurality of child nodes of a node packed in order to be stored in the area division information storage block 102, the Tree Pipeline Stage later placed originally nodes beyond the W P node Take a policy of placing on stage.
  • nodes that have a Virtual Node as a child node are all virtual nodes, or among the child nodes, some nodes with a small node ID are real nodes, and some nodes with a large node ID are All virtual nodes are assumed to be used.
  • Non-Patent Document 2 The configuration of Tree Pipeline as described above is also disclosed in Non-Patent Document 2. However, in the configuration disclosed in Non-Patent Document 2, the effective bit is not taken into account and the result is divided into Base Address. Since the address values are not added, it is considered difficult to set an appropriate address. In addition, when a child node of a certain node is arranged with a plurality of stages open, in Non-Patent Document 2, it is grasped using a counter called Distance Value, but in this configuration, a 1-bit flag is used. This is different.
  • Priority Pipeline 20 included in the packet classifier 1 has a pipeline structure, and executes processing related to selection of a BV and selection of an optimal solution when performing packet classification of the present invention.
  • Priority Pipeline 20 is Priority Pipeline Stage 20-0, Priority Pipeline Stage 20-1, Priority Pipeline Stage 20-2, ... It is composed of
  • FIG. 21 is a diagram showing a configuration of the Priority Pipeline Stage in the first embodiment of the present invention.
  • Priority Pipeline Stage includes a field separation circuit 200, an address conversion circuit 201, and a Bit Vector (BV) selection circuit (bit array selection circuit) 200-1, 200-2,. F, an AND gate 202, a priority check circuit 203, and a rule ID list storage block 204 formed of a storage medium such as a memory.
  • BV Bit Vector
  • the field separation circuit 200 separates the search key and the effective bit length input from the Tree Pipeline Stage for each of F fields included in the search key, and inputs each to the F BV selection circuits.
  • the effective bit length is set only for the field used for area division in Tree Pipeline. Therefore, for a field for which the effective bit length is not defined, the field length of the field is set as the effective bit length. It may be input to the BV selection circuit, or may not be input as don't care and may be determined to be all valid by the BV selection circuit.
  • the address conversion circuit 201 receives an address value in which the area division information of the child node at the next stage, which is input from the Tree Pipeline Stage, is stored.
  • the address conversion circuit 201 the address value entered is, it is determined whether Priority Pipeline number of words that can hold a rule ID list in Stage (number of nodes) W larger or smaller than P, the node smaller is the actual node Therefore, in order to perform Parallel BV processing on the rule list, the Base Address in which the BV of the node is stored is output to each BV selection circuit, and is input as the address value of the rule ID list storage block 204 of the node. Output address value.
  • the rule ID list storing block 204, W for P number of only rule ID list does not hold for a node
  • the bit width of the address may be the smallest integer value greater than or equal to log 2 W P.
  • the input address value is greater than W P, because the node is Virtual Node, and outputs a signal indicating not to perform processing in the Priority Pipeline Stage.
  • the BV selection circuit selects a BV for the field and outputs it to the AND gate 202.
  • the AND gate 202 to which the BV for each field is input takes the logical product (AND) of these BVs and outputs the result to the priority check circuit 203.
  • the priority check circuit 203 reads the rule ID list at the address value specified by the address conversion circuit 201 and applies the rule ID corresponding to each bit having the value “1” of BV output from the AND gate 202. The priority including the optimal rule input from the preceding Priority Pipeline Stage is compared, and the optimal rule ID at that time is output to the Priority Pipeline Stage.
  • FIG. 22 is a block diagram showing a configuration of the BV selection circuit according to the first embodiment of the present invention.
  • the BV selection circuit according to the present embodiment includes a search circuit 2000 and a Bit Vector (BV) storage block (bit array storage block) 2001 configured from a storage medium such as a memory.
  • BV Bit Vector
  • the search circuit 2000 has a Base Address in which the BV of the node input from the address conversion circuit 201 is stored, a header field data processed by the BV selection circuit input from the field separation circuit 200, an effective bit length, , The BV corresponding to the field data is selected, read from the BV storage block 2001, and output to the AND gate 202.
  • the Parallel BV method disclosed in Non-Patent Document 3 is used, and the BV storage block 2001 stores the start position or the end position of the section having BV from BaseAddress and the section of the section.
  • the BV is stored, and the search circuit 2000 reads out these data and reads out an appropriate BV by performing a binary search, for example, while referring to the input header field data and effective bit length. Note that a method for realizing the binary search is well known to those skilled in the art, and thus detailed description thereof is omitted here.
  • the processing as described above is performed, and since the output from the Priority Pipeline Stage 20-H is the optimal solution, the output is output by the output 3.
  • FIG. 9 a flowchart showing the basic packet classification method in the present invention in FIG. 9, and FIGS. 14, 16, 17, 18, 21, 21 and 22.
  • the operation of the present embodiment will be described with reference to the configuration diagram of the present embodiment.
  • the basic packet classification method in the present invention and the operation outline of each component in the present embodiment are as described above, and here, in this embodiment for the basic packet classification method, The explanation will focus on the characteristic operation.
  • Step A1 When the header field data of the packet to be searched is input to the packet classifier 1 in the present embodiment, the root node of the Division Tree is set as a processing node (Step A1), and the Parallel Pipeline Stage 20-0 is used for Parallel BV processing. Perform (Step A2).
  • FIG. 23 is a flowchart showing the operation (step A2) at the time of area division according to the first embodiment of the present invention.
  • the address conversion circuit 201 converts the input address value into an address value in which the rule ID list and BV information of the processing node are stored (step B1).
  • the field separation circuit 200 cuts out valid bits of each field from the input search key and valid bit length (step B2).
  • the search circuit 2000 assigns an appropriate BV to the BV storage block 2001. (Step B3).
  • the BV selected from each BV selection circuit takes a logical product for each bit by the AND gate 201 to obtain a final BV in the node (step B4), and the process of step A2 is completed.
  • the priority check circuit 203 reads the rule ID list at the node from the rule ID list storage block 204 based on the address value specified by the address conversion circuit 201, and the optimum rule up to the priority Pipeline Stage in the previous stage. Select the optimal rule including. Note that the rule ID list also holds the priority of the rule (step A3).
  • step A4 the area division information in the root node is read out in the Tree Pipeline Stage 10-1 (step A4). If it is determined from the Leaf Node of the read area division information that the node is not a leaf node (No in Step A5), the area division processing is executed in the area division circuit 100 using the read area division information (Step A6). .
  • FIG. 24 is a flowchart showing an operation (step A6) at the time of area division according to the first embodiment of the present invention.
  • the area division processing is executed by the field division circuits 100-1 to 100-C in the area division circuit 100.
  • the input data to each field dividing circuit is as described above.
  • step C1 the number of divisions so far input to the adder 1006 in the field division circuit 100-1 is set to 0 (step C1). Subsequently, the subtracter 1004 subtracts the number of divisions of the field from the input effective bit length (step C2). Further, in the right shifter 1005, the input field data is shifted to the right by the value obtained in step C2 (step C3). On the other hand, the number of divisions so far and the number of divisions of the field are added in the adder 1006 (step C4), and the field data obtained in step C3 in the left shifter 1007 is shifted to the left by the result value (step C5).
  • Step C6 the result of addition by the adder 1006.
  • step C5 when the processing up to step C5 is completed, all processing for the region division field included in the region division information is completed (No in step C6).
  • step C7 The logical sum of the results obtained by the field dividing circuit (the output of Left Shifter 1007) is calculated (step C7).
  • Step C8 the result of Step C7 and Base Address are added (Step C8), and the process of Step A6 is terminated.
  • the effective bit length update circuit 103 updates the effective bit length of each input field to be divided based on the number of divisions specified by the region division information (step A7), and returns to step A2.
  • the Leaf Flag in the read area division information is '1' before reaching the Pipe Pipeline Stage 10-H, that is, if the processing node is a leaf node, as described above, the leaf in the subsequent Priority Pipeline Stage Only the Parallel BV process for the node rule list is executed, and the subsequent Priority Pipeline Stage and Tree Pipeline Stage processes are not executed, or even if executed, the optimal solution obtained so far is not changed. Processing shall be performed. As a result of processing the leaf node, the optimal rule obtained so far can be made the final solution (step A5).
  • each Pipe Pipeline Stage it is determined whether the processing node is a real node or a Virtual Node by adding a Virtual Flag to the area division information. Since the virtual flag is not held in the division information and the address conversion circuit 201 in the Priority Pipeline Stage is provided in the subsequent stage of the adder 1003 of the Tree Pipeline Stage, the calculated address value and the number of words of the Priority Pipeline Stage in the subsequent stage be to compare the number) W P, determines the Virtual Node, be to output the information to the subsequent stage of the Tree Pipeline Stage, to realize the same processing Bets are possible.
  • each Priority Pipeline Stage is based on the Parallel BV process disclosed in Non-Patent Document 3, but this is applied to the Parallel BV process disclosed in Non-Patent Document 4. It may be used for the base.
  • the detailed Parallel BV process in this case is omitted because it is disclosed in Non-Patent Document 4, but the Parallel BV process in Step A2 is a process as shown in FIG.
  • both Non-Patent Document 3 and Non-Patent Document 4 use the rule ID list to associate each bit position of the BV with the rule.
  • FIG. 25 is a flowchart showing an operation (step A2) at the time of area division according to the first embodiment of the present invention when the Parallel BV processing disclosed in Non-Patent Document 4 is used as a base.
  • the Priority Pipeline Stage 20-0 performs the processing of Step B1 and Step B2.
  • Steps B1 and B2 are the same as the operations in the flowchart shown in FIG.
  • the BV selection circuits 200-1 to 200-F use the address value from the address conversion circuit 201 and the effective bit from the field separation circuit 200.
  • one BV is read from the BV storage block 2001 by the sub-field unit of each field by the search circuit 2000 (step B5).
  • the AND gate 201 performs a logical product for each bit of the plurality of BVs read from each BV selection circuit to obtain a final BV at the node (step B6), and the process of step A2 is completed.
  • the BV selection circuit may not be separated for each field, and a plurality of BVs may be read by one BV selection circuit.
  • FIG. 26 is a diagram illustrating an example of mapping a plurality of Decision Tree nodes to a Tree Pipeline Stage according to the first embodiment of this invention.
  • the child nodes of node 0 in FIG. 26, node 1 and node 14
  • the root nodes of the decision tree are arranged in the Tree Pipeline Stage 10-1.
  • N subtrees having N child nodes of node 0 as root nodes are arranged on one Tree Pipeline.
  • a processing block corresponding to the area division processing in the node 0 which is the root node is required, and immediately after the input 2 of the packet classifier 1 shown in FIG. 14 is input, it corresponds to the Index Table.
  • a processing block is arranged, and a search key, an effective bit length, an address value, and the like serving as an input to the Tree Pipeline Stage 10-1 and the Priority Pipeline Stage 20-0 are determined based on the output.
  • the configuration of the packet classifier described above may be used, or may be determined with reference to the first few bits of the search key, and can be easily configured for the parties. Is omitted.
  • the amount of data read from the memory in the processing per packet can be reduced, and the header field length constituting one rule can be reduced. Even if the sum increases or the number of rules increases, it is possible to provide a packet classifier that suppresses an increase in the dynamic power of the memory and consequently does not increase the power consumption of the entire hardware.
  • the comparison of the amount of data read from the memory in the processing per packet of the packet classifier according to the present invention is performed as follows.
  • R be the total number of rules supported by this packet classifier
  • L be the number of rules that can be included in the rule list of each node.
  • the number of rules L that can be included in the rule list may be changed for each node, but here, the same value is used for all nodes.
  • the rules are stored in a storage area for each rule list so that it is efficient to read the rule list continuously. That is, since the rule that crosses the region is duplicated there, the sum of R and L for all nodes is not necessarily equal.
  • the amount of data D E [bits] read per node is equal to the number of rules L included in the rule list and the bit length of the rule 2W [bits]. ] Product.
  • the search circuit 2000 starts the section start value for each field from the BV storage block 2001.
  • W i + L [bits] data composed of the end value and the BV for the L rules included in the rule list.
  • [x] means the smallest integer greater than or equal to x.
  • the number of sections in Parallel BV when there are L rules is 2L + 1 at most from Non-Patent Document 2.
  • the amount of data read out per field is (W i + L) ⁇ ⁇ [log 2 (2L + 1)] + 1 ⁇ , and this is performed for F fields.
  • one rule ID list is read.
  • the rule ID can be expressed as [log 2 R] [bits]
  • the rule ID list includes L rule IDs.
  • the data amount D P [bits] to be read out per rule list can be obtained from Equation 1 by the following equation.
  • the search circuit 2000 uses L [bits] BV data in units of a plurality of bits. Is read.
  • W / 2 BVs are read for the bit length W [bits] of the rule.
  • D P [bits] read per rule list is obtained by the following equation.
  • the amount of data read from the memory per packet processing can be reduced by using the packet classifier of the present invention.
  • the dynamic power of the memory can be reduced, and the overall power consumption can be reduced.
  • the packet classifier according to the second exemplary embodiment of the present invention can be used without reconfiguring the packet classifier itself even when a field other than a predetermined field is used as a header field constituting the rule. This is different from the packet classifier in the first embodiment.
  • the bit length W [bits] of the entire rule, the number of header fields F constituting the rule, and the value of the number of header fields C used for area division at each node are determined in advance, and within the range permitted by the conditions. It can be set freely.
  • the overall configuration of the packet classifier in the second embodiment of the present invention is the same as that of FIG. 14 which is the packet classifier in the first embodiment, but the Tree Pipeline in the second embodiment of the present invention.
  • the configuration of the Stage is different from the configuration of the Tree Pipeline Stage in the first embodiment.
  • FIG. 27 is a block diagram showing the configuration of the Tree Pipeline Stage according to the second embodiment of the present invention.
  • the Tree Pipeline Stage in the second embodiment of the present invention is the same as the area dividing circuit 100 and the effective bit length update circuit 103 of the Tree Pipeline Stage in the first embodiment of the present invention shown in FIG.
  • the area dividing circuit 105 and the effective bit length updating circuit 107 are replaced with each other, and a field extracting circuit 106 is newly added.
  • the other configurations are the same as the Tree Pipeline Stage in the first embodiment, and thus detailed description thereof is omitted.
  • FIG. 28 is a diagram showing area division information in each node of the Decision Tree in the second exemplary embodiment of the present invention.
  • a header field that constitutes a rule defined in a range that meets the above-described conditions is uniquely identified using a field ID.
  • Use region division information is the same as the region division information in the basic packet classification method of the present invention shown in FIG. 7 except that C sets of field IDs and the number of divisions are provided.
  • the field ID is defined in advance for the header field that constitutes the rule.
  • the region division information read by the memory controller 101 from the region division information storage block 102, the search key, and the effective bit length thereof are input.
  • the field extraction circuit 106 refers to the field ID included in the region division information, and extracts header field data used for region division in the processing node from the search key and the effective bit length.
  • the extracted search key, each field data of the effective bit length, and the area division information are output to the area dividing circuit 105 in a state of being separated for each information, and each field data of the extracted effective bit length and the division of the field are output.
  • the number is output to the effective bit length update circuit 107.
  • the effective bit length update circuit 107 updates each effective bit length by subtracting the number of divisions from the effective bit length of the header field used for the input region division.
  • FIG. 29 is a block diagram showing a configuration of the area dividing circuit 105 according to the second embodiment of the present invention.
  • the area dividing circuit 105 according to the second embodiment of the present invention excludes the area dividing information separating circuit 1000 from the area dividing circuit 100 according to the first embodiment of the present invention shown in FIG. Since other configurations are the same as those of the region dividing circuit 100 according to the first embodiment of the present invention, detailed description thereof is omitted.
  • each information data of the region division information is input to the region division circuit 105 in a separated state in the field extraction circuit 106, so that the region division information separation circuit 1000 that has performed the same function is excluded. Yes.
  • step A6 Operation of the Second Embodiment
  • the operation in the present embodiment is basically the same as the flowchart showing the operation of the basic packet classification method shown in FIG. 9, and only the operation at the time of area division in step A6 is different. Only the operation of step A6 shown in FIG. 9 will be described, and detailed description of the other will be omitted.
  • the field extraction circuit 106 receives area division information from the Memory Controller 101, and a search key and effective bit length from the previous Pipe Pipeline Stage.
  • the field extraction circuit 106 refers to the C field IDs included in the region division information, extracts the corresponding field data from the number of divisions of the corresponding field, the search key, and the effective bit length, and sends it to the region division circuit 105.
  • Output step C9.
  • the area dividing circuit 105 that has received the above data executes the processing from step C1 to step C8 and obtains the result, similar to the operation during area division in the first embodiment of the present invention shown in FIG.
  • the address value is output as the address value of the memory storing the area division information of the next node (step C10). Note that the processing from step C1 to step C8 is the same as the operation in the first embodiment of the present invention, and thus detailed description thereof is omitted.
  • each Pipe Pipeline Stage determines whether the processing node is a real node or a Virtual Node by providing the area division information with a Virtual Flag.
  • the virtual flag is not held in the region division information, and the post-pipeline stage adder 1003 is provided with the address conversion circuit 201 in the priority pipeline stage in the subsequent stage, so that the calculated address value and the priority of the subsequent stage are provided.
  • each Priority Pipeline Stage is based on the Parallel BV processing disclosed in Non-Patent Document 3, but this is disclosed in Non-Patent Document 4. It may be used on the basis of the current Parallel BV processing.
  • the description has been given using the example where the root node of the Decision Tree is arranged in the Tree Pipeline Stage 10-1, but this is the root of a plurality of subtrees of the Decision Tree. It is obvious that the node may be arranged from the Tree Pipeline Stage 10-1 and can be configured without any change in the configuration of the present embodiment.
  • the amount of data read from the memory can be reduced in processing per packet by combining the Discription Tree and the Parallel Bit Vector, and one rule is configured.
  • the comparison between the Division Tree-based method at this time and the amount of data read from the memory in the processing per packet of the packet classifier in the present invention is the same as in the first embodiment, and is therefore omitted.
  • the number of rules that may be matched by the Decision Tree can be narrowed down even if the number of rules is large. Therefore, it is possible to provide a packet classifier that can reduce the BV bit length and can suppress an increase in the number of clock cycles required to read data from the memory.
  • packet header information used as a rule is within the range allowed by the bit length W of the rule, the number of fields F, and the number of fields C that can be used for area division. It is possible to provide a packet classifier that can be freely changed without changing the hardware circuit.
  • the search key is divided into a plurality of header fields, etc., and a plurality of Decision Trees corresponding to the respective search keys (referred to as sub-search keys) are used.
  • the packet classification is different from the first and second embodiments.
  • FIG. 31 is a diagram showing a configuration of a packet classifier according to the third embodiment of the present invention.
  • the packet classifier 4 in the third exemplary embodiment of the present invention includes P decision tree processing circuits (decision tree processing circuits) 30-1, 30-2,..., 30-P. And an optimal solution selection circuit 40 and a search key separation circuit 50.
  • a search key is input as in the first and second embodiments.
  • the most appropriate rule ID is output as a result among the matched rules, as in the first and second embodiments.
  • the search key separating circuit 50 separates the input search key into P sub-search keys, and each sub-search key is a Decision Tree processing circuit that constitutes a Decision Tree corresponding to each sub-search key. Output to.
  • FIG. 32 is a diagram illustrating a configuration of a Decision Tree processing circuit according to the third embodiment of the present invention.
  • the decision tree processing circuit in the present embodiment has a configuration in which the priority pipeline 20 of the packet classifier 1 in the first and second embodiments is replaced with a solution candidate selection circuit 21, and an optimum solution selection from the solution candidate selection circuit 21 is performed.
  • a rule ID list as a solution candidate is output to the circuit 40. Since other configurations are the same as those of the packet classifier 1 in the first and second embodiments, detailed description thereof is omitted.
  • the solution candidate selection circuit 21 includes H + 1 bit vector (BV) processing circuits 21-0, 21-1, 21-2, ..., 21- (H-1), 21-H.
  • FIG. 33 is a block diagram showing a configuration of the BV processing circuit in the present embodiment.
  • the BV processing circuit according to the present embodiment includes a priority check circuit 203 as a solution candidate rule in the configuration of the priority pipeline stage in the first and second embodiments of the present invention shown in FIG.
  • the ID list generation circuit 205 there is no input of the rule ID from the preceding Priority Pipeline Stage, and no output of the rule ID for the Priority Pipeline Stage in the subsequent stage, and instead the solution candidate rule ID list generation circuit 205 becomes a solution candidate.
  • This is a configuration for outputting the rule ID list to the optimum solution selection circuit 40, and the other configuration is the same as the configuration of the Priority Pipeline Stage in the first and second embodiments of the present invention shown in FIG. Do description thereof is omitted.
  • the solution candidate rule ID list generation circuit 205 receives the final BV in the present BV processing circuit input from the OR gate 202, and the rule ID from the rule ID list storage block 204 according to the address value input from the Tree Pipeline Stage. Read the list. Subsequently, if the value of each bit position of the BV received from the OR gate 202 is 1, the rule ID of the corresponding rule ID list is left as it is, and if it is 0, it does not conform to the rule. Therefore, all the bits of the rule ID are set to 1. When all the bits of the rule ID are 1, the rule ID is don't care, which means that there is no matching rule in the rule ID area.
  • the rule ID list generated as described above is output to the optimum solution selection circuit 40.
  • the optimal solution selection circuit 40 receives a total of P ⁇ (H + 1) rule ID lists from the H + 1 BV processing circuits included in the P decision tree circuits. Among these, the rule ID lists input from the H + 1 BV processing circuits included in the same Decision Tree are combined into a solution candidate rule ID list for the sub search key.
  • FIG. 34 is a diagram illustrating a configuration example of a rule ID list according to the third embodiment of the present invention.
  • the optimum solution selection circuit 40 compares the P candidate solution rule ID lists, confirms the rule IDs included in all the P solution candidate rule ID lists, and sets the solution with the highest priority as the optimum solution.
  • the rule ID is output as output 3. Note that the confirmation processing of the rule IDs included in all the P solution candidate rule ID lists is merely a comparison processing and can be easily realized by the parties, and thus detailed description thereof is omitted.
  • the decision tree is set for each field or bit length divided into P pieces, for example, by dividing the bit length of the rule into a plurality of fields or a fixed number of fields constituting the rule.
  • the P decision trees configured in this way are each constituted by P decision tree processing circuits. More specifically, the Decision Tree is configured on the Tree Pipeline 10 in the Decision Tree processing circuit, and the Parallel BV processing in the first and second embodiments is executed in the BV processing circuit of the solution candidate selection circuit 21.
  • the solution processed by each Decision Tree processing circuit is only a solution that matches the divided field or bit length, and it is unclear whether the rule, that is, the entire search key is applicable. .
  • the optimum solution selection circuit 40 performs confirmation again based on the rule ID that is a solution candidate in each Decision Tree processing circuit, and selects the optimum solution.
  • the search key input as input 2 is separated into sub-search keys corresponding to P Decision Trees by the search key separation circuit 50, and each sub-search is performed.
  • the key is output to each Decision Tree processing circuit (step A8).
  • a rule that is, a single or a plurality of fields constituting a search key, or a rule bit length is fixedly divided into a plurality of P pieces.
  • a Decision Tree is configured for each field and bit length.
  • the sub search key indicates each field or bit group divided into P pieces.
  • each Decision Tree processing circuit performs the processing of Steps A1 to A7 shown in FIG. 9 in the same manner as the operations in the first and second embodiments (Step A9).
  • the Decision Tree in the first and second embodiments is the Decision Tree for the entire search key
  • the Decision Tree in the present embodiment is the Tree for the sub search key.
  • FIG. 36 shows a flowchart showing the operation during the Parallel BV processing in the present embodiment in step A2.
  • the Parallel BV process shown in FIG. 36 is performed in each BV processing circuit of the solution candidate selection circuit 21. Referring to FIG. 36, this process is basically the same as the Parallel BV process in the first and second embodiments shown in FIG.
  • each BV processing circuit an address value, a search key (in this case, a sub search key), and its effective bit length are input from each Tree Pipeline Stage, and the processing from Step B1 to Step B4 is executed (Step B7). ). Since the process of this step B7 is the same as that of 1st, 2nd embodiment, detailed description is abbreviate
  • the solution candidate rule ID list generation circuit 205 in each BV processing circuit reads the rule ID list from the rule ID list storage block 204 in accordance with the address value input from the Tree Pipeline Stage. A rule ID list to be output to the optimum solution selection circuit 40 is generated while checking the value of each bit position of the BV input from the OR gate 202 with respect to the read rule ID list.
  • step B8 For each bit of BV input from the OR gate 202, if the value is 1, it means that the rule corresponding to the bit position is a solution candidate, so that the rule in the rule ID list The ID is left as it is, and if the value of each bit is 0, it indicates that the rule does not conform, and therefore all the bits of the rule ID are set to 1 (step B8). When all the bits of the rule ID are 1, the rule ID is don't care, meaning that there is no matching rule in the rule ID area.
  • the rule ID list generated as described above is output to the optimum solution selection circuit 40.
  • a rule ID list of matching rules for each sub search key is input from H + 1 BV processing circuits included in the P decision tree processing circuits.
  • rule ID lists from BV processing circuits included in the same Decision Tree processing circuit are combined to generate a solution candidate rule ID list (step A10).
  • the optimal solution selection circuit 40 confirms the rule IDs included in all P solution candidate rule ID lists, and sets the rule with the highest priority among these rules as the optimal solution. (Step A11).
  • the present embodiment can be implemented using the second embodiment as a base.
  • each Pipe Pipeline Stage it is determined whether the processing node is a real node or a Virtual Node by giving a virtual flag to the area division information.
  • the virtual flag is not held in the area division information, and the address conversion circuit 201 in the Priority Pipeline Stage is provided in the subsequent stage of the adder 1003 of the Tree Pipeline Stage, so that the calculated address value and the Priority Pipeline Stage in the subsequent stage are included. be to compare the number of words (number of nodes) W P, it determines the Virtual node, be to output the information to the subsequent stage of the Tree Pipeline Stage, real similar processing It is possible to.
  • each Priority Pipeline Stage is based on the Parallel BV processing disclosed in Non-Patent Document 3, but this is not the case.
  • the Parallel BV process disclosed in 4 may be used as a base.
  • the amount of data read from the memory in the processing per packet can be reduced by combining the Dition Tree and the Parallel BV.
  • Providing a packet classifier that suppresses the increase in dynamic power of the memory and consequently does not increase the power consumption of the entire hardware even if the total header field length is large or the number of rules is large can do.
  • the comparison of the amount of data read from the memory in the processing based on the Division Tree and the packet classifier in the present invention in this case is the same as in the first and second embodiments and the sub search key. The difference is only whether or not the Parallel BV processing is performed, and the description is omitted because it is essentially the same.
  • the number of rules that can be matched by the Distribution Tree is narrowed down even if the number of rules is large. Therefore, it is possible to provide a packet classifier that can reduce the bit length of the BV and can suppress an increase in the number of clock cycles required to read data from the memory.
  • packet header information used as a rule is within a range permitted by the bit length W of the rule, the number of fields F, and the number of fields C that can be used for area division. It is possible to provide a packet classifier that can be freely changed without changing the hardware circuit.
  • FIG. 37 shows a configuration example of a packet classifier according to the fourth embodiment of the present invention.
  • the packet classifier includes a program processing device 5, a network interface device 6, and a packet classification program 7.
  • the program processing device 5 is realized by a CPU of a host such as a server or a PC.
  • the network interface device 6 is, for example, a server expansion card or a NIC (Network Interface Card) mounted on board.
  • the program processing device 7 is realized by a CPU of a host such as a server or a PC.
  • the search key used in the packet classification of the present invention is extracted from the packet input from the network to the network interface device 6 and input to the program processing device 5.
  • the packet classification program 7 is a computer program executed by the program processing device 5 and controls the operation of the program processing device 5.
  • the program processing device 5 includes the packet classifier 1 in the first and second embodiments of the present invention, more specifically, the Tree Pipeline 10 and the Priority Pipeline 20, and the program processing device 5 includes the packet classification program 7. It is realized by executing. Note that the functions of Tree Pipeline 10 and Priority Pipeline 20 are the same as those in the first and second embodiments of the present invention.
  • the packet classifier 1 described above is realized by a hardware circuit, but the same processing is executed by software.
  • the program processing device 5 is constituted by a multi-core processor having a plurality of CPU cores (and a many-core processor having more CPU cores), and each CPU core is provided in the Tree Pipeline 10 and the Priority Pipeline 20 respectively. By executing the Pipeline Stage process, higher speed processing is possible.
  • packet classification program 7 may be recorded on a computer-readable recording medium, and the program processing device 5 may cause the packet classifier 1 in the third embodiment of the present invention to execute processing. .
  • the present invention identifies a flow to which a packet belongs by a combination of specific fields from packet header information and performs a specific process for each flow such as QoS processing or load distribution, and a network device such as a switch and a router, and a load balancer It can be applied to uses such as appliance devices.

Abstract

Disclosed is a packet classifier wherein, from a rule set consisting of a plurality of rules defined by using a plurality of fields, a rule compatible with a search key which is a search target is searched in the packet classifier. In the packet classifier; Decision Tree is used to refine a large number of rules to a predetermined number of rules which may be compatibile; among search keys, Bit Vectors having lengths equal to the number of rules refined by Decision Tree for each predetermined data are used; and using a rule identifier list provided with a list of rule identifiers indicating bit positions of these Bit Vectors, rules having compatibility are specified from the refined rules, and a compatible rule is determined as a final result corresponding to the priorities of the specified rules.

Description

パケット分類器、パケット分類方法、パケット分類プログラムPacket classifier, packet classification method, packet classification program
 本発明は、パケット分類器に関し、特に、複数のパケットヘッダフィールドを検索キーとするパケット分類器に関する。 The present invention relates to a packet classifier, and more particularly to a packet classifier using a plurality of packet header fields as search keys.
 パケット分類(Packet Classification)は、ネットワーク上のルータやスイッチにおいて、パケットを、フローと呼ぶ一連のパケット列に分類するための重要な技術であり、個々のフローに対するQoS(Quality of Service)の提供にとって、また、ファイヤウォール(Firewall)、ネットワーク侵入検知システム(NIDS:Network Intrusion Detection System)、ネットワーク侵入防止システム(NIPS:Network Intrusion Prevention System)等のセキュリティ等、付加的な価値をもつネットワークアプリケーションの実現にとって、必要不可欠な技術である。 Packet classification (Packet Classification) is an important technology for classifying packets into a series of packet sequences called flows in routers and switches on the network, and for providing QoS (Quality of Service) for individual flows. In addition, for the realization of network applications with additional value such as firewall (Firewall), network intrusion detection system (NIDS: Network Intrusion Detection System), network intrusion prevention system (NIPS: Network Intrusion Prevention System), etc. Is an indispensable technology.
 パケット分類では、例えば、パケットのIP(Internet Protocol)ヘッダに定義されている送信元IPアドレス、宛先IPアドレス、プロトコル番号に加え、TCP(Transmission Control Protcol)/UDP(User Datagram Protcol)ヘッダに定義されている送信ポート番号、宛先ポート番号といった複数のパケットヘッダフィールドを検索キーとする。この検索キーによって特定される一連のパケット列をフローと呼ぶ。なお、上記の5つのパケットヘッダフィールドは一般的に5-tupleと呼ばれている。この検索キーは、予めルール(フィルタと呼ばれることもある)として定義されており、特に、このような複数のパケットヘッダフィールドを用いたパケット分類はMulti-Field Packet Classificationと呼ばれる。さらに、ルールにおけるマッチング手法として、パケットヘッダフィールドをある特定の値として定義するExact Match、パケットヘッダフィールドの上位の複数ビットは特定するが下位の数ビットはワイルドカード(wildcard)‘*’を用いて不定として定義するPrefix Match、2つのある特定の値の範囲としてパケットヘッダフィールドを定義するRange Match、パケットヘッダフィールドを個々のビット単位でワイルドカードを指定して定義するWildcard Matchといった手法が用いられる。例えば、8bitsのパケットヘッダフィールドを考えた場合、パケットヘッダフィールドを“00110101”のように特定値として指定するものがExact Match、パケットヘッダフィールドを、“0011****”のように、“0011”の4bitsから始まる値として指定するものがPrefix Match、[3-64]のようにパケットヘッダフィールドが10進数で考えた際に3から64の範囲に入っていればよいとするものがRange Match、“0**10*01”のようにパケットヘッダフィールドのビット単位でワイルドカードが使用できるものがWildcard Matchとなる。 In packet classification, for example, it is defined in TCP (Transmission Control Protocol) / UDP (User Datagram Protocol) header in addition to the source IP address, destination IP address, and protocol number defined in the IP (Internet Protocol) header of the packet. A plurality of packet header fields such as a transmission port number and a destination port number are used as search keys. A series of packet sequences specified by this search key is called a flow. The above five packet header fields are generally called 5-tuple. This search key is defined in advance as a rule (sometimes referred to as a filter), and in particular, such packet classification using a plurality of packet header fields is referred to as Multi-Field Packet Classification. Further, as a matching method in the rule, Exact Match that defines the packet header field as a specific value, a plurality of upper bits in the packet header field are specified, but a lower number of bits is used by using a wild card (*). Prefix Match defined as undefined, Range Match defining a packet header field as a range of two specific values, and Wildcard Match defining a packet header field by specifying a wild card in units of individual bits are used. For example, when an 8-bit packet header field is considered, the packet header field is designated as a specific value such as “00110101”, and the match header is designated as “0011 ***”, and the packet header field is designated as “0011 ***”. "Specified as a value starting from 4 bits" is Prefix Match, and when the packet header field is considered as a decimal number, such as [3-64], it is only required to be in the range of 3 to 64. A wildcard match is a wildcard that can be used in bit units of the packet header field, such as “0 ** 10 * 01”.
 このようなMulti-Field Packet Classification技術においては、ルールセットの大容量化とリンク速度の向上により、ルータやスイッチをいかに高速に処理させるかが1つの技術的な課題となっており、現状、その高速処理を実現するために、Ternary Content Addressable Memory(TCAM)が用いられることが多い。 In such a Multi-Field Packet Classification technology, one of the technical issues is how to process routers and switches at high speed by increasing the capacity of the rule set and improving the link speed. In order to realize high-speed processing, a ternary content addressable memory (TCAM) is often used.
 しかしながら、TCAMはコストが高く、消費電力量や回路規模も大きいといった課題が存在する。また、Range Matchを用いた場合には、そのルールをPrefix Matchを用いたルールに分割する必要があるため、ルール数が増加してしまうといった課題もある。 However, TCAM has problems such as high cost, large power consumption and circuit scale. In addition, when Range Match is used, there is a problem that the number of rules increases because it is necessary to divide the rule into rules using Prefix Match.
 一方、TCAMの高コスト、高消費電力の問題を回避すべく、より低コスト、より低消費電力なStatic Random Access Memory(SRAM)やDynamic Random Access Memory(DRAM)を用いた様々なMulti-Field Packet Classification手法が提案されている。 On the other hand, various multi-field packets using static random access memory (SRAM) and dynamic random access memory (DRAM) with lower cost and lower power consumption to avoid the problem of high cost and high power consumption of TCAM. A classification method has been proposed.
 例えば、非特許文献1では、HyperCutsと呼ばれる、Decision Tree(決定木)を用いた手法が提案されている。このようなDecision Treeをベースにした手法について図1、図2、図3を用いて簡単に説明する。 For example, Non-Patent Document 1 proposes a technique using a Decision Tree (decision tree) called HyperCuts. A method based on such a decision tree will be briefly described with reference to FIGS. 1, 2, and 3.
 図1は、それぞれ4bitsから構成される2つのフィールドX、Yを用いて定義されたR0からR11までの12個のルールからなるルールセットの例を示す図である。フィールドX、Yは、ここではそれぞれ4bitsとしているが、例えば送信元IPアドレスや送信元ポート番号等、実際のパケットヘッダフィールドに相当するものとする。なお、フィールドXは、2進数で表記しており、‘*’はその値が0でも1でも良いワイルドカードを示している。また、フィールドYは、Range Matchで表記してあり、“[a:b]”のaはその下限値(10進数表記)、bはその上限値(10進数表記)で示している。また、一般的に、各ルールに対しては、優先度(Priority)とそのルールに該当した場合のパケットの扱い方(Action)が付与されているが、ここではそれらは省略している。 FIG. 1 is a diagram illustrating an example of a rule set including 12 rules R0 to R11 defined using two fields X and Y each having 4 bits. The fields X and Y are 4 bits each here, but correspond to actual packet header fields such as a source IP address and a source port number. The field X is expressed in binary, and “*” represents a wild card whose value may be 0 or 1. In addition, the field Y is represented by Range Match, where “[a: b]” a is a lower limit value (decimal notation) and b is an upper limit value (decimal notation). In general, each rule is given a priority (Priority) and a method of handling a packet (Action) in the case of corresponding to the rule, but they are omitted here.
 このようなルールセットに対して、フィールドX、Yの2次元から成る空間上にそれぞれのルールを図示したものが図2である。図2は、図1のルールセットを2次元空間(フィールドXとYで表された空間)上で示した図である。なお、X軸、Y軸上の数はそれぞれ10進数で表記してある。 FIG. 2 shows the respective rules in a two-dimensional space of fields X and Y for such a rule set. FIG. 2 is a diagram showing the rule set of FIG. 1 on a two-dimensional space (space represented by fields X and Y). Note that the numbers on the X-axis and the Y-axis are expressed in decimal numbers.
 HyperCutsをはじめとする、Decision Treeをベースにした手法では、図2に示すような空間をある複数の次元に着目して分割し、分割された領域内に存在するルール数がある閾値以下になるまで、領域分割を行うことでDecision Treeを構築する。ここで、分割された領域で管理されるルール群をルールリストと呼ぶ。図3は、図1のルールセットに対して構築した基本的なDecision Treeの一例を示した図である。なお、図3に示すDecision Treeでは、分割領域内のルール数である閾値を2としている。図3では、まず、XとYの両方を2分割することで、4つの領域に分割している。この結果、全空間(X、Y)=([0:15]、[0:15])が、領域0([0:7]、[0:7])、領域1([0:7]、[8:15])、領域2([8:15]、[0:7])、領域3([8:15]、[8:15])の4つの領域に分割される。このとき、それぞれの領域で管理されるルールリストは、[R5、R6、R7、R9](領域0)、[R0、R3、R5、R6、R11](領域1)、[R1、R2、R4、R10](領域2)、[R3、R4、R8](領域3)となる。各領域には、まだ閾値である2よりも多いルールが管理されているため、それぞれの領域について、閾値以下のルール数になるまでさらに領域分割を行っていき、この例では、最終的に15の領域に分割されている。なお、図3はあくまで一例であり、Decision Treeを構築するアルゴリズムについては、非特許文献1に記載されているため、ここでは省略する。 In the method based on Decision Tree such as HyperCuts, the space as shown in FIG. 2 is divided by paying attention to a plurality of dimensions, and the number of rules existing in the divided area is below a certain threshold. Until then, the decision tree is constructed by dividing the area. Here, a rule group managed in the divided area is referred to as a rule list. FIG. 3 is a diagram showing an example of a basic Decision Tree constructed for the rule set of FIG. In the decision tree shown in FIG. 3, the threshold that is the number of rules in the divided area is set to 2. In FIG. 3, first, both X and Y are divided into two areas, which are divided into four areas. As a result, the entire space (X, Y) = ([0:15], [0:15]) is the region 0 ([0: 7], [0: 7]), region 1 ([0: 7] , [8:15]), region 2 ([8:15], [0: 7]), and region 3 ([8:15], [8:15]). At this time, the rule list managed in each area is [R5, R6, R7, R9] (area 0), [R0, R3, R5, R6, R11] (area 1), [R1, R2, R4]. , R10] (region 2), [R3, R4, R8] (region 3). Since more rules than the threshold value 2 are still managed in each region, further region division is performed until the number of rules is equal to or less than the threshold value for each region. It is divided into areas. Note that FIG. 3 is merely an example, and the algorithm for constructing the Decision Tree is described in Non-Patent Document 1, and is omitted here.
 一方、パケット分類を行う場合には、Decision Treeを辿っていき、辿り着いたノードで管理されている閾値数以下のルールを全て検索する。例えば、X=0111、Y=1001をもつパケットに対してパケット分類を行う場合、Decision Treeの根ノードからノードを辿っていくことになる。図3に示すDecision Treeでは、根ノードにおいて上記の4つの領域に分割しており、当該パケットは、上記4つの領域のうち、領域1([0:7]、[8:15])に属することが分かる。続いて、領域1のノードを見ると、さらにX方向に2分割、Y方向に2分割し、領域10([0:3]、[8:11])と領域11([0:3]、[12:15])と領域12([4:7]、[8:11])と領域13([4:7]、[12:15])の4分割している。当該パケットはこのうち、領域12に属していることが分かるため、さらに続くノードを辿る。次のノードでは、Y方向に領域120([4:7]、[8:9])と領域121([4:7]、[10:11])とに2分割しており、当該パケットは、領域120に属することが分かるため、領域120で管理されているR3とR6に対して検索を行い、一致するルールに属すると判断される。なお、この場合、当該パケットはR3とR6の両方に一致するため、図1では省略している各ルールに付与された優先度に応じて、一致するルールが選択される。 On the other hand, when packet classification is performed, the Decision Tree is traced, and all the rules equal to or less than the threshold number managed by the reached node are searched. For example, when packet classification is performed on a packet having X = 0111 and Y = 1001, the node is traced from the root node of the Decision Tree. In the decision tree shown in FIG. 3, the root node is divided into the above four areas, and the packet belongs to area 1 ([0: 7], [8:15]) among the above four areas. I understand that. Subsequently, when looking at the node in the region 1, it is further divided into two parts in the X direction and two parts in the Y direction. [12:15]) and area 12 ([4: 7], [8:11]) and area 13 ([4: 7], [12:15]) are divided into four. Since it is understood that the packet belongs to the area 12 among these, the subsequent nodes are traced. In the next node, the area 120 ([4: 7], [8: 9]) and the area 121 ([4: 7], [10:11]) are divided into two in the Y direction. Therefore, it is determined that they belong to the matching rule by performing a search for R3 and R6 managed in the area 120. In this case, since the packet matches both R3 and R6, a matching rule is selected according to the priority assigned to each rule omitted in FIG.
 このように、Decision Treeを用いた手法は、複数の次元に着目して領域を分割し、分割された領域が管理する少数のルールに対して検索を行うことで、検索すべきルール数を削減する手法である。 In this way, the method using Decision Tree reduces the number of rules to be searched by dividing an area focusing on a plurality of dimensions and performing a search on a small number of rules managed by the divided area. It is a technique to do.
 なお、Decision Treeを用いた手法では、領域分割の際、ルールによっては複数の分割領域で管理されることがあり、以下では、これをルールの複製と呼ぶ。例えば、図3では、R3やR4等のルールが複数の領域で管理されていることが分かる。このようなルールの複製が多ければ多いほど、複製されたルールへのアドレス値の管理、又はルールそのものの管理が増加し、見た目上、実際のルールセットよりも多くのルールを扱うことになり、Decision Treeにおけるデータ量が増加してしまう。これを防ぐために、非特許文献1や非特許文献2では、葉ノードでないノードにもルールリストを持たせ、その子ノード(領域)の間でルールが複製されるような場合には、当該ノードのルールリストにおいて複製されるルールを管理することで、それ以降の子ノードでは当該ルールを管理せず、結果的に、複製されるルール数を削減するための手法が提案されている。 In the method using the Decision Tree, when a region is divided, it may be managed by a plurality of divided regions depending on the rule. Hereinafter, this is referred to as rule duplication. For example, in FIG. 3, it can be seen that rules such as R3 and R4 are managed in a plurality of areas. The more such rules are replicated, the greater the management of address values to the replicated rules, or the management of the rules themselves, and apparently it will handle more rules than the actual rule set, The amount of data in Decision Tree increases. In order to prevent this, in Non-Patent Document 1 and Non-Patent Document 2, if a node that is not a leaf node also has a rule list and the rule is replicated between its child nodes (areas), There has been proposed a method for managing the rule to be duplicated in the rule list, so that the subsequent child nodes do not manage the rule, and consequently reduce the number of rules to be duplicated.
 また、非特許文献3では、Parallel Bit Vector(以下、Parellel BVと呼ぶ)と呼ばれるMulti-Field Packet Classification手法が提案されている。Parellel BVでは、ルールを構成するそれぞれのフィールドに着目し、各ルールによって分割される、着目したフィールドの区間毎に、ビット配列(これをBit Vector(BV)と呼ぶ)を用意し、これを用いてPacket Classificationを行う。このようなParellel BVについて、図4を用いて簡単に説明する。 Also, Non-Patent Document 3 proposes a multi-field packet classification method called Parallel Bit Vector (hereinafter referred to as “Parellel BV”). In Parelel BV, pay attention to each field that constitutes a rule, and prepare a bit array (called Bit Vector (BV)) for each section of the focused field divided by each rule. To perform Packet Classification. Such Parellel BV will be briefly described with reference to FIG.
 図4は、図1に示したルールセットに対するBVの一例を示す図である。このBVは、ビット位置とルールセットに含まれるルールが1対1に対応付けられており、各ビットには、当該区間の値が対応付けられたルールに一致する場合に‘1’、一致しない場合に‘0’が割り当てられる。なお、図4では、各BVの上位ビットから、R11、R10、・・・、R0に割り当てられている。このようなBVを、ルールを構成する全てのフィールドに対して準備する。 FIG. 4 is a diagram showing an example of the BV for the rule set shown in FIG. In this BV, the bit position and the rule included in the rule set are associated with each other on a one-to-one basis, and each bit is '1' if the value of the section matches the associated rule. In this case, “0” is assigned. In FIG. 4, R11, R10,..., R0 are assigned from the upper bits of each BV. Such BV is prepared for all the fields constituting the rule.
 パケット分類を行う場合には、各フィールドの値によって、それぞれのフィールド毎に上記のBVを選択し、それらのBVのビット毎のAND(論理積)を取る。当該パケットは、その結果得られたBVに‘1’が立っているビット位置に対応するルールに一致していると判断する。例えば、X=0111、Y=1001をもつパケットに対してパケット分類を行う場合を考える。フィールドXの値は0111、つまり10進数表記で7であるので、BVとして、“100011001000”を選択する(図4からもR3、R6、R7、R11に一致する可能性があることが分かる)。同様に、フィールドYの値は、1001、つまり、10進数表記で9であるので、BVとして、“000001111000”を選択する(図4からもR3、R4、R5、R6に一致する可能性があることが分かる)。続いて、フィールドX、Yから得たBVのビット単位のANDをとると、“000001001000”となる。この結果、当該パケットはR3とR6の両方に一致することが分かる。最終的には、図1では省略している各ルールに付与された優先度に応じて、一致するルールが選択される。 When packet classification is performed, the above BV is selected for each field according to the value of each field, and AND (logical product) is performed for each bit of the BV. It is determined that the packet matches the rule corresponding to the bit position where “1” is set in the BV obtained as a result. For example, consider a case where packet classification is performed on a packet having X = 0111 and Y = 1001. Since the value of the field X is 0111, that is, 7 in decimal notation, “100011001000” is selected as BV (it can be seen from FIG. 4 that it may match R3, R6, R7, R11). Similarly, since the value of the field Y is 1001, that is, 9 in decimal notation, “000001111000” is selected as the BV (from FIG. 4, there is a possibility that it matches R3, R4, R5, R6) I understand that.) Subsequently, when the bitwise AND of BV obtained from the fields X and Y is taken, “000001001000” is obtained. As a result, it can be seen that the packet matches both R3 and R6. Eventually, a matching rule is selected according to the priority assigned to each rule omitted in FIG.
 このように、Parallel BVは、ルールを構成するフィールド毎に一致する可能性のあるルールを選択し、最後に全フィールドの結果を総合的に判定することにより、一致しているルールを限定するという手法である。 In this way, Parallel BV selects a rule that may match for each field constituting the rule, and finally determines the result of all fields in a comprehensive manner, thereby limiting the matching rule. It is a technique.
 上記のHyperCutsやBVを、ハードウェアアーキテクチャによって高速処理を行う手法も提案されている。 A method for performing high-speed processing of the above HyperCuts and BV using a hardware architecture has also been proposed.
 例えば、非特許文献2に、HyperCutsをはじめとする、Decision Treeを用いた手法を、パイプラインによって処理するハードウェアアーキテクチャが提案されている。なお、上述したように、非特許文献2では、葉ノードでないノードにもルールリストを持たせることで、複製されるルール数を削減するための手法を用いている。図5は、図1のルールセットに対して非特許文献2の手法を用いて構築したDecision Treeの一例を示した図である。Decision Treeの構築方法については、非特許文献2に記載されているため、詳細は省略するが、図3と図5を比較しても分かるように、葉ノードでないノードにもルールリストを持たせることで、複製されるルール数が削減できており、かつDecision Treeの高さも低く抑えることができている。 For example, Non-Patent Document 2 proposes a hardware architecture that processes a method using a Decision Tree, such as HyperCuts, using a pipeline. Note that, as described above, Non-Patent Document 2 uses a technique for reducing the number of replicated rules by providing a rule list to a node that is not a leaf node. FIG. 5 is a diagram showing an example of a decision tree constructed using the method of Non-Patent Document 2 for the rule set of FIG. Since the method of building the Decision Tree is described in Non-Patent Document 2, details are omitted, but as can be seen from a comparison of FIG. 3 and FIG. 5, a node that is not a leaf node also has a rule list. As a result, the number of rules to be duplicated can be reduced, and the height of the Decision Tree can be kept low.
 非特許文献2のハードウェアアーキテクチャでは、Decision Treeを辿るためのTree Pipelineと、各ノードにおけるルールリストに含まれるルールを全検索するためのRule Pipelineと、の2つのパイプラインを並列に用いることで、パケット分類を行っている。Tree Pipelineは1つだけ具備され、基本的にはDecision Treeの深さ(高さ)と等しいパイプラインステージがあり、各ステージを進む毎に1つ深いノードを辿っていくことになる。一方、各ノードに到達すると、そこからルールリストに含まれるルールうちの1つへのアドレス値が指定され、それをRule Pipelineの各ステージで1つずつマッチングする処理が開始される。このため、Rule Pipelineのステージ数は、ルールリストに含まれるルール数、つまり閾値数と等しく、Rule Pipelineの数はTree Pipelineのステージ数よりも1つだけ多い数となる。詳細なアーキテクチャについては、非特許文献2に記載されているため、ここでは省略する。 In the hardware architecture of Non-Patent Document 2, two pipelines are used in parallel: Tree Pipeline for tracing the Decision Tree and Rule Pipeline for searching all the rules included in the rule list at each node. Packet classification. There is only one Tree Pipeline, and basically there is a pipeline stage equal to the depth (height) of the Decision Tree, and each stage advances one deep node. On the other hand, when each node is reached, an address value to one of the rules included in the rule list is designated, and a process of matching it one by one at each stage of the Rule Pipeline is started. For this reason, the number of stages in Rule Pipeline is equal to the number of rules included in the rule list, that is, the number of thresholds, and the number of Rules Pipeline is one more than the number of stages in Tree Pipeline. Since the detailed architecture is described in Non-Patent Document 2, it is omitted here.
 しかしながら、非特許文献2の手法では、1つのルールを構成するヘッダフィールド長の総和が大きくなればなるほど、高速アクセスが可能なメモリ、例えばSRAMの必要容量が大きくなる上、1パケットを処理する際にSRAMから読み出すデータ量が大きくなるため、メモリの動的電力(Dynamic Power)が増加し、結果的に消費電力全体も増加してしまうという課題がある。 However, according to the technique of Non-Patent Document 2, the larger the sum of the header field lengths constituting one rule, the larger the required capacity of a memory that can be accessed at high speed, for example, SRAM, and the processing of one packet. In addition, since the amount of data read from the SRAM increases, the dynamic power of the memory increases, resulting in an increase in overall power consumption.
 一方、非特許文献4では、Parallel BVを拡張したアルゴリズムと、それをパイプラインによって処理するハードウェアアーキテクチャと、が開示されている。非特許文献3のParallel BVでは、BVを管理するために必要なメモリ容量は、通常、ルール数Nに対してO(N)で増加するが、非特許文献4で拡張した手法では、各フィールドを複数のサブフィールドに分割し、その少数ビットから構成されるサブフィールドの取り得る値全てに対してBVを用意する。例えば、あるフィールドを1bitずつのサブフィールドに分割した場合、サブフィールドが取り得る値(0か1)のいずれかで1つのBVを用意する。このため、ビット単位のANDを取るBVの数が増加してしまうが、必要なメモリ容量を線形増加に抑えることが可能である。また、Parellel BVでは、ルールそのものを用いてマッチングを行う必要がないため、ルール自体は例えばより大容量で低速なDRAM等に保持しておき、BVのみを高速なSRAMに保持するという形態が可能である。 On the other hand, Non-Patent Document 4 discloses an algorithm obtained by extending Parallel BV and a hardware architecture that processes the algorithm by a pipeline. In the Parallel BV of Non-Patent Document 3, the memory capacity necessary for managing the BV usually increases by O (N 2 ) with respect to the number of rules N. The field is divided into a plurality of subfields, and BVs are prepared for all possible values of the subfield composed of the small number of bits. For example, when a certain field is divided into 1-bit subfields, one BV is prepared with any value (0 or 1) that can be taken by the subfield. For this reason, the number of BVs that take bitwise AND increases, but the required memory capacity can be suppressed to a linear increase. In addition, since it is not necessary to perform matching using the rule itself in the Parellel BV, it is possible to store the rule in, for example, a large capacity and low speed DRAM, and hold only the BV in a high speed SRAM. It is.
 しかしながら、Parellel BVでは、1つのBV長はルール数Nに比例するため、ルール数が大きくなればなるほど、BVをメモリから読み出すのに多くのクロックサイクルを消費する上、N bitsのBVを、一般的にはルールを構成するフィールド数分読み出す必要があるため、Dynamic Powerが増加し、結果的に消費電力が増加してしまうという課題がある。 However, in Parellel BV, since one BV length is proportional to the number of rules N, the larger the number of rules, the more clock cycles are consumed to read BV from the memory, and N bits BV Specifically, since it is necessary to read out the number of fields constituting the rule, there is a problem that the dynamic power increases, resulting in an increase in power consumption.
 さらに、非特許文献2、非特許文献4で提案されたハードウェアアーキテクチャでは、ルールとして用いるパケットヘッダ情報として、上述した5-tupleを想定しており、ルールとして用いるパケットヘッダ情報を変更する場合には、再度ハードウェア回路を変更する必要がある。 Furthermore, in the hardware architecture proposed in Non-Patent Document 2 and Non-Patent Document 4, the above-described 5-tuple is assumed as packet header information used as a rule, and packet header information used as a rule is changed. It is necessary to change the hardware circuit again.
 また、非特許文献5では、HyperCutsとParellel BVを組み合わせることで、両者の欠点を互いに補うことを目指した手法が開示されている。本手法では、メモリから読み出すBVが高速処理にとって現実的なビット長になるようなルール数のみをBVで処理し、残りはHyperCutsで処理を行う。特に、HyperCutsで処理を行うと、より多くのコピーが必要となるようなルールをParellel BVで処理することで、HyperCutsで必要となるメモリ容量を削減することが可能である。 Further, Non-Patent Document 5 discloses a method aiming to compensate for the disadvantages of both by combining HyperCuts and Parellel BV. In this method, only the number of rules for which the BV read from the memory has a realistic bit length for high-speed processing is processed by the BV, and the rest are processed by HyperCuts. In particular, when processing is performed with HyperCuts, it is possible to reduce the memory capacity required for HyperCuts by processing rules that require more copies with Parrel BV.
 しかしながら、この手法は、HyperCutsとParellel BVを単純に組み合わせただけであり、上述したそれぞれの課題を根本的に解決しているわけではない。 However, this method is merely a combination of HyperCuts and Parellel BV, and does not fundamentally solve each of the problems described above.
 上記のようなSRAM等のメモリを用いたハードウェアによるMulti-Field Packet Classification手法には、次のような問題点がある。 The multi-field packet classification method using hardware using a memory such as SRAM as described above has the following problems.
 まず、第1の問題点は、1つのルールを構成するヘッダフィールド長の総和が大きくなればなるほど、また、ルール数が多ければ多いほど、メモリのDynamic Powerが増加し、結果的にハードウェア全体の消費電力も増大してしまう点である。 First, the first problem is that the larger the sum of the header field lengths that make up one rule, and the greater the number of rules, the more memory dynamic power increases, resulting in the overall hardware. This also increases power consumption.
 その理由は、Decision Treeを用いたアルゴリズムでは、ルールリストに含まれるルールの全件検索を行う際に、ルールそのものをメモリから読み出して比較を行う必要があるためである。 The reason is that in the algorithm using the Decision Tree, when searching for all the rules included in the rule list, the rules themselves need to be read from the memory and compared.
 次に、第2の問題点は、ルール数が多ければ多いほど、メモリからデータを読み出すのに必要なクロックサイクル数が増大してしまう点である。 Next, the second problem is that the greater the number of rules, the greater the number of clock cycles required to read data from the memory.
 その理由は、Parallel BVは、1つのルールがBVの1bitに対応付けられているためであり、BVは全てのルールに対応させるためのbit数が必要であるためである。 The reason is that Parallel BV is because one rule is associated with 1 bit of BV, and BV needs the number of bits to correspond to all the rules.
 最後に、第3の問題点は、ルールとして用いるパケットヘッダ情報を自由に変更できないという点である。 Finally, the third problem is that packet header information used as a rule cannot be freely changed.
 その理由は、ルールとして用いるパケットヘッダ情報として、例えば、5-tupleを想定してハードウェア回路が組まれているため、これを変更する際には、ハードウェア回路の変更が必要であるためである。なお、ここで言うパケットヘッダ情報の変更とは、ルール毎に用いるパケットヘッダ情報を変更するという意味ではなく、各ルールで用いることができるパケットヘッダ情報は予め決められているが、その予め決められたパケットヘッダ情報を、ハードウェア回路を変更することなく、自由に変更できるという意味である。 The reason is that, as the packet header information used as a rule, for example, a hardware circuit is assembled assuming 5-tuple, and thus changing the hardware circuit is necessary. is there. Note that the change of packet header information here does not mean changing the packet header information used for each rule, but the packet header information that can be used for each rule is determined in advance. This means that the packet header information can be changed freely without changing the hardware circuit.
 本発明の目的は、上述した課題のいずれかを解決するパケット分類器、パケット分類方法、パケット分類プログラムを提供することにある。 An object of the present invention is to provide a packet classifier, a packet classification method, and a packet classification program that can solve any of the problems described above.
 本発明のパケット分類器は、
 複数のフィールドを用いて定義された多数のルールから構成されるルールセットから、被検索対象である検索キーが適合するルールを、複数種類の予め決められた少数の長さのビット配列を用いて検索するパケット分類器であって、
 決定木(Decision Tree)を用いて、多数のルールから適合する可能性のあるルールを予め決められた個数に絞り込み、
 検索キーのうち予め決められたデータ毎に決定木で絞り込んだルール数と同じ長さのビット配列を利用し、これらのビット配列のビット位置が示すルール識別子をリストとして備えたルール識別子リストを用いて、絞り込んだルールから適合するルールを特定し、
 特定されたルールの優先度に応じて最終的結果としての適合ルールを決定する、
 ことを特徴とする。
The packet classifier of the present invention
From a rule set composed of a large number of rules defined using a plurality of fields, a rule that matches the search key to be searched is selected using a plurality of types of bit arrays having a predetermined small number of lengths. A packet classifier to search for,
Using a decision tree, we narrow down the rules that can be matched from a large number of rules to a predetermined number,
Using a bit identifier having the same length as the number of rules narrowed down by the decision tree for each predetermined data in the search key, and using a rule identifier list having rule identifiers indicated by the bit positions of these bit arrays as a list Identify the matching rule from the narrowed-down rules,
Determine the final matching rule according to the priority of the identified rule,
It is characterized by that.
 本発明のパケット分類方法は、
 複数のフィールドを用いて定義された多数のルールから構成されるルールセットから、被検索対象である検索キーが適合するルールを検索するパケット分類器によるパケット分類方法であって、
 決定木を用いて、多数のルールから適合する可能性のあるルールを予め決められた個数に絞り込み、
 検索キーのうち予め決められたデータ毎に決定木で絞り込んだルール数と同じ長さのビット配列を利用し、これらのビット配列のビット位置が示すルール識別子をリストとして備えたルール識別子リストを用いて、絞り込んだルールから適合するルールを特定し、
 特定されたルールの優先度に応じて最終的結果としての適合ルールを決定する、
 ことを特徴とする。
The packet classification method of the present invention includes:
A packet classification method by a packet classifier that searches a rule set composed of a large number of rules defined using a plurality of fields and that matches a search key that is a search target,
Using a decision tree, narrow down the number of rules that may match from a large number of rules to a predetermined number,
Using a bit identifier having the same length as the number of rules narrowed down by the decision tree for each predetermined data in the search key, and using a rule identifier list having rule identifiers indicated by the bit positions of these bit arrays as a list Identify the matching rule from the narrowed-down rules,
Determine the final matching rule according to the priority of the identified rule,
It is characterized by that.
 本発明のパケット分類プログラムは、
 複数のフィールドを用いて定義された多数のルールから構成されるルールセットから、被検索対象である検索キーが適合するルールを検索するコンピュータに、
 決定木を用いて、多数のルールから適合する可能性のあるルールを予め決められた個数に絞り込む処理と、
 検索キーのうち予め決められたデータ毎に決定木で絞り込んだルール数と同じ長さのビット配列を利用し、これらのビット配列のビット位置が示すルール識別子をリストとして備えたルール識別子リストを用いて、絞り込んだルールから適合するルールを特定する処理と、
 特定されたルールの優先度に応じて最終的結果としての適合ルールを決定する処理と、
 を実行させることを特徴とする。
The packet classification program of the present invention is
From a rule set consisting of a large number of rules defined using multiple fields to a computer that searches for a rule that matches the search key that is the search target,
Using a decision tree, a process of narrowing down a rule that may be matched from a large number of rules to a predetermined number,
Using a bit identifier having the same length as the number of rules narrowed down by the decision tree for each predetermined data in the search key, and using a rule identifier list having rule identifiers indicated by the bit positions of these bit arrays as a list Process to identify the matching rule from the narrowed down rules,
Determining the final matching rule according to the priority of the identified rule;
Is executed.
 本発明によれば、決定木(Decision Tree)とビット配列とを組み合わせることにより、1パケットあたりの処理においてメモリから読み出すデータ量を削減することができ、1つのルールを構成するヘッダフィールド長の総和が大きくなっても、また、ルール数が多くなっても、メモリの動的電力の増加を抑制し、結果的にハードウェア全体の消費電力を増加させないことができるという効果が得られる。 According to the present invention, by combining a decision tree and a bit arrangement, it is possible to reduce the amount of data read from the memory in processing per packet, and the sum of the header field lengths constituting one rule. Even when the number of rules increases or the number of rules increases, an increase in the dynamic power of the memory can be suppressed, and as a result, the power consumption of the entire hardware can be prevented from increasing.
 また、決定木とビット配列とを組み合わせることにより、ルール数が多くても、決定木によって適合する可能性のあるルール数を絞り込むことができるため、ビット配列のビット長を削減することができ、メモリからデータを読み出すのに必要なクロックサイクル数の増加を抑制できるという効果が得られる。 Also, by combining the decision tree and the bit array, the number of rules that can be matched by the decision tree can be narrowed down even if the number of rules is large, so the bit length of the bit array can be reduced, An effect is obtained that an increase in the number of clock cycles necessary for reading data from the memory can be suppressed.
ルールセットの例を示す図である。It is a figure which shows the example of a rule set. 図1のルールセットを2次元空間上で表した図である。It is the figure which represented the rule set of FIG. 1 on the two-dimensional space. 図1のルールセットに対するDecision Treeの一例を示す図である。It is a figure which shows an example of Decision Tree with respect to the rule set of FIG. 図1のルールセットに対するBit Vectorの一例を示す図である。It is a figure which shows an example of Bit Vector with respect to the rule set of FIG. 図1のルールセットに対して非特許文献2の手法を用いて構築したDecision Treeの一例を示す図である。It is a figure which shows an example of Decision Tree constructed | assembled using the method of the nonpatent literature 2 with respect to the rule set of FIG. 本発明における基本的なパケット分類方法で用いるDecision Treeの一例を示す図である。It is a figure which shows an example of Decision Tree used with the basic packet classification method in this invention. 本発明における基本的なパケット分類方法で用いるDecision Treeの各ノードにおける領域分割情報の例を示す図である。It is a figure which shows the example of the area | region division information in each node of Decision Tree used with the basic packet classification method in this invention. 本発明における基本的なパケット分類方法で用いるDecision Treeの各ノードにおけるBit Vector情報の例を示す図である。It is a figure which shows the example of Bit Vector information in each node of Decision Tree used with the basic packet classification method in this invention. 本発明における基本的なパケット分類方法の基本動作を示す流れ図である。It is a flowchart which shows the basic operation | movement of the basic packet classification method in this invention. 本発明における基本的なパケット分類方法で用いるルールセットの例を示す図である。It is a figure which shows the example of the rule set used with the basic packet classification method in this invention. 図10に示すルールセットを2次元空間上で表した図である。It is the figure which represented the rule set shown in FIG. 10 on the two-dimensional space. 図10に示すルールセットに対して、本発明における基本的なパケット分類方法で構築したDecision Treeの一例を示す図である。It is a figure which shows an example of Decision Tree constructed | assembled with the basic packet classification method in this invention with respect to the rule set shown in FIG. 図12のノード0のルールリストを2次元空間上に示し、かつ、フィールドX、Yの有効ビットに対するBit Vectorを示した図である。FIG. 13 is a diagram showing a rule list of node 0 in FIG. 12 on a two-dimensional space and showing a Bit Vector for valid bits of fields X and Y. FIG. 図12のノード4のルールリストを2次元空間上に示し、かつ、フィールドX、Yの有効ビットに対するBit Vectorを示した図である。It is the figure which showed the rule list of the node 4 of FIG. 12 on a two-dimensional space, and showed Bit Vector with respect to the effective bit of the fields X and Y. FIG. 図12のノード8のルールリストを2次元空間上に示し、かつ、フィールドX、Yの有効ビットに対するBit Vectorを示した図である。FIG. 13 is a diagram showing a rule list of a node 8 in FIG. 12 on a two-dimensional space and showing a Bit Vector for valid bits of fields X and Y. 図12のノード8のルールリストを2次元空間上に示し、かつ、フィールドX、Yの有効ビットに対するBit Vectorを示した図である。FIG. 13 is a diagram showing a rule list of a node 8 in FIG. 12 on a two-dimensional space and showing a Bit Vector for valid bits of fields X and Y. 本発明の第1の実施の形態を示すブロック図である。It is a block diagram which shows the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるDecision Treeにおける各ノードのTree Pipeline Stageへのマッピング例を示す図である。It is a figure which shows the example of mapping to the Tree Pipeline Stage of each node in the Decision Tree in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるTree Pipeline Stageの構成を示すブロック図である。It is a block diagram which shows the structure of Tree Pipeline Stage in the 1st Embodiment of this invention. 本発明の第1の実施の形態における領域分割回路の構成を示すブロック図である。It is a block diagram which shows the structure of the area division circuit in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるフィールド分割回路の構成を示すブロック図である。It is a block diagram which shows the structure of the field division circuit in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるVirtual Nodeの例を示す図である。It is a figure which shows the example of Virtual Node in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるVirtual Nodeの領域分割情報の配置例を示す図である。It is a figure which shows the example of arrangement | positioning of the area | region division information of Virtual Node in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるPriority Pipeline Stageの構成を示すブロック図である。It is a block diagram which shows the structure of Priority Pipeline Stage in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるBit Vector選択回路の構成を示すブロック図である。It is a block diagram which shows the structure of the Bit Vector selection circuit in the 1st Embodiment of this invention. 本発明の第1の実施のParallel Bit Vector処理時の動作(ステップA2)を示す流れ図である。It is a flowchart which shows the operation | movement (step A2) at the time of Parallel Bit Vector processing of 1st implementation of this invention. 本発明の第1の実施の領域分割時の動作(ステップA6)を示す流れ図である。It is a flowchart which shows the operation | movement (step A6) at the time of the area | region division | segmentation of 1st Embodiment of this invention. 本発明の第1の実施のParallel Bit Vector処理時の動作(ステップA2)を示す流れ図である。It is a flowchart which shows the operation | movement (step A2) at the time of Parallel Bit Vector processing of 1st implementation of this invention. 本発明の第1の実施の形態における複数のDecision TreeノードのTree Pipeline Stageへのマッピング例を示す図である。It is a figure which shows the example of mapping to the Tree Pipeline Stage of the several Decision Tree node in the 1st Embodiment of this invention. 本発明の第2の実施の形態におけるTree Pipeline Stageの構成を示すブロック図である。It is a block diagram which shows the structure of Tree Pipeline Stage in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるDecision Treeの各ノードにおける領域分割情報の例を示す図である。It is a figure which shows the example of the area | region division information in each node of Decision Tree in the 2nd Embodiment of this invention. 本発明の第2の実施の形態における領域分割回路の構成を示すブロック図である。It is a block diagram which shows the structure of the area | region division circuit in the 2nd Embodiment of this invention. 本発明の第2の実施の領域分割時の動作(ステップA6)を示す流れ図である。It is a flowchart which shows the operation | movement (step A6) at the time of the area | region division of the 2nd implementation of this invention. 本発明の第3の実施の形態を示すブロック図である。It is a block diagram which shows the 3rd Embodiment of this invention. 本発明の第3の実施の形態におけるDecision Tree処理回路の構成を示すブロック図である。It is a block diagram which shows the structure of the Decision Tree processing circuit in the 3rd Embodiment of this invention. 本発明の第3の実施の形態におけるBit Vector処理回路の構成を示すブロック図である。It is a block diagram which shows the structure of the Bit Vector processing circuit in the 3rd Embodiment of this invention. 本発明の第3の実施の形態におけるルールIDリストの構成例を示す図である。It is a figure which shows the structural example of the rule ID list | wrist in the 3rd Embodiment of this invention. 本発明の第3の実施の形態におけるパケット分類の動作を示す流れ図である。It is a flowchart which shows the operation | movement of the packet classification | category in the 3rd Embodiment of this invention. 本発明の第3の実施の形態におけるParallel Bit Vector処理時の動作(ステップA2)を示す流れ図である。It is a flowchart which shows the operation | movement (Step A2) at the time of Parallel Bit Vector processing in the 3rd Embodiment of this invention. 本発明の第4の実施の形態を示すブロック図である。It is a block diagram which shows the 4th Embodiment of this invention.
[発明の概要]
 本発明のパケット分類器およびパケット分類方法について説明する前に、まず、本発明における基本的なパケット分類方法の概要について説明する。
[Summary of Invention]
Before describing the packet classifier and packet classification method of the present invention, first, an outline of a basic packet classification method of the present invention will be described.
 図6は、本発明における基本的なパケット分類方法で用いるDecision Treeの一例を示す図である。図6においては、ノード0はDecision Treeの根ノードであり、葉ノードでない各ノードにおいてそれぞれ2つ又は4つに領域分割を行っている例を示している。また、各葉ノードには、各分割領域において管理される閾値L以下のルール群であるルールリスト(図6において実線で示しているルールリスト)が管理されている。さらに、葉ノードでないノードにおいても、非特許文献1や非特許文献2で提案されているようなルールの複製を削減するためのルールリスト(図6において点線で示しているルールリスト)を保持している。なお、このようなDecision Treeの構築方法については、非特許文献1や非特許文献2で提案されている手法を用いるものとし、ここでは詳細な説明を省略する。 FIG. 6 is a diagram showing an example of Decision Tree used in the basic packet classification method according to the present invention. FIG. 6 shows an example in which node 0 is a root node of a decision tree, and each node that is not a leaf node is divided into two or four regions. Each leaf node manages a rule list (rule list indicated by a solid line in FIG. 6) which is a rule group having a threshold value L or less managed in each divided region. Further, even in a node that is not a leaf node, a rule list (rule list indicated by a dotted line in FIG. 6) for reducing duplication of rules as proposed in Non-Patent Document 1 and Non-Patent Document 2 is maintained. ing. In addition, about the construction method of such Decision Tree, the method proposed by the nonpatent literature 1 and the nonpatent literature 2 shall be used, and detailed description is abbreviate | omitted here.
 図7は、本発明における基本的なパケット分類方法で用いるDecision Treeの各ノードにおける領域分割情報を示す図である。本発明におけるパケット分類方法の領域分割情報としては、当該ノードがDecision Treeにおける葉ノードであるか否かを示す“Leaf Flag”と、本パケット分類方法でDecision Treeの各ノードにおいて領域を分割するために用いるC個のフィールドに対する分割数(Num. of Cutting)と、当該ノードの子ノードに対する領域分割情報が格納されているBase Address(ベースアドレス)と、当該ノードが実ノードではなく仮想ノードであることを示す“Virtual Flag”と、を含む。ここで、分割数については、非特許文献2と同様の指定方法とし、分割数としてkを指定した場合、当該フィールドに対する分割数は2であるとする。その他の情報に関する具体的な利用方法については後述する。なお、この領域分割情報はメモリに格納されており、Decision Treeを辿る際に、各ノードに到着すると、該当する領域分割情報をメモリから読み出す。 FIG. 7 is a diagram showing area division information in each node of the Decision Tree used in the basic packet classification method according to the present invention. As the area division information of the packet classification method in the present invention, “Leaf Flag” indicating whether or not the node is a leaf node in the Decision Tree, and in order to divide the area in each node of the Decision Tree by the packet classification method. The number of divisions (Num. Of Cutting) for the C fields used for the field, the Base Address (base address) in which the area division information for the child node of the node is stored, and the node is not a real node but a virtual node “Virtual Flag” indicating the above. Here, the number of divisions is designated in the same manner as in Non-Patent Document 2, and when k is designated as the number of divisions, the number of divisions for the field is 2 k . Specific usage methods regarding other information will be described later. Note that this area division information is stored in the memory, and when the decision tree arrives at each node, the corresponding area division information is read from the memory.
 図8は、本発明における基本的なパケット分類方法で用いるDecision Treeの各ノードにおけるBit Vector(BV)情報を示す図である。まず、本方法では、Decision Treeの各ノードにおいて、BVの他にルールIDリストを1つ管理する。このルールIDリストは、当該ノードにおけるルールリストに相当するものであり、当該ノードの分割領域において管理する最大L個のルールのルールIDと、その優先度を示すものである(図8には、優先度を示していないが、優先度はルールIDと共に管理されているものとする)。一方、BVの長さはL bitsであり、図8に示すように、そのビット位置とルールIDリストが1対1で対応する。つまり、BVのビット位置を上位からBV[L-1]、BV[L-2]、BV[L-3]、・・・、BV[0]として表すと、ビット位置BV[i](i=L-1、L-2、・・・、0)は、ルールIDリストのRule ID #iに記載されているIDを持つルールと対応する。なお、BVの各ビットが表す意味は既存のParallel BVと同じであるため、説明を省略する。なお、図8では、BVを1つだけ記載しているが、実際には、非特許文献3に記載のように、ルールを構成する各フィールドにおいてその区間毎に用意する、又は、非特許文献4に記載のように、各フィールドをサブフィールドに分割し、そのサブフィールドが取り得る値全てに対して用意することが考えられるが、詳細については後述する実施の形態において説明する。但し、本方法では、検索キーの各フィールドにおいて有効ビット長が管理されており、BVは、有効ビット長で示されたビット長に対してのみ管理される。また、これらのルールIDリストとBVはメモリにて保持されているものとする。 FIG. 8 is a diagram showing Bit Vector (BV) information in each node of the Decision Tree used in the basic packet classification method according to the present invention. First, in this method, one rule ID list is managed in addition to BV in each node of the Decision Tree. This rule ID list corresponds to the rule list in the node, and indicates the rule IDs of the maximum L rules managed in the divided area of the node and their priorities (in FIG. 8, The priority is not shown, but the priority is assumed to be managed together with the rule ID). On the other hand, the length of BV is L bits, and as shown in FIG. 8, the bit position and the rule ID list have a one-to-one correspondence. That is, if the bit position of BV is expressed as BV [L-1], BV [L-2], BV [L-3],..., BV [0] from the upper order, the bit position BV [i] (i = L-1, L-2,..., 0) corresponds to the rule having the ID described in Rule ID #i of the rule ID list. In addition, since the meaning which each bit of BV represents is the same as the existing Parallel BV, description is abbreviate | omitted. In FIG. 8, only one BV is described. Actually, however, as described in Non-Patent Document 3, it is prepared for each section in each field constituting a rule. As described in FIG. 4, it is conceivable to divide each field into subfields and prepare all possible values of the subfields. Details will be described in an embodiment described later. However, in this method, the effective bit length is managed in each field of the search key, and the BV is managed only for the bit length indicated by the effective bit length. Also, it is assumed that the rule ID list and BV are held in the memory.
 図9は、本発明における基本的なパケット分類方法の基本動作を示す流れ図である。 FIG. 9 is a flowchart showing the basic operation of the basic packet classification method in the present invention.
 本発明における基本的なパケット分類方法では、検索キーとなるパケットのヘッダ情報が入力されると、Decision Treeの根ノードから処理を開始する(ステップA1)。処理ノードにおいて、管理されているルールIDリストと検索キーを基に、所定のParallel BV処理を実行する(ステップA2)。なお、ここでのParallel BV処理は、非特許文献3や非特許文献4等に記載の手法をベースとする。次に、当該処理ノードと当該処理ノード以前の各処理ノードからの最適ルールと、を含めたルールの中で、最適ルールを選択する(ステップA3)。続いて、当該処理ノードにおける領域分割情報をメモリから読み出す(ステップA4)。ここで詳細については後述するが、当該ノードの領域分割情報に対するメモリアドレスは、その親ノードにおける処理時に確定し、子ノードである当該処理ノードに通知され、当該処理ノードはそのアドレス値に格納されている領域分割情報を読み出す。読み出した領域分割情報のLeaf Flagから当該ノードがDecision Treeの葉ノードであるかを確認し(ステップA5)、当該ノードが葉ノードでなければ(ステップA5のNo)、当該処理ノードの領域分割情報で指定されたフィールドに対する分割数から、次の子ノードの領域分割情報が格納されているメモリアドレス値を決定し(これを、次の子ノードを選択すると言う)、その子ノードを処理ノードとする(ステップA6)。なお、次の子ノードの選択方法の詳細については後述するが、領域分割情報で指定された分割フィールドに対し、検索キーの当該フィールドの値のうち、有効ビット長の先頭kビットをチェックし、それらを結合した上で、領域分割情報のBase Addressに加算することで、次の子ノードに対する領域分割情報が格納されているメモリアドレス値を確定することができ、分割領域のうちのどの領域(どの子ノード)であるかを判断できる。ここで、変数kは、領域分割情報の分割数で指定されている値である。次に、各フィールドの有効ビット長から、領域分割情報で指定されたkを減じることで、有効ビット長の更新を行い(ステップA7)、ステップA2へ戻って処理を繰り返す。なお、有効ビット長は、内部変数として管理されるものであり、当該フィールドのフィールド長で初期化され、根ノードからDecision Treeを辿ったノードからノードへと受け渡すものとする。一方、当該処理ノードがDecision Treeの葉ノードであった場合(ステップA5のYes)、処理を終了し、それまでに選択されている最適ルールを最終解とする。 In the basic packet classification method of the present invention, when packet header information serving as a search key is input, processing starts from the root node of the Decision Tree (step A1). In the processing node, a predetermined Parallel BV process is executed based on the managed rule ID list and search key (step A2). Note that the Parallel BV processing here is based on the methods described in Non-Patent Document 3, Non-Patent Document 4, and the like. Next, the optimal rule is selected from the rules including the processing node and the optimal rule from each processing node before the processing node (step A3). Subsequently, the area division information in the processing node is read from the memory (step A4). Although details will be described later, the memory address for the area division information of the node is determined at the time of processing in the parent node, notified to the processing node that is a child node, and the processing node is stored in the address value. The area division information is read. From the leaf flag of the read area division information, check whether the node is a leaf node of the Decision Tree (step A5). If the node is not a leaf node (No in step A5), the area division information of the processing node The memory address value in which the area division information of the next child node is stored is determined from the number of divisions for the field specified in (this is called selecting the next child node), and the child node is set as the processing node. (Step A6). The details of the method for selecting the next child node will be described later. For the divided field specified by the area division information, the first k bits of the effective bit length are checked among the values of the field of the search key, After combining them, by adding to the Base Address of the area division information, the memory address value storing the area division information for the next child node can be determined. It is possible to determine which child node. Here, the variable k is a value specified by the number of divisions of the region division information. Next, the effective bit length is updated by subtracting k specified by the area division information from the effective bit length of each field (step A7), and the process returns to step A2 and is repeated. The effective bit length is managed as an internal variable, is initialized with the field length of the field, and is passed from the root node to the node following the Decision Tree. On the other hand, when the processing node is a leaf node of Decision Tree (Yes in step A5), the processing is terminated, and the optimal rule selected so far is set as the final solution.
 続いて、図10に示すフィールドX、Yから構成されるルールセットにおいて、X=1001、Y=1111をもつパケットに対して、本発明における基本的なパケット分類方法を用いてパケット分類を行う場合について説明する。なお、以下の例では、図9のステップA2におけるParallel BV処理は、非特許文献2に記載の手法をベースにするものとする。図10は、図1のルールセットと同様、それぞれ4bitsから構成される2つのフィールドX、Yを用いて定義されたR0からR19までの20個のルールからなるルールセットの例を示す図である。なお、フィールドX、Yは、それぞれ4bitsとしているが、例えば送信元IPアドレスや送信元ポート番号等、実際のパケットヘッダフィールドに相当するものであり、フィールドX、Yの表記方法や優先度、Actionの取り扱いについては図1と同様であるため、ここではその説明を省略する。また、図11は、図10に示すルールセットを、フィールドX、Yの2次元から成る空間上に示した図であり、図12は、図10に示すルールセットを、本発明における基本的なパケット分類方法で構築したDecision Treeの一例である。但し、図12のDecision Treeにおける閾値L(ルールIDリストに含むことが可能なルール数)は2としている。 Subsequently, in the rule set including the fields X and Y shown in FIG. 10, packet classification is performed using the basic packet classification method of the present invention for a packet having X = 1001 and Y = 1111. Will be described. In the following example, the Parallel BV process in step A2 in FIG. 9 is based on the technique described in Non-Patent Document 2. FIG. 10 is a diagram illustrating an example of a rule set including 20 rules R0 to R19 defined using two fields X and Y each including 4 bits, as in the rule set of FIG. . Although the fields X and Y are each 4 bits, they correspond to actual packet header fields such as a source IP address and a source port number, for example, and the notation method, priority, and action of the fields X and Y Since handling is the same as in FIG. 1, the description thereof is omitted here. FIG. 11 is a diagram showing the rule set shown in FIG. 10 on a two-dimensional space of fields X and Y. FIG. 12 shows the rule set shown in FIG. It is an example of Decision Tree constructed by a packet classification method. However, the threshold L (the number of rules that can be included in the rule ID list) in the Decision Tree in FIG.
 本発明における基本的なパケット分類方法では、まず、Decision Treeの根ノードであるノード0を処理ノードとし、処理を開始する(ステップA1)。ノード0のルールリストにはR7とR8が含まれるため、ルールIDリストは(R7、R8)であり、フィールドX、Yに対するBVは、それぞれ“10”、“01”となる。ここで、図13aは、ノード0のルールリストを2次元空間上に示し、かつ、フィールドX、Yに対するBVを示した図である。図13aより、ノード0におけるフィールドX、Yに対するBVはそれぞれ“10”、“01”になることが分かる。続いて、取得した上記のBVのビット単位のANDを取り、処理ノード0における最終BV“00”を得る(以上、ステップA2)。この結果から、本処理ノードまでの最適解は無く、適合ルールは存在しないと判断できる(ステップA3)。次に、ノード0における領域分割情報を読み出す(ステップA4)。本例では、詳細な領域分割情報を図示しないが、図12の各ノード内に領域分割に用いるフィールドX、Yに対する分割数を図示している。また、ノード5からノード7、及びノード9からノード14のLeaf Flagは1、つまり葉ノードであるとし、それ以外のLeaf Flagは全て0、つまり葉ノードでないとする。さらに、Virtual Flagは全て0、つまり、全ノード共に実ノードであるものとする。ノード0の領域分割情報から、ノード0はDecision Treeの葉ノードではないと判断できるため(ステップA5のNo)、領域分割を行い、次の子ノードを選択し、処理ノードとする(ステップA6)。この場合、フィールドX、Yに対する分割数kとしてそれぞれ1が指定されており、各フィールドの有効ビット長はそれぞれ4であるため、検索キーのフィールドX、Yの有効ビットに対する先頭ビットを連結した“11”にBase Addressを加算することで、次の処理ノードであるノード4の領域分割情報が格納されているメモリアドレス値を決定する。最後に、有効ビット長をそれぞれ分割数である1ずつ減じることで、有効ビット長の更新を行う(ステップA7)。 In the basic packet classification method in the present invention, first, the node 0 which is the root node of the Decision Tree is set as a processing node, and processing is started (step A1). Since the rule list of node 0 includes R7 and R8, the rule ID list is (R7, R8), and the BVs for fields X and Y are “10” and “01”, respectively. Here, FIG. 13a is a diagram showing the rule list of the node 0 in the two-dimensional space and showing the BV for the fields X and Y. From FIG. 13a, it can be seen that the BVs for the fields X and Y at node 0 are "10" and "01", respectively. Subsequently, the bitwise AND of the acquired BV is taken to obtain the final BV “00” in the processing node 0 (step A2). From this result, it can be determined that there is no optimal solution up to this processing node and no matching rule exists (step A3). Next, the area division information at node 0 is read (step A4). In this example, detailed area division information is not shown, but the number of divisions for fields X and Y used for area division is shown in each node of FIG. In addition, it is assumed that the Leaf Flag from the node 5 to the node 7 and the node 9 to the node 14 is 1, that is, a leaf node, and the other Leaf Flags are all 0, that is, not a leaf node. Further, it is assumed that the virtual flags are all 0, that is, all nodes are real nodes. Since it can be determined from the area division information of node 0 that node 0 is not a leaf node of the decision tree (No in step A5), area division is performed, and the next child node is selected to be a processing node (step A6). . In this case, since 1 is designated as the division number k for the fields X and Y, and the effective bit length of each field is 4, the leading bits for the effective bits of the fields X and Y of the search key are concatenated. By adding Base Address to 11 ″, the memory address value in which the area division information of the node 4, which is the next processing node, is stored is determined. Finally, the effective bit length is updated by reducing the effective bit length by 1, which is the number of divisions (step A7).
 続いて、次の処理ノードであるノード4のルールリストには、R13が含まれるため、ルールIDリストは(R13、NULL)であり、フィールドX、Yの有効ビットである“111”と“001”に対するBVは、それぞれ“10”、“00”となる。ここで、図13bは、ノード4のルールリストを2次元空間上に示し、かつ、フィールドX、Yに対するBVを示した図である。なお、ノード4ではフィールドX、Yに対する有効ビット長がそれぞれ3であるため、有効ビットである下位3bitに対するBVが用意されており、有効ビットでない領域部分は塗りつぶしている。図13bより、ノード4におけるフィールドX、Yに対するBVはそれぞれ“10”、“00”になることが分かる。取得した上記のBVのビット単位のANDを取り、処理ノード4における最終BV“00”を得る(ステップA2)。この結果、ノード4までの処理において適合しているルールは存在しないことが分かる(ステップA3)。次に、ノード4の領域分割情報を読み出す(ステップA4)。ノード4はDecision Treeの葉ノードではないため(ステップA5のNo)、領域分割を行い、次の処理ノードを選択する(ステップA6)。この場合、フィールドX、Yに対する分割数としてそれぞれ1が指定されており、各フィールドの有効ビット長はそれぞれ3であるため、検索キーのフィールドX、Yの有効ビットである“001”、“111”に対する先頭ビットを連結した“01”にBase Addressを加算することで、次の処理ノードであるノード8の領域分割情報が格納されているメモリアドレス値を決定する。最後に、有効ビット長をそれぞれ1ずつ減じる(ステップA7)。 Subsequently, since R13 is included in the rule list of the node 4, which is the next processing node, the rule ID list is (R13, NULL), and "111" and "001" which are valid bits of the fields X and Y BV for "" is "10" and "00", respectively. Here, FIG. 13B is a diagram showing the rule list of the node 4 in a two-dimensional space and showing BVs for the fields X and Y. Since the effective bit length for the fields X and Y is 3 at the node 4, BVs for the lower 3 bits that are effective bits are prepared, and the area portions that are not effective bits are filled. From FIG. 13b, it can be seen that the BVs for the fields X and Y at the node 4 are "10" and "00", respectively. The obtained BV is bitwise ANDed to obtain the final BV “00” in the processing node 4 (step A2). As a result, it can be seen that there is no matching rule in the processing up to the node 4 (step A3). Next, the area division information of the node 4 is read (step A4). Since the node 4 is not a leaf node of the Decision Tree (No in Step A5), the area is divided and the next processing node is selected (Step A6). In this case, 1 is designated as the number of divisions for the fields X and Y, and the effective bit length of each field is 3, so that the effective bits of the search key fields X and Y are “001” and “111”. By adding Base Address to “01” obtained by concatenating the leading bits for “,” the memory address value in which the area division information of the next processing node, node 8, is stored is determined. Finally, the effective bit length is decreased by 1 (step A7).
 同様に、ノード8のルールリストには、R17とR18が含まれるため、ルールIDリストは(R17、R18)であり、フィールドX、Yの有効ビットである“01”と“11”に対するBVは、それぞれ“11”、“11”となる。ここで、図13cは、ノード8のルールリストを2次元空間上に示し、かつ、フィールドX、Yに対するBVを示した図である。なお、ノード8ではフィールドX、Yに対する有効ビット長がそれぞれ2であるため、有効ビットである下位2bitに対するBVが用意されており、有効ビットでない領域部分は塗りつぶしている。取得した上記のBVのビット単位のANDを取り、処理ノード8における最終BV“11”を得る(ステップA2)。この場合、ノード8において適合するルールはR17とR18であり、それ以前の処理ノード(ノード0とノード4)においては適合ルールが存在しないことから、R17とR18の優先度を確認し、高優先度のルールを最適解とする(図10のルールセットには省略しているが、ルールセットに含まれる各ルールには個別の優先度が設定されているものとする)。次に、ノード8の領域分割情報を読み出し(ステップA4)、ノード8はDecision Treeの葉ノードではないことが分かるため(ステップA5のNo)、領域分割を行い、次の処理ノードを選択する(ステップA6)。この場合、フィールドX、Yに対する分割数としてそれぞれ1が指定されており、各フィールドの有効ビット長はそれぞれ2であるため、検索キーのフィールドX、Yの有効ビットである“01”、“11”に対する先頭ビットを連結した“01”にBase Addressを加算することで、次の処理ノードであるノード12の領域分割情報に対するメモリアドレス値を決定する。最後に、有効ビット長をそれぞれ1ずつ減じる(ステップA7)。 Similarly, since the rule list of node 8 includes R17 and R18, the rule ID list is (R17, R18), and the BV for the valid bits “01” and “11” of fields X and Y is , “11” and “11”, respectively. Here, FIG. 13c is a diagram showing the rule list of the node 8 in a two-dimensional space and showing BVs for the fields X and Y. Note that since the effective bit length for the fields X and Y is 2 at the node 8, BVs for the lower 2 bits that are effective bits are prepared, and the area portions that are not effective bits are filled. The obtained BV is bitwise ANDed to obtain the final BV “11” in the processing node 8 (step A2). In this case, the matching rules at node 8 are R17 and R18, and there is no matching rule at the previous processing nodes (node 0 and node 4), so the priority of R17 and R18 is confirmed and high priority is given. The rule of degree is the optimal solution (although it is omitted in the rule set of FIG. 10, it is assumed that individual priority is set for each rule included in the rule set). Next, the area division information of the node 8 is read (step A4), and it can be seen that the node 8 is not a leaf node of the Decision Tree (No in step A5), so the area is divided and the next processing node is selected ( Step A6). In this case, 1 is designated as the number of divisions for the fields X and Y, and the effective bit length of each field is 2, so that the effective bits of the search key fields X and Y are “01” and “11”. By adding Base Address to “01” obtained by concatenating the leading bits for “,” the memory address value for the area division information of the node 12 that is the next processing node is determined. Finally, the effective bit length is decreased by 1 (step A7).
 さらに同様に、ノード12のルールリストには、R3が含まれるため、ルールIDリストは(R3、NULL)であり、フィールドX、Yの有効ビットである“1”と“1”に対するBVは、それぞれ“00”、“00”となる。ここで、図13dは、ノード12のルールリストを2次元空間上に示し、かつ、フィールドX、Yに対するBVを示した図である。なお、ノード12ではフィールドX、Yに対する有効ビット長がそれぞれ1であるため、有効ビットである下位1bitに対するBVが用意されており、有効ビットでない領域部分は塗りつぶしている。取得した上記のBVのビット単位のANDを取り、処理ノード12における最終BV“00”を得る(ステップA2)。この結果、ノード12における適合ルールは存在せず、これまでの処理ノードにおける最適ルールであるR17、もしくはR18が最適ルールであると判断できる(ステップA3)。次に、ノード12の領域分割情報を読み出し(ステップA4)、ノード12はDecision Treeの葉ノードであることが分かるため(ステップA5のYes)、処理を終了し、現在の最適ルールであるR17、もしくはR18を最終的な解とする。 Similarly, since the rule list of the node 12 includes R3, the rule ID list is (R3, NULL), and the BVs for the valid bits “1” and “1” of the fields X and Y are They are “00” and “00”, respectively. Here, FIG. 13d is a diagram showing the rule list of the node 12 in a two-dimensional space and showing BVs for the fields X and Y. Since the effective bit length for each of the fields X and Y is 1 at the node 12, a BV for the lower 1 bit that is an effective bit is prepared, and an area portion that is not an effective bit is filled. The obtained BV bitwise AND is taken to obtain the final BV “00” in the processing node 12 (step A2). As a result, there is no matching rule in the node 12, and it can be determined that R17 or R18, which is the optimal rule in the processing node so far, is the optimal rule (step A3). Next, the region division information of the node 12 is read (step A4), and since the node 12 is found to be a leaf node of the Decision Tree (Yes in step A5), the processing is terminated and the current optimum rule R17, Or let R18 be the final solution.
 なお、上記の図10のルールセットの例では、ルールはフィールドXとYの2つのフィールドを用いてしか定義されていなかったが、本発明における基本的なパケット分類方法では、より多くのフィールドを用いてルールを定義することが可能である。この場合、上述したように、図7のようなデータ構造を用いて、Decision Treeの各ノードにおいて領域分割するフィールド、及びその分割数を指定する。
[発明の実施の形態]
 上記の本発明における基本的なパケット分類方法を踏まえ、下記に本発明の実施の形態とその動作について説明する。
In the example of the rule set shown in FIG. 10, the rule is defined only using the two fields X and Y. However, in the basic packet classification method according to the present invention, more fields are defined. Can be used to define rules. In this case, as described above, using the data structure as shown in FIG. 7, the field to be divided and the number of divisions are specified in each node of the Decision Tree.
[Embodiment of the Invention]
Based on the basic packet classification method in the present invention described above, an embodiment of the present invention and its operation will be described below.
(1)第1の実施の形態
(1-1)第1の実施の形態の構成
 まず、本発明の第1の実施の形態について図面を参照して説明する。
(1) First Embodiment (1-1) Configuration of First Embodiment First, a first embodiment of the present invention will be described with reference to the drawings.
 図14は、本発明の第1の実施の形態のパケット分類器を示すブロック図である。図14を参照すると、本発明の第1の実施の形態のパケット分類器1は、ハードウェア回路として実現されるものであり、入力2として検索キーを入力し、出力3として最適ルールのルールIDを出力する。 FIG. 14 is a block diagram illustrating the packet classifier according to the first embodiment of this invention. Referring to FIG. 14, the packet classifier 1 according to the first exemplary embodiment of the present invention is realized as a hardware circuit. A search key is input as an input 2 and a rule ID of an optimal rule is output as an output 3. Is output.
 パケット分類器1は、Tree Pipeline(ツリーパイプライン処理回路)10と、Priority Pipeline(プライオリティパイプライン処理回路)20と、を備えている。 The packet classifier 1 includes a tree pipeline (tree pipeline processing circuit) 10 and a priority pipeline (priority pipeline processing circuit) 20.
 Tree Pipeline10は、パイプライン構造となっており、本発明のパケット分類を行うにあたり、Decision Treeを辿る処理を実行する。Tree Pipeline10は、Tree Pipeline Stage(ツリーパイプライン処理部)10-1、Tree Pipeline Stage10-2、Tree Pipeline Stage10-3、・・・、Tree Pipeline Stage10-HのH段のパイプラインステージから構成されている。ここで、Hは、Dicision Treeの高さ(深さ)に相当するものであり、本実施の形態では、高さがH以下であるDicision Treeを構成し、用いるものとする。 The Tree Pipeline 10 has a pipeline structure, and executes the process of tracing the Decision Tree when performing packet classification of the present invention. Tree Pipeline 10 is an H-stage pipeline consisting of Tree Pipeline Stage (Tree Pipeline Processing Unit) 10-1, Tree Pipeline Stage 10-2, Tree Pipeline Stage 10-3, ..., Pipe Pipeline Stage 10-H. Yes. Here, H is equivalent to the height (depth) of the Division Tree, and in this embodiment, the Division Tree having a height of H or less is configured and used.
 図15は、本発明の第1の実施の形態におけるDecision Treeにおける各ノードのTree Pipeline Stageへのマッピング例を示す図である。例えば、ノード0からノード14の15個のノードから構成される高さ4のDecision Treeにおいては、非特許文献2におけるTree Pipelineと同様、基本的には同一の深さ(これをレベルと呼ぶ)のノードは、Tree Pipelineにおける同一のステージに配置される。但し、あるレベルのノードは、そのレベル以降のステージに配置されても良く、例えばノード10は、深さ3であるが、Tree Pipeline Stage#3ではなく、それ以降のレベルであるTree Pipeline Stage#4に配置している。なお、ノードの配置とは、図7に示すような当該ノードの領域分割情報の配置を意味し、各Tree Pipeline Stageに具備されるメモリ等の記憶媒体上に領域分割情報を保持されることを意味する。このような配置方法は、Tree Pipeline Stageにおける領域分割情報を記憶するメモリのワード数と、後述するPriority Pipeline Stage(プライオリティパイプライン処理部)において実現できるルールリスト数、つまり、BVを記憶するメモリのワード数と、が一対一に対応しなくても良いという柔軟性を持たせるためであり、詳細については非特許文献2に記載されているため、ここでは説明を省略する。 FIG. 15 is a diagram illustrating a mapping example of each node to the Tree Pipeline Stage in the Decision Tree according to the first embodiment of this invention. For example, a decision tree of height 4 composed of 15 nodes from node 0 to node 14 is basically the same depth (referred to as a level), as in the case of Tree Pipeline in Non-Patent Document 2. Are placed on the same stage in Tree Pipeline. However, a node at a certain level may be arranged in a stage after that level. For example, the node 10 has a depth of 3, but is not a Pipe Pipeline Stage # 3 but a Pipe Pipeline Stage # that is a level after that. 4 is arranged. The node arrangement means the arrangement of the area division information of the node as shown in FIG. 7, and means that the area division information is held on a storage medium such as a memory provided in each Tree Pipeline Stage. means. Such an arrangement method is based on the number of words in the memory storing the area division information in the Tree Pipeline Stage and the number of rule lists that can be realized in the Priority Pipeline Stage (priority pipeline processing unit) described later, that is, in the memory storing the BV. This is to give the flexibility that the number of words does not have to correspond one-to-one, and details are described in Non-Patent Document 2, and thus the description thereof is omitted here.
 図16は、本発明の第1の実施の形態におけるTree Pipeline Stageの構成を示すブロック図である。図16を参照すると、本発明におけるTree Pipeline Stage10-1から10-Hの各々は、当該ステージにて処理を行うノードにおける領域分割処理を行い、さらにその結果として、次ノードの領域分割情報が含まれる次ステージのアドレス値を決定する領域分割回路100と、前ステージから指定されたアドレス値にある当該処理ノードの領域分割情報を読み出すためのMemory Controller(メモリコントローラ)101と、当該ステージに配置されたDecision Treeのノードの領域分割情報を記憶している、メモリ等の記憶媒体で構成される領域分割情報記憶ブロック102と、検索キーの有効ビット長を更新する有効ビット更新長回路103と、当該ステージに入力された検索キーに、ある一定の遅延を持たせ、他の出力と同期させるための検索キー遅延回路104と、を備える。 FIG. 16 is a block diagram showing the configuration of the Tree Pipeline Stage in the first embodiment of the present invention. Referring to FIG. 16, each of the Pipe Pipeline Stages 10-1 to 10-H according to the present invention performs region division processing at a node that performs processing at the stage, and as a result, includes region division information of the next node. The area division circuit 100 for determining the address value of the next stage, the memory controller 101 for reading the area division information of the processing node at the address value designated from the previous stage, and the stage are arranged. A region division information storage block 102 formed of a storage medium such as a memory that stores region division information of a node of the Decision Tree, a valid bit update length circuit 103 that updates a valid bit length of a search key, and Search key entered on stage Provided to have a certain delay, the search key delay circuit 104 to synchronize with other outputs, the.
 各Tree Pipeline Stageには、前段のTree Pipeline Stageから、被検索対象である検索キーと、その有効ビット長と、当該Tree Pipeline Stageでの処理対象となるノードの領域分割情報が保持される領域分割情報記憶ブロック102のアドレス値が入力される。入力された検索キーは、領域分割回路100と検索キー遅延回路104とに入力される。なお、ここで検索キーは、本パケット分類器が対象とするルールに含まれるパケットヘッダフィールド情報が全て含まれたビット列として構成され、各フィールドが構成されるビット長等の情報は予め回路上に設定されており、本パケット分類器では、一意に当該フィールドを参照したり、切り出したりすることが可能であるものとする。また、入力された有効ビット長は、領域分割回路100と有効ビット長更新回路103に入力される。なお、ここで有効ビット長は、検索キーに含まれるパケットヘッダフィールドのうち、予め設定され、領域分割情報に示される本パケット分類器で領域分割に利用するパケットヘッダフィールドを対象に、そのフィールド毎に、有効ビット長を表したビット列として構成される。最後に、アドレス値は、Memory Controller101に入力される。なお、Tree Pipeline Stage10-1では、上述した検索キーは、パケット分類器1への入力2として与えられる。また、有効ビット長は各ヘッダフィールドの長さそのもの、つまり全て有効であるとして指定され、アドレス値は、Decision Treeの根ノードの領域分割情報が格納されている領域分割情報記憶ブロック102のアドレス値が指定されるものとし、これらは入力2として指定されても良いし、パケット分類器1の内部で指定されても良い。 In each Tree Pipeline Stage, the area division that holds the search key that is the search target, its effective bit length, and the area division information of the node that is the processing target in the Tree Pipeline Stage, from the previous Pipe Pipeline Stage The address value of the information storage block 102 is input. The input search key is input to the area dividing circuit 100 and the search key delay circuit 104. Here, the search key is configured as a bit string including all packet header field information included in the rule targeted by this packet classifier, and information such as the bit length of each field is preliminarily stored on the circuit. It is assumed that this packet classifier can uniquely refer to or cut out the field. The input effective bit length is input to the area dividing circuit 100 and the effective bit length update circuit 103. Here, the effective bit length is set for each packet header field that is set in advance in the packet header field included in the search key and is used for region division by this packet classifier indicated in the region division information. And a bit string representing the effective bit length. Finally, the address value is input to the Memory Controller 101. In Tree Pipeline Stage 10-1, the search key described above is given as an input 2 to the packet classifier 1. The effective bit length is specified as the length of each header field itself, that is, all are valid, and the address value is the address value of the area division information storage block 102 in which the area division information of the root node of the Decision Tree is stored. Are designated as input 2, or may be designated within the packet classifier 1.
 アドレス値が入力されたMemory Controller101は、領域分割情報記憶ブロック102に対して指定されたアドレス値に記憶されている図7に示すような領域分割情報を読み出し、それを領域分割回路100と有効ビット長更新ブロック103に出力する。 The memory controller 101 to which the address value has been input reads the area division information as shown in FIG. 7 stored in the address value designated for the area division information storage block 102, and reads it out with the area division circuit 100 and the effective bit. Output to the long update block 103.
 有効ビット長更新ブロック103は、入力された有効ビット長と、領域分割情報から、有効ビット長を更新する。具体的に、領域分割情報には、本パケット分類器で領域分割に利用するヘッダフィールド毎に分割数kが指定されているが、有効ビット長更新ブロック103は、入力された有効ビット長から、この分割数kを減算することで更新し、更新した有効ビット長を後段のTree Pipeline Stageへと出力する。 The effective bit length update block 103 updates the effective bit length from the input effective bit length and the region division information. Specifically, in the region division information, the division number k is designated for each header field used for region division by this packet classifier, but the effective bit length update block 103 is obtained from the input effective bit length, It is updated by subtracting the number of divisions k, and the updated effective bit length is output to the tree pipeline stage at the subsequent stage.
 検索キー遅延回路104は、入力された検索キーをレジスタ等を用いてある一定間隔遅延させ、有効ビット長更新回路103から出力される有効ビット長や、後述する領域分割回路100から出力されるアドレス値と同タイミングで検索キーを出力する。 The search key delay circuit 104 delays the input search key by a predetermined interval using a register or the like, and an effective bit length output from the effective bit length update circuit 103 or an address output from the area dividing circuit 100 described later. The search key is output at the same timing as the value.
 図17は、本発明の第1の実施の形態における領域分割回路100の構成を示すブロック図である。図17を参照すると、領域分割回路100は、入力された領域分割情報から、領域分割に用いるヘッダフィールド毎にその分割数を切り出す領域分割情報分離回路1000と、マルチプレクサ1001と、フィールド分割回路100-1、100-2、・・・、100-Cと、ORゲート1002と、加算器1003と、を含む。 FIG. 17 is a block diagram showing a configuration of the area dividing circuit 100 according to the first embodiment of the present invention. Referring to FIG. 17, the area division circuit 100 includes an area division information separation circuit 1000 that extracts the number of divisions for each header field used for area division from the input area division information, a multiplexer 1001, and a field division circuit 100-. 1, 100-2,..., 100-C, an OR gate 1002, and an adder 1003.
 領域分割回路100に入力された領域分割情報は、領域分割情報分離回路1000に入力される。領域分割情報は図7に示すような情報から構成されるが、領域分割情報分離回路1000では、これらの各種情報をそれぞれ切り出し、各情報を利用する回路へ出力する。例えば、Virtual Flagはマルチプレクサ1001へ、C個のフィールドに対する分割数は、それぞれフィールド分割回路100-1から100-Cへ、Base Addressは加算器1003へと出力する。また、領域分割回路100に入力された検索キーと有効ビット長は、各フィールドに応じて当該フィールドを処理するフィールド分割回路へと入力される。なお、ここでは、複数フィールドが束になっている検索キーや有効ビット長データそのものを各フィールド分割回路に入力し、回路内で担当するフィールドのデータを切り出しても良いし、入力された時点で各フィールドのデータを切り出し、各フィールド分割回路に入力させても良い。 The area division information input to the area division circuit 100 is input to the area division information separation circuit 1000. The area division information is composed of information as shown in FIG. 7, but the area division information separation circuit 1000 cuts out each of these pieces of information and outputs the information to a circuit that uses the information. For example, the Virtual Flag is output to the multiplexer 1001, the number of divisions for the C fields is output from the field division circuits 100-1 to 100-C, and the Base Address is output to the adder 1003. The search key and effective bit length input to the area dividing circuit 100 are input to the field dividing circuit that processes the field according to each field. Here, a search key in which a plurality of fields are bundled or effective bit length data itself may be input to each field division circuit, and the field data in charge within the circuit may be cut out. Data of each field may be cut out and input to each field dividing circuit.
 ORゲート1002は、後述する各フィールド分割回路の出力結果の論理和(OR)を取り、加算器1003に入力する。 The OR gate 1002 takes a logical sum (OR) of the output results of each field dividing circuit described later and inputs the result to the adder 1003.
 加算器1003は、領域分割情報に含まれるBase AddressとORゲート1002の出力結果を加算し、それを後段のTree Pipeline Stageで処理する子ノードの領域分割情報のアドレス値として出力する。 The adder 1003 adds the Base Address included in the area division information and the output result of the OR gate 1002, and outputs the result as the address value of the area division information of the child node processed in the subsequent Pipe Pipeline Stage.
 図18は、本発明の第1の実施の形態におけるフィールド分割回路の構成を示すブロック図である。図18を参照すると、フィールド分割回路は、減算器1004と、Right Shifter1005と、加算器1006と、Left Shifter1007と、を備える。 FIG. 18 is a block diagram showing the configuration of the field dividing circuit in the first embodiment of the present invention. Referring to FIG. 18, the field division circuit includes a subtracter 1004, a right shifter 1005, an adder 1006, and a left shifter 1007.
 フィールド分割回路に入力された有効ビット長と領域分割情報の分割数は、減算器1004へ入力され、有効ビット長から分割数を減算される。この結果は、Right Shifter1005へ出力され、Right Shifter1005は、入力された検索キーの当該フィールドを、減算器1004の結果の値だけ右にシフトさせる。一方、下段のフィールド分割回路から入力された値と、分割数は加算器1006にて加算され、その結果はLeft Shifter1007、及び上段のフィールド分割回路へと出力される。なお、フィールド分割回路100-1では、下段から加算器1006へ入力される値は0である。また、ここでは、各フィールド分割回路の加算器1006は、下段のフィールド分割回路からの加算結果に、入力された分割数を加算しているが、下段の結果を用いず、それまでに加算すべき分割数を全て加算器1006で加算しても良い。Left Shifter1007では、Right Shifter1005の結果を加算器1006の結果の値だけ左にシフトさせ、その結果をORゲート1002へ出力する。 The effective bit length input to the field division circuit and the division number of the area division information are input to the subtractor 1004, and the division number is subtracted from the effective bit length. This result is output to the Right Shifter 1005, and the Right Shifter 1005 shifts the field of the input search key to the right by the value of the result of the subtractor 1004. On the other hand, the value input from the lower field division circuit and the division number are added by an adder 1006, and the result is output to the Left Shifter 1007 and the upper field division circuit. In the field division circuit 100-1, the value input to the adder 1006 from the lower stage is zero. Here, the adder 1006 of each field division circuit adds the number of divisions input to the addition result from the lower field division circuit, but does not use the lower result and adds up to that point. All the power division numbers may be added by the adder 1006. The left shifter 1007 shifts the result of the right shifter 1005 to the left by the value of the result of the adder 1006, and outputs the result to the OR gate 1002.
 上記の結果、ORゲート1002で各フィールド分割回路の結果の論理和をとることで、領域分割情報で指定された分割に用いるフィールドに対し、そのフィールドの有効ビットの先頭kビットを切り出し、領域分割に用いる各フィールドの分割数に応じて、次ノードの相対的なアドレス値を決定することが可能となる。そして、加算器1003にてBase Addressとこの相対的なアドレス値を加算することにより、後段のTree Pipeline Stageにおける次ノードの領域分割情報が記憶されているアドレス値を指定することが可能となる。 As a result, the OR gate 1002 calculates the logical sum of the results of the field division circuits, and for the field used for the division specified by the region division information, the first k bits of the effective bits of the field are cut out and the region division is performed. It is possible to determine the relative address value of the next node according to the number of divisions of each field used for. Then, by adding the Base Address and this relative address value in the adder 1003, it is possible to specify an address value in which the area division information of the next node in the subsequent Pipe Pipeline Stage is stored.
 ここで、領域分割情報のVirtual Flagの利用について説明する。本パケット分類器では、上述したように、非特許文献2と同様、基本的には同一の深さのノードは、Tree Pipelineにおける同一のステージに配置されるが、あるレベルのノードはそのレベル以降のステージに配置されても良い。本パケット分類器では、このような場合、図19に示すように仮想ノード(Virtual Node)を用いてこれを実現する。図19は、本発明の第1の実施の形態におけるVirtual Nodeの例を示す図である。図19は、ノード4の子ノードであるノード10は本来ノード4の次のTree Pipeline Stageに配置されるが、ここではさらに1ステージ後段のTree Pipeline Stageに配置されている。この場合、ノード4において後段の子ノードであるノード7、8、9、10のアドレス値が計算されるが、ノード4においては、ノード7の領域分割情報が記憶されたアドレスをBase Addressとして計算する。一方、ノード10が実際に配置されているTree Pipeline Stageにおいては、例えばノード11からノード14のように、他のノードが配置されているため、ノード4においてBase Addressから算出したアドレス値として、ノード10のアドレス値を確定することは困難である。このため、このように本来配置されるべきステージと異なるステージに配置される場合には、Virtual Nodeを配置する。図19では、ノード10のVirtual NodeとしてノードV0が配置されている。ノードV0は実ノードではないため、ルールリストを具備していない。つまり、Priority Pipeline StageにてBVを記憶する必要がなく、この結果、非特許文献2のように、Tree Pipeline Stageにおけるメモリワード数を増加させ、より柔軟にDecision Treeをマッピングさせることが可能となる。この場合、ノード4では、領域分割回路100において上述したような処理を行うことで、その子ノードであるノード7、8、9、V0の領域分割情報が記憶されたアドレス値を確定することができる。ノード4の次ノードがノード10であった場合、ノード4の後段のTree Pipeline Stageでは、ノードV0が指定され、その領域分割情報を読み出し、同様の領域分割処理を行う。この際、ノードV0の領域分割情報では、Virtual Flagが‘1’となっているため、マルチプレクサ1001にて、各フィールド分割回路に入力される分割情報は0となる。この結果、ORゲート1002の出力は0となり、加算器1003からの出力はBase Addressと等しいアドレス値となる。Virtual Nodeの領域分割情報のBase Addressには、その子ノードであるノード10のアドレス値が保持されているため、上述した処理を行うことで問題なくノード10のアドレス値を指定することが可能となる。なお、あるノードの子ノードが複数のTree Pipeline Stageをあけて配置される場合も同様であり、途中のTree Pipeline StageではVirtual Nodeが配置されることになる。 Here, the use of the virtual flag of the area division information will be described. As described above, in this packet classifier, as in the case of Non-Patent Document 2, the nodes having the same depth are basically arranged at the same stage in the Tree Pipeline. It may be arranged on the stage. In this case, the packet classifier realizes this using a virtual node (Virtual Node) as shown in FIG. FIG. 19 is a diagram illustrating an example of the Virtual Node according to the first embodiment of this invention. In FIG. 19, the node 10, which is a child node of the node 4, is originally arranged in the Tree Pipeline Stage next to the node 4, but here is further arranged in the Tree Pipeline Stage one stage after. In this case, the node 4 calculates the address values of the subsequent nodes 7, 8, 9, and 10, but the node 4 calculates the address where the area division information of the node 7 is stored as Base Address. To do. On the other hand, in the Pipe Pipeline Stage where the node 10 is actually arranged, since other nodes are arranged, for example, from the node 11 to the node 14, the address value calculated from the Base Address in the node 4 is the node value. It is difficult to determine 10 address values. For this reason, when arrange | positioning in the stage different from the stage which should be arrange | positioned originally in this way, Virtual Node is arrange | positioned. In FIG. 19, the node V <b> 0 is arranged as the virtual node of the node 10. Since the node V0 is not a real node, it does not have a rule list. In other words, there is no need to store BV in Priority Pipeline Stage. As a result, as in Non-Patent Document 2, it is possible to increase the number of memory words in Tree Pipeline Stage and map the Decision Tree more flexibly. . In this case, the node 4 can determine the address value in which the area division information of the nodes 7, 8, 9, and V0 that are the child nodes is stored by performing the above-described processing in the area division circuit 100. . When the next node of the node 4 is the node 10, the node Pipe 0 in the subsequent stage of the node 4 designates the node V 0, reads the area division information, and performs the same area division processing. At this time, in the area division information of the node V0, since the virtual flag is “1”, the division information input to each field division circuit by the multiplexer 1001 is zero. As a result, the output of the OR gate 1002 becomes 0, and the output from the adder 1003 has an address value equal to Base Address. Since the address value of the node 10 that is the child node is held in the Base Address of the area division information of the Virtual Node, it is possible to specify the address value of the node 10 without any problem by performing the above-described processing. . The same applies to a case where a child node of a certain node is arranged with a plurality of Tree Pipeline Stages open, and a Virtual Node is arranged in the middle Pipe Pipeline Stage.
 さらに、Virtual Nodeを用いて本来配置されるTree Pipeline Stage以降のステージに配置されるノードについて補足する。図20は、本発明の第1の実施の形態におけるVirtual Nodeの領域分割情報の配置例を示す図である。Tree Pipeline Stageの領域分割情報記憶ブロック102のワード数をW、Priority Pipeline StageにおけるBit Vectorを記憶させることができるワード数をWとする(ここでのワード数とは、ノード数を意味するものとする。つまり、Tree Pipeline Stageには実ノード、仮想ノードを含めてWノード分、Priority Pipeline Stageには、Wノード分のBVを記憶することができるものとする)。この場合、Tree Pipeline StageにおけるWノードのうち、Wノードが実ノードとなり、ルールIDリストを持つことができる。このため、本発明では、あるノードの複数の子ノード毎にアドレス値0から順に詰めて領域分割情報記憶ブロック102に記憶させ、Wノードを越えたノードを本来配置されるTree Pipeline Stage以降のステージに配置する方針を取る。つまり、Virtual Nodeを子ノードとしてもつノードは、その子ノード全てがVirtual Nodeであるか、子ノードのうち、ノードIDが小さいいくつかのノードが実ノードであり、ノードIDが大きないくつかのノードは全てVirtual Nodeであるものとする。 Furthermore, it supplements about the node arrange | positioned in the stage after Tree Pipeline Stage originally arrange | positioned using Virtual Node. FIG. 20 is a diagram illustrating an arrangement example of the area division information of the Virtual Node according to the first embodiment of this invention. Tree Pipeline Stage Segmentation information the number of words W T of the storage block 102, and the number of words that the number of words that can be stored Bit Vector of Priority Pipeline Stage and W P (here, means the number of nodes and things. that is, the actual node in the Tree Pipeline Stage, W T node content including virtual nodes, the Priority Pipeline Stage, which shall be able to store the W P nodes worth of BV). In this case, one of the W T node in the Tree Pipeline Stage, W P node is a real node, can have a rule ID list. Therefore, in the present invention, from the address value 0 for each of a plurality of child nodes of a node packed in order to be stored in the area division information storage block 102, the Tree Pipeline Stage later placed originally nodes beyond the W P node Take a policy of placing on stage. In other words, nodes that have a Virtual Node as a child node are all virtual nodes, or among the child nodes, some nodes with a small node ID are real nodes, and some nodes with a large node ID are All virtual nodes are assumed to be used.
 上記のようなTree Pipelineの構成については、非特許文献2にも開示されているが、非特許文献2で開示されている構成では、有効ビットが考慮されていない上、Base Addressに分割した結果のアドレス値を加算していないため、適切なアドレス設定が難しいと考えられる。また、あるノードの子ノードを複数ステージあけて配置した場合、非特許文献2では、Distance Valueと呼ばれるカウンタを用いてそれを把握していたが、本実施の構成では、1bitのフラグを用いてこれを構成している点が異なる。 The configuration of Tree Pipeline as described above is also disclosed in Non-Patent Document 2. However, in the configuration disclosed in Non-Patent Document 2, the effective bit is not taken into account and the result is divided into Base Address. Since the address values are not added, it is considered difficult to set an appropriate address. In addition, when a child node of a certain node is arranged with a plurality of stages open, in Non-Patent Document 2, it is grasped using a counter called Distance Value, but in this configuration, a 1-bit flag is used. This is different.
 続いて、パケット分類器1に含まれるPriority Pipeline20は、パイプライン構造となっており、本発明のパケット分類を行うにあたってのBVの選択、及び最適解の選択に関わる処理を実行する。Priority Pipeline20は、Priority Pipeline Stage20-0、Priority Pipeline Stage20-1、Priority Pipeline Stage20-2、・・・、Priority Pipeline Stage20-(H-1)、Priority Pipeline Stage20-Hの(H+1)段のパイプラインステージから構成されている。 Subsequently, the Priority Pipeline 20 included in the packet classifier 1 has a pipeline structure, and executes processing related to selection of a BV and selection of an optimal solution when performing packet classification of the present invention. Priority Pipeline 20 is Priority Pipeline Stage 20-0, Priority Pipeline Stage 20-1, Priority Pipeline Stage 20-2, ... It is composed of
 図21は、本発明の第1の実施の形態におけるPriority Pipeline Stageの構成を示す図である。図21を参照すると、Priority Pipeline Stageは、フィールド分離回路200と、アドレス変換回路201と、Bit Vector(BV)選択回路(ビット配列選択回路)200-1、200-2、・・・、200-Fと、ANDゲート202と、優先度チェック回路203と、メモリ等の記憶媒体で構成されるルールIDリスト記憶ブロック204と、を含む。 FIG. 21 is a diagram showing a configuration of the Priority Pipeline Stage in the first embodiment of the present invention. Referring to FIG. 21, Priority Pipeline Stage includes a field separation circuit 200, an address conversion circuit 201, and a Bit Vector (BV) selection circuit (bit array selection circuit) 200-1, 200-2,. F, an AND gate 202, a priority check circuit 203, and a rule ID list storage block 204 formed of a storage medium such as a memory.
 フィールド分離回路200は、Tree Pipeline Stageから入力された検索キーと有効ビット長を、検索キーに含まれるF個のフィールド毎に分離し、それぞれをF個のBV選択回路へ入力する。なお、有効ビット長は、Tree Pipelineにおける領域分割に用いられるフィールドに対してのみ設定されているため、有効ビット長が定義されていないフィールドに対しては、当該フィールドのフィールド長を有効ビット長としてBV選択回路に入力させても良いし、don’t careとして入力せず、BV選択回路で全て有効であると判断させても良い。 The field separation circuit 200 separates the search key and the effective bit length input from the Tree Pipeline Stage for each of F fields included in the search key, and inputs each to the F BV selection circuits. The effective bit length is set only for the field used for area division in Tree Pipeline. Therefore, for a field for which the effective bit length is not defined, the field length of the field is set as the effective bit length. It may be input to the BV selection circuit, or may not be input as don't care and may be determined to be all valid by the BV selection circuit.
 アドレス変換回路201は、Tree Pipeline Stageから入力された次ステージでの子ノードの領域分割情報が記憶されるアドレス値が入力される。アドレス変換回路201では、入力されたアドレス値が、Priority Pipeline StageにおいてルールIDリストを保持できるワード数(ノード数)Wよりも大きいか小さいかを判断し、小さければ当該ノードは実ノードであるため、そのルールリストに対するParallel BV処理を行うため、当該ノードのBVが記憶されたBase Addressを各BV選択回路に出力し、また、当該ノードのルールIDリスト記憶ブロック204のアドレス値として、入力されたアドレス値を出力する。なお、この際、ルールIDリスト記憶ブロック204には、W個のノードに対するルールIDリストしか保持していないため、アドレスのビット幅はlog以上の最小の整数値で良い。一方、入力されたアドレス値が、Wよりも大きければ、当該ノードはVirtual Nodeであるため、当該Priority Pipeline Stageにおける処理を行わないことを示す信号を出力する。 The address conversion circuit 201 receives an address value in which the area division information of the child node at the next stage, which is input from the Tree Pipeline Stage, is stored. The address conversion circuit 201, the address value entered is, it is determined whether Priority Pipeline number of words that can hold a rule ID list in Stage (number of nodes) W larger or smaller than P, the node smaller is the actual node Therefore, in order to perform Parallel BV processing on the rule list, the Base Address in which the BV of the node is stored is output to each BV selection circuit, and is input as the address value of the rule ID list storage block 204 of the node. Output address value. At this time, the rule ID list storing block 204, W for P number of only rule ID list does not hold for a node, the bit width of the address may be the smallest integer value greater than or equal to log 2 W P. On the other hand, the input address value is greater than W P, because the node is Virtual Node, and outputs a signal indicating not to perform processing in the Priority Pipeline Stage.
 BV選択回路に関する構成の説明は後述するが、BV選択回路では、当該フィールドに対するBVを選択し、ANDゲート202に出力する。各フィールドに対するBVが入力されるANDゲート202では、それらのBVのビット単位の論理積(AND)を取り、優先度チェック回路203へ出力する。 The description of the configuration related to the BV selection circuit will be described later, but the BV selection circuit selects a BV for the field and outputs it to the AND gate 202. The AND gate 202 to which the BV for each field is input takes the logical product (AND) of these BVs and outputs the result to the priority check circuit 203.
 優先度チェック回路203では、アドレス変換回路201から指定されたアドレス値にあるルールIDリストを読み込み、ANDゲート202から出力されたBVの‘1’の値をもつ各ビットに対応するルールIDを適合しているルールとして判断し、前段のPriority Pipeline Stageから入力された最適ルールを含めた優先度の比較を行い、その時点での最適ルールIDを後段のPriority Pipeline Stageに出力する。 The priority check circuit 203 reads the rule ID list at the address value specified by the address conversion circuit 201 and applies the rule ID corresponding to each bit having the value “1” of BV output from the AND gate 202. The priority including the optimal rule input from the preceding Priority Pipeline Stage is compared, and the optimal rule ID at that time is output to the Priority Pipeline Stage.
 図22は、本発明の第1の実施の形態におけるBV選択回路の構成を示すブロック図である。図22を参照すると、本実施の形態におけるBV選択回路は、探索回路2000と、メモリ等の記憶媒体から構成されるBit Vector(BV)記憶ブロック(ビット配列記憶ブロック)2001と、を備える。 FIG. 22 is a block diagram showing a configuration of the BV selection circuit according to the first embodiment of the present invention. Referring to FIG. 22, the BV selection circuit according to the present embodiment includes a search circuit 2000 and a Bit Vector (BV) storage block (bit array storage block) 2001 configured from a storage medium such as a memory.
 探索回路2000は、アドレス変換回路201から入力された当該ノードのBVが記憶されているBase Addressと、フィールド分離回路200から入力された当該BV選択回路が処理するヘッダフィールドデータと、有効ビット長と、から、当該フィールドデータに対応するBVを選択し、BV記憶ブロック2001から読み出し、ANDゲート202へ出力する。ここで、本実施の形態では、非特許文献3で開示されているParallel BV方式を用いるものとし、BV記憶ブロック2001には、BaseAddressからBVをもつ区間の開始位置、又は終了位置と当該区間のBVが記憶されており、探索回路2000はこれらのデータを読み出し、入力されたヘッダフィールドデータと有効ビット長を参照しながら、例えば二分探索を行うことで適切なBVを読み出すものとする。なお、二分探索の実現方法については、当事者にとってはよく知られているため、ここでは詳細な説明を省略する。 The search circuit 2000 has a Base Address in which the BV of the node input from the address conversion circuit 201 is stored, a header field data processed by the BV selection circuit input from the field separation circuit 200, an effective bit length, , The BV corresponding to the field data is selected, read from the BV storage block 2001, and output to the AND gate 202. Here, in the present embodiment, the Parallel BV method disclosed in Non-Patent Document 3 is used, and the BV storage block 2001 stores the start position or the end position of the section having BV from BaseAddress and the section of the section. The BV is stored, and the search circuit 2000 reads out these data and reads out an appropriate BV by performing a binary search, for example, while referring to the input header field data and effective bit length. Note that a method for realizing the binary search is well known to those skilled in the art, and thus detailed description thereof is omitted here.
 本実施の形態では、上記のような処理を行い、最終的にPriority Pipeline Stage20-Hからの出力が最適解となるため、出力3によって出力する。 In the present embodiment, the processing as described above is performed, and since the output from the Priority Pipeline Stage 20-H is the optimal solution, the output is output by the output 3.
 なお、本実施の形態においては、領域分割情報におけるLeaf Flagによって、当該ノードが葉ノードであると判断した場合、構成図では省略したが、当該Tree Pipeline Stageにおける領域分割情報は実行せず、その情報を後段のTree Pipeline Stageに出力し、以降のTree Pipeline Stageでは領域分割情報の読み出しや領域分割を実行しないといった処理を行う。なお、この際、当該Tree Pipeline Stageのすぐ次のPriority Pipeline Stageでは、当該葉ノードのルールIDリストに対するParallel BV処理は実行する必要があるため、例えば、前段から葉ノードであるという信号を受け取ったTree Pipeline Stageから各種信号が入力されるPriority Pipeline Stage以降では、Parallel BV処理を実行しない等の処理を行う。 In the present embodiment, when it is determined by Leaf Flag in the region division information that the node is a leaf node, it is omitted in the configuration diagram, but the region division information in the Tree Pipeline Stage is not executed. The information is output to the later Pipe Pipeline Stage, and the subsequent processing such as reading the area division information and not executing the area division is performed in the Tree Pipeline Stage. At this time, the Priority Pipeline Stage immediately after the Tree Pipeline Stage needs to execute the Parallel BV processing for the rule ID list of the leaf node, so for example, a signal indicating that it is a leaf node is received from the previous stage. After Priority Pipeline Stage after various signals are input from Tree Pipeline Stage, processing such as not executing Parallel BV processing is performed.
(1-2)第1の実施の形態の動作
 次に、図9の本発明における基本的なパケット分類方法を示す流れ図と、図14、図16、図17、図18、図21、図22の本実施の形態の構成図を参照しながら、本実施の形態における動作について説明する。なお、本発明における基本的なパケット分類方法、及び本実施の形態における各構成要素の動作概要については、既に説明した通りであるため、ここでは、基本的なパケット分類方法に対する本実施の形態における特徴的な動作に焦点を当てて説明する。
(1-2) Operation of the First Embodiment Next, a flowchart showing the basic packet classification method in the present invention in FIG. 9, and FIGS. 14, 16, 17, 18, 21, 21 and 22. The operation of the present embodiment will be described with reference to the configuration diagram of the present embodiment. The basic packet classification method in the present invention and the operation outline of each component in the present embodiment are as described above, and here, in this embodiment for the basic packet classification method, The explanation will focus on the characteristic operation.
 本実施の形態におけるパケット分類器1に被検索対象パケットのヘッダフィールドデータが入力されると、Dicision Treeの根ノードを処理ノードとし(ステップA1)、Priority Pipeline Stage20-0にて、Parallel BV処理を行う(ステップA2)。 When the header field data of the packet to be searched is input to the packet classifier 1 in the present embodiment, the root node of the Division Tree is set as a processing node (Step A1), and the Parallel Pipeline Stage 20-0 is used for Parallel BV processing. Perform (Step A2).
 図23は、本発明の第1の実施の領域分割時の動作(ステップA2)を示す流れ図である。Priority Pipeline Stage20-0では、アドレス変換回路201において、入力されたアドレス値から、当該処理ノードのルールIDリスト、及びBV情報が記憶されているアドレス値に変換する(ステップB1)。続いて、フィールド分離回路200において、入力された検索キーと有効ビット長から、各フィールドの有効ビットを切り出す(ステップB2)。次に、各BV選択回路200-1から200-Fにおいて、アドレス変換回路201からのアドレス値、及びフィールド分離回路200からの有効ビットを元に、探索回路2000によって適切なBVをBV記憶ブロック2001から読み出す(ステップB3)。各BV選択回路から選択されたBVは、ANDゲート201によってビット毎の論理積を取り、当該ノードにおける最終的なBVとし(ステップB4)、ステップA2の処理を終了する。 FIG. 23 is a flowchart showing the operation (step A2) at the time of area division according to the first embodiment of the present invention. In Priority Pipeline Stage 20-0, the address conversion circuit 201 converts the input address value into an address value in which the rule ID list and BV information of the processing node are stored (step B1). Subsequently, the field separation circuit 200 cuts out valid bits of each field from the input search key and valid bit length (step B2). Next, in each of the BV selection circuits 200-1 to 200-F, based on the address value from the address conversion circuit 201 and the valid bit from the field separation circuit 200, the search circuit 2000 assigns an appropriate BV to the BV storage block 2001. (Step B3). The BV selected from each BV selection circuit takes a logical product for each bit by the AND gate 201 to obtain a final BV in the node (step B4), and the process of step A2 is completed.
 続いて、優先度チェック回路203は、アドレス変換回路201から指定されたアドレス値を元に、ルールIDリスト記憶ブロック204から、当該ノードにおけるルールIDリストを読み出し、前段のPriority Pipeline Stageまでの最適ルールを含めた最適ルールを選択する。なお、ルールIDリストには、当該ルールの優先度も保持されているものとする(ステップA3)。 Subsequently, the priority check circuit 203 reads the rule ID list at the node from the rule ID list storage block 204 based on the address value specified by the address conversion circuit 201, and the optimum rule up to the priority Pipeline Stage in the previous stage. Select the optimal rule including. Note that the rule ID list also holds the priority of the rule (step A3).
 次に、Tree Pipeline Stage10-1にて、根ノードにおける領域分割情報を読み出す(ステップA4)。読み出した領域分割情報のLeaf Nodeから、当該ノードが葉ノードでないと判断すると(ステップA5のNo)、読み出した領域分割情報を用いて、領域分割回路100において領域分割処理を実行する(ステップA6)。 Next, the area division information in the root node is read out in the Tree Pipeline Stage 10-1 (step A4). If it is determined from the Leaf Node of the read area division information that the node is not a leaf node (No in Step A5), the area division processing is executed in the area division circuit 100 using the read area division information (Step A6). .
 図24は、本発明の第1の実施の領域分割時の動作(ステップA6)を示す流れ図である。領域分割処理は、領域分割回路100におけるフィールド分割回路100-1から100-Cにて実行される。なお、各フィールド分割回路への入力データは、上述した通りである。 FIG. 24 is a flowchart showing an operation (step A6) at the time of area division according to the first embodiment of the present invention. The area division processing is executed by the field division circuits 100-1 to 100-C in the area division circuit 100. The input data to each field dividing circuit is as described above.
 領域分割処理では、まず、フィールド分割回路100-1における加算器1006へ入力されるこれまでの分割数を0とする(ステップC1)。続いて、減算器1004において、入力された有効ビット長から当該フィールドの分割数を減じる(ステップC2)。さらに、Right Shifter1005において、ステップC2で得た結果の値だけ、入力された当該フィールドデータを右にシフトさせる(ステップC3)。一方、加算器1006においてこれまでの分割数と当該フィールドの分割数を加算し(ステップC4)、その結果の値だけ、Left Shifter1007においてステップC3で得た当該フィールドデータを左シフトさせる(ステップC5)。上記の処理はフィールド分割回路100-1に対する処理であり、他の領域分割を行うフィールドが存在する(ステップC6のYes)ため、それらに対しても上記と同様の処理(ステップC2からステップC5)を実行する。なお、フィールド分割回路100-2における加算器1006に入力されるこれまでの分割数は、フィールド分割回路100-1の加算器1006の加算結果であり、フィールド分割回路100-3における加算器1006に入力されるこれまでの分割数は、フィールド分割回路100-2の加算器1006の加算結果である。同様に、一般化し、フィールド分割回路100-n(n=2、3、・・・、C)における加算器1006に入力されるこれまでの分割数は、フィールド分割回路100-(n-1)の加算器1006の加算結果である。最終的に、フィールド分割回路100-Cにおいて、ステップC5までの処理が終了すると、領域分割情報に含まれる領域分割フィールドに対する処理が全て終了するため(ステップC6のNo)、ORゲート1002において、各フィールド分割回路で得た結果(Left Shifter1007の出力)の論理和を取る(ステップC7)。最後に、加算器1003において、ステップC7の結果とBase Addressを加算し(ステップC8)、ステップA6の処理を終了する。 In the area division processing, first, the number of divisions so far input to the adder 1006 in the field division circuit 100-1 is set to 0 (step C1). Subsequently, the subtracter 1004 subtracts the number of divisions of the field from the input effective bit length (step C2). Further, in the right shifter 1005, the input field data is shifted to the right by the value obtained in step C2 (step C3). On the other hand, the number of divisions so far and the number of divisions of the field are added in the adder 1006 (step C4), and the field data obtained in step C3 in the left shifter 1007 is shifted to the left by the result value (step C5). . The above processing is processing for the field dividing circuit 100-1, and there are fields for performing other region division (Yes in step C6). Therefore, processing similar to the above (step C2 to step C5) is also performed for these fields. Execute. Note that the number of divisions so far input to the adder 1006 in the field division circuit 100-2 is the addition result of the adder 1006 in the field division circuit 100-1, and is added to the adder 1006 in the field division circuit 100-3. The number of divisions input so far is the addition result of the adder 1006 of the field division circuit 100-2. Similarly, the number of divisions so far input to the adder 1006 in the field division circuit 100-n (n = 2, 3,..., C) is the field division circuit 100- (n−1). The result of addition by the adder 1006. Finally, in the field division circuit 100-C, when the processing up to step C5 is completed, all processing for the region division field included in the region division information is completed (No in step C6). The logical sum of the results obtained by the field dividing circuit (the output of Left Shifter 1007) is calculated (step C7). Finally, in the adder 1003, the result of Step C7 and Base Address are added (Step C8), and the process of Step A6 is terminated.
 一方、有効ビット長更新回路103においては、入力された領域分割を行う各フィールドの有効ビット長を、領域分割情報で指定された分割数を元に更新し(ステップA7)、ステップA2へ戻る。 On the other hand, the effective bit length update circuit 103 updates the effective bit length of each input field to be divided based on the number of divisions specified by the region division information (step A7), and returns to step A2.
 上記の処理を、全てのPriority Pipeline Stage、及び全てのTree Pipeline Stageにおいて行う。ここで、Decision Treeの葉ノードの処理について説明する。Tree Pipeline Stage10-Hで処理したノードが葉ノードでない場合、つまり、領域分割情報を読み出した結果、Leaf Flagが‘0’の場合、本パケット分類器で処理するDecision Treeの制約上、次の処理ノードは必ず葉ノードとなる。このため、最後の葉ノードでは領域分割を行わないため、Priority Pipeline Stage20-Hにて、葉ノードのルールリストに対するParallel BV処理を実行し、それまでの結果から最適解を得る。一方、Tree Pipeline Stage10-Hに到達するまでに、読み出した領域分割情報におけるLeaf Flagが‘1’、つまり、当該処理ノードが葉ノードであった場合、上述したように、続くPriority Pipeline Stageにおいて葉ノードのルールリストに対するParallel BV処理のみを実行し、それ以降のPriority Pipeline Stage、及びTree Pipeline Stageにおける処理は実行しない、又は、実行してもそれまでに得られている最適解が変更されないように処理を行うものとする。葉ノードの処理を行った結果、それまでに得られている最適ルールを最終的な解とすることが可能となる(ステップA5)。 The above processing is performed in all Priority Pipeline Stages and all Tree Pipeline Stages. Here, the processing of the leaf node of the Decision Tree will be described. If the node processed by Tree Pipeline Stage10-H is not a leaf node, that is, if the Leaf Flag is '0' as a result of reading the region division information, the following processing is performed due to the restriction of Decision Tree processed by this packet classifier Nodes are always leaf nodes. For this reason, since the area division is not performed at the last leaf node, the Parallel BV processing is performed on the rule list of the leaf node in the Priority Pipeline Stage 20-H, and the optimal solution is obtained from the results so far. On the other hand, if the Leaf Flag in the read area division information is '1' before reaching the Pipe Pipeline Stage 10-H, that is, if the processing node is a leaf node, as described above, the leaf in the subsequent Priority Pipeline Stage Only the Parallel BV process for the node rule list is executed, and the subsequent Priority Pipeline Stage and Tree Pipeline Stage processes are not executed, or even if executed, the optimal solution obtained so far is not changed. Processing shall be performed. As a result of processing the leaf node, the optimal rule obtained so far can be made the final solution (step A5).
 なお、上記の本実施の形態では、各Tree Pipeline Stageにおいて、領域分割情報にVirtual Flagを持たせることで、当該処理ノードが実ノードであるか、Virtual Nodeであるか判断していたが、領域分割情報にVirtual Flagを保持せず、Tree Pipeline Stageの加算器1003の後段において、Priority Pipeline Stageにおけるアドレス変換回路201を備えることで、算出したアドレス値と、後段のPriority Pipeline Stageのワード数(ノード数)Wを比較させることで、Virtual Nodeを判断し、後段のTree Pipeline Stageに対してその情報を出力させることで、同様の処理を実現することが可能である。 In the above-described embodiment, in each Pipe Pipeline Stage, it is determined whether the processing node is a real node or a Virtual Node by adding a Virtual Flag to the area division information. Since the virtual flag is not held in the division information and the address conversion circuit 201 in the Priority Pipeline Stage is provided in the subsequent stage of the adder 1003 of the Tree Pipeline Stage, the calculated address value and the number of words of the Priority Pipeline Stage in the subsequent stage be to compare the number) W P, determines the Virtual Node, be to output the information to the subsequent stage of the Tree Pipeline Stage, to realize the same processing Bets are possible.
 また、上記の本実施の形態では、各Priority Pipeline Stageにおいては、非特許文献3で開示されているParallel BV処理をベースとしたが、これを非特許文献4で開示されているParallel BV処理をベースに用いても良い。この場合の詳細なParallel BV処理は、非特許文献4で開示されているため省略するが、上記ステップA2のParallel BV処理は、図25に示すような処理となる。但し、非特許文献3、非特許文献4共に、ルールIDリストを用いてBVの各ビット位置とルールとを対応付けることは変わらない。 Further, in the above-described embodiment, each Priority Pipeline Stage is based on the Parallel BV process disclosed in Non-Patent Document 3, but this is applied to the Parallel BV process disclosed in Non-Patent Document 4. It may be used for the base. The detailed Parallel BV process in this case is omitted because it is disclosed in Non-Patent Document 4, but the Parallel BV process in Step A2 is a process as shown in FIG. However, both Non-Patent Document 3 and Non-Patent Document 4 use the rule ID list to associate each bit position of the BV with the rule.
 図25は、非特許文献4で開示されているParallel BV処理をベースに用いた場合の本発明の第1の実施の領域分割時の動作(ステップA2)を示す流れ図である。この場合、Priority Pipeline Stage20-0では、ステップB1とステップB2の処理を行う。なお、ステップB1とステップB2は、図23に示した流れ図における動作と同様であることから、その説明を省略する。次に、非特許文献4で開示されるParallel BV処理を用いた場合、BV選択回路200-1から200-Fにおいて、アドレス変換回路201からのアドレス値、及びフィールド分離回路200からの有効ビットを元に、探索回路2000によって各フィールドのサブフィールド単位に1つのBVをBV記憶ブロック2001から読み出す(ステップB5)。続いて、各BV選択回路から読み出された複数のBVに対して、ANDゲート201によってビット毎の論理積を取り、当該ノードにおける最終的なBVとし(ステップB6)、ステップA2の処理を終了する。なお、非特許文献4で開示されるParallel BV処理をベースに用いた場合、BV選択回路はフィールド毎に分離していなくてもよく、1つのBV選択回路によって複数のBVを読み出しても良い。 FIG. 25 is a flowchart showing an operation (step A2) at the time of area division according to the first embodiment of the present invention when the Parallel BV processing disclosed in Non-Patent Document 4 is used as a base. In this case, the Priority Pipeline Stage 20-0 performs the processing of Step B1 and Step B2. Steps B1 and B2 are the same as the operations in the flowchart shown in FIG. Next, when Parallel BV processing disclosed in Non-Patent Document 4 is used, the BV selection circuits 200-1 to 200-F use the address value from the address conversion circuit 201 and the effective bit from the field separation circuit 200. Originally, one BV is read from the BV storage block 2001 by the sub-field unit of each field by the search circuit 2000 (step B5). Subsequently, the AND gate 201 performs a logical product for each bit of the plurality of BVs read from each BV selection circuit to obtain a final BV at the node (step B6), and the process of step A2 is completed. To do. When the Parallel BV processing disclosed in Non-Patent Document 4 is used as a base, the BV selection circuit may not be separated for each field, and a plurality of BVs may be read by one BV selection circuit.
 さらに、上記ではTree Pipeline Stage10-1にDecision Treeの根ノードが配置される例を用いて説明したが、これをDecision Treeの複数の部分木の根ノードをTree Pipeline Stage10-1から配置していく形態でも構わず、本実施の構成を何ら変更せずに構成することができることは明らかである。図26は、本発明の第1の実施の形態における複数のDecision TreeノードのTree Pipeline Stageへのマッピング例を示す図である。図26では、Decision Treeの根ノードであるノード0の子ノード(図26では、ノード1とノード14)をTree Pipeline Stage10-1に配置している。この場合、ノード0のN個の子ノードを根ノードとするN個の部分木が1つのTree Pipeline上に配置される。但し、この場合、根ノードであるノード0における領域分割処理に相当する処理ブロックが必要であり、図14に示す本パケット分類器1の入力2が入力されてすぐにIndex Tableに相当するような処理ブロックを配置し、その出力によって、Tree Pipeline Stage10-1、及びPriority Pipeline Stage20-0への入力となる検索キーや有効ビット長、アドレス値等を決定する。この処理ブロックについては、上述した本パケット分類器の構成を流用しても良いし、検索キーの先頭数ビットを参照して決定してもよく、当事者にとっては容易に構成できるため、詳細な説明は省略する。 Furthermore, in the above description, the example is described in which the root node of the decision tree is arranged in the tree pipeline stage 10-1, but this is also a form in which the root nodes of a plurality of subtrees of the decision tree are arranged from the tree pipeline stage 10-1. It is obvious that the present embodiment can be configured without any changes. FIG. 26 is a diagram illustrating an example of mapping a plurality of Decision Tree nodes to a Tree Pipeline Stage according to the first embodiment of this invention. In FIG. 26, the child nodes of node 0 (in FIG. 26, node 1 and node 14), which are the root nodes of the decision tree, are arranged in the Tree Pipeline Stage 10-1. In this case, N subtrees having N child nodes of node 0 as root nodes are arranged on one Tree Pipeline. However, in this case, a processing block corresponding to the area division processing in the node 0 which is the root node is required, and immediately after the input 2 of the packet classifier 1 shown in FIG. 14 is input, it corresponds to the Index Table. A processing block is arranged, and a search key, an effective bit length, an address value, and the like serving as an input to the Tree Pipeline Stage 10-1 and the Priority Pipeline Stage 20-0 are determined based on the output. For this processing block, the configuration of the packet classifier described above may be used, or may be determined with reference to the first few bits of the search key, and can be easily configured for the parties. Is omitted.
(1-3)第1の実施の形態の作用効果
 次に、本発明の第1の実施の形態の作用効果について説明する。
(1-3) Operational Effects of First Embodiment Next, the operational effects of the first embodiment of the present invention will be described.
 上記のように、本実施の形態において、Dicision TreeとParallel Bit Vectorを組み合わせることにより、1パケットあたりの処理においてメモリから読み出すデータ量を削減することができ、1つのルールを構成するヘッダフィールド長の総和が大きくなっても、また、ルール数が多くなっても、メモリのDynamic Powerの増加を抑制し、結果的にハードウェア全体の消費電力を増加させないパケット分類器を提供することができる。 As described above, in the present embodiment, by combining the Division Tree and the Parallel Bit Vector, the amount of data read from the memory in the processing per packet can be reduced, and the header field length constituting one rule can be reduced. Even if the sum increases or the number of rules increases, it is possible to provide a packet classifier that suppresses an increase in the dynamic power of the memory and consequently does not increase the power consumption of the entire hardware.
 具体的に、Dicision Treeベースの手法と、本発明におけるパケット分類器の1パケットあたりの処理においてメモリから読み出すデータ量の比較を以下に行う。 Specifically, the comparison of the amount of data read from the memory in the processing per packet of the packet classifier according to the present invention is performed as follows.
 まず、ルールはF個のフィールドから構成され、各フィールドのフィールド長をW[bits](i=0、1、・・・、F-1)とし、ルールを構成する全ビット長をW[bits]とすると、以下の式が成り立つ。 First, the rule is composed of F fields, the field length of each field is W i [bits] (i = 0, 1,..., F−1), and the total bit length constituting the rule is W [ bits]], the following equation holds.
Figure JPOXMLDOC01-appb-M000001
 本発明におけるパケット分類器が対象とするルールにおけるマッチング手法として、Exact Match、Prefix Match、Range Matchを想定した場合、ルールを構成するフィールドあたり、2倍のビット長、つまり2W[bits]が必要になる。これは、Range Matchのように下限値と上限値を指定する必要があるためである。なお、このようにフィールドあたり2W[bits]で指定する場合、最初の第1値であるW[bits]にて特定値を指定し、次の第2値であるW[bits]でマスクを指定することで、Exact MatchとPrefix Matchとしても指定可能となる。より厳密には、第2値がマスクを示すのか、Range Matchにおける上限値を示すのかを判別するための1bitのフラグ等を用いることが考えられるが、ここでは簡単化のためルールは2W[bits]で指定されるものとする。
Figure JPOXMLDOC01-appb-M000001
Assuming Exact Match, Prefix Match, and Range Match as matching methods in the rule targeted by the packet classifier in the present invention, a double bit length, that is, 2 W [bits] is required for each field constituting the rule. Become. This is because it is necessary to specify a lower limit value and an upper limit value as in Range Match. When specifying 2 W [bits] per field in this way, a specific value is specified by the first first value W [bits], and a mask is specified by the next second value W [bits]. By doing so, it is also possible to specify the Exact Match and the Prefix Match. More strictly, it may be possible to use a 1-bit flag or the like for determining whether the second value indicates a mask or an upper limit value in Range Match, but here, for simplification, the rule is 2W [bits ].
 次に、本パケット分類器がサポートする全ルール数をRとし、各ノードのルールリストに含むことができるルール数をLとする。ルールリストに含むことができるルール数Lは、ノード毎に変更しても良いが、ここでは全ノード共に同一の値を用いるものとする。但し、Dicision Treeをベースとした手法では、ルールリストを連続的に読み出すのに効率が良いよう、ルールリスト毎にまとまった記憶領域にルールを記憶させるものとする。つまり、領域をまたぐルールはそこで複製されるため、Rと、全ノードに対するLの総和が等しいとは限らない。 Next, let R be the total number of rules supported by this packet classifier, and let L be the number of rules that can be included in the rule list of each node. The number of rules L that can be included in the rule list may be changed for each node, but here, the same value is used for all nodes. However, in the method based on Division Tree, the rules are stored in a storage area for each rule list so that it is efficient to read the rule list continuously. That is, since the rule that crosses the region is duplicated there, the sum of R and L for all nodes is not necessarily equal.
 なお、Dicision Tree自体を辿る各Tree Pipeline Stageにおけるデータ読み出し量は、Dicision Treeベースの手法でも、本発明におけるパケット分類手法でもほぼ同様であるため省略し、ルールリストに対するマッチング処理におけるデータ読み出し量に焦点を当てて、見積もる。 Note that the amount of data read in each Tree Pipeline Stage that follows the Division Tree itself is almost the same for both the Classification Tree-based method and the packet classification method of the present invention, so it is omitted and focused on the data read amount in the matching process for the rule list. Estimate.
 まず、Dicision Treeベースの手法の場合、1つのルールリストに含まれるL個のルール全てをメモリから読み出す必要がある。ここで言うルールは上述したように2W[bits]で規定されているため、1ノードあたりに読み出すデータ量D[bits]は、ルールリストに含まれるルール数Lとルールのビット長2W[bits]の積で得られる。 First, in the case of the Division Tree-based method, it is necessary to read out all the L rules included in one rule list from the memory. Since the rule here is defined by 2W [bits] as described above, the amount of data D E [bits] read per node is equal to the number of rules L included in the rule list and the bit length of the rule 2W [bits]. ] Product.
Figure JPOXMLDOC01-appb-M000002
 一方、非特許文献3で開示されているParallel BV処理をベースに用いた場合の本発明のパケット分類手法を用いた場合、探索回路2000において、BV記憶ブロック2001から、フィールド毎に区間の開始値、または終了値と、ルールリストに含まれるL個のルールに対するBVから構成されるW+L[bits]のデータを読み出す必要がある。なお、N個の要素に対して二分探索を用いた場合、一般的には、[logN]+1回の比較を行うことで探索を行うことが可能である。ここで、[x]はx以上の最小の整数を意味する。また、L個のルールが存在する場合のParallel BVにおける区間は、非特許文献2から、高々2L+1個である。このことから、1フィールドあたりに読み出すデータ量は(W+L)×{[log(2L+1)]+1}であり、F個のフィールドに対してこれを行う。また、ルールIDリストを1つ読み出すが、ルール数Rのとき、ルールIDは[logR][bits]で表現でき、ルールIDリストにはL個のルールIDが含まれるため、上記を考慮すると、1ルールリストあたりに読み出すデータ量D[bits]は、式1から以下の式で得られる。
Figure JPOXMLDOC01-appb-M000002
On the other hand, when using the packet classification method of the present invention based on the Parallel BV processing disclosed in Non-Patent Document 3, the search circuit 2000 starts the section start value for each field from the BV storage block 2001. Alternatively, it is necessary to read out W i + L [bits] data composed of the end value and the BV for the L rules included in the rule list. Note that, when a binary search is used for N elements, it is generally possible to perform a search by performing [log 2 N] +1 comparisons. Here, [x] means the smallest integer greater than or equal to x. In addition, the number of sections in Parallel BV when there are L rules is 2L + 1 at most from Non-Patent Document 2. Therefore, the amount of data read out per field is (W i + L) × {[log 2 (2L + 1)] + 1}, and this is performed for F fields. Also, one rule ID list is read. When the number of rules is R, the rule ID can be expressed as [log 2 R] [bits], and the rule ID list includes L rule IDs. Then, the data amount D P [bits] to be read out per rule list can be obtained from Equation 1 by the following equation.
Figure JPOXMLDOC01-appb-M000003
 例えば、ルールが送信元IPアドレス(32bits)、宛先IPアドレス(32bits)、プロトコル番号(8bits)、送信ポート番号(16bits)、宛先ポート番号(16bits)の5-tupleで構成されるとした場合、W=104[bits]、F=5であり、ルールリストに含まれるルール数をL=8、全ルール数を10K(=10×210)とすると、D=2×8×104=1664[bits]であり、D=8×[log(10×210)]+(104+5×8)×([log(2×8+1)]+1)=8×14+144×6=112+864=976[bits]となり、1ルールリストあたり688bitsのデータ量を削減することが可能となる。Decision Treeの高さHに対して、処理するルールリストはH+1個存在するため、この差のH+1倍の読み出しデータ量を削減することができる。
Figure JPOXMLDOC01-appb-M000003
For example, when the rule is composed of 5-tuples of a source IP address (32 bits), a destination IP address (32 bits), a protocol number (8 bits), a transmission port number (16 bits), and a destination port number (16 bits), When W = 104 [bits], F = 5, the number of rules included in the rule list is L = 8, and the total number of rules is 10K (= 10 × 2 10 ), D E = 2 × 8 × 104 = 1664 [Bits], D P = 8 × [log 2 (10 × 2 10 )] + (104 + 5 × 8) × ([log 2 (2 × 8 + 1)] + 1) = 8 × 14 + 144 × 6 = 112 + 864 = 976 [Bits], and it is possible to reduce the data amount of 688 bits per rule list. Since there are H + 1 rule lists to be processed with respect to the height H of the decision tree, the amount of read data can be reduced by H + 1 times this difference.
 また、例えば、上記でL=16とすると、D=2×16×104=3328[bits]であり、D=16×[log(10×210)]+(104+5×16)×([log(2×16+1)]+1)=16×14+184×7=224+1288=1512[bits]となり、1ルールリストあたり1816bitsのデータ量を削減することが可能であり、ルールリストに含まれるルール数Lが増えるほど、その差は大きくなることが分かる。 For example, when L = 16 in the above, D E = 2 × 16 × 104 = 3328 [bits], and D P = 16 × [log 2 (10 × 2 10 )] + (104 + 5 × 16) × ([Log 2 (2 × 16 + 1)] + 1) = 16 × 14 + 184 × 7 = 224 + 1288 = 1512 [bits] It is possible to reduce the data amount of 1816 bits per rule list, and the rules included in the rule list It can be seen that the difference increases as the number L increases.
 同様に、例えば、上記でIPv6を想定し、送信元IPアドレスと宛先IPアドレスがそれぞれ128bitsであるとすると、W=296[bits]となる。この場合、D=2×8×296=4736[bits]であり、D=8×[log(10×210)]+(296+5×8)×([log(2×8+1)]+1)=8×14+336×6=112+2012=2124[bits]となり、1ルールリストあたり2612bitsの読み出しデータ量を削減することが可能であり、ルールのビット長が増加すればするほど、その差は大きくなることが分かる。 Similarly, for example, assuming IPv6 above, if the source IP address and the destination IP address are 128 bits each, W = 296 [bits]. In this case, D E = 2 × 8 × 296 = 4736 [bits] and D P = 8 × [log 2 (10 × 2 10 )] + (296 + 5 × 8) × ([log 2 (2 × 8 + 1)] ] +1) = 8 × 14 + 336 × 6 = 112 + 2012 = 2124 [bits] The read data amount of 2612 bits per rule list can be reduced, and the difference increases as the bit length of the rule increases. You can see it grows.
 さらに、上記で全ルール数をR=1M(=220)とすると、D=2×8×104=1664[bits]であり、D=8×[log(220)]+(104+5×8)×([log(2×8+1)]+1)=8×20+144×6=160+864=1024[bits]となり、全ルール数が1Mに増加した場合でも1ルールリストあたり640bitsの読み出しデータ量を削減することが可能となる。 Further, assuming that the total number of rules is R = 1M (= 2 20 ), D E = 2 × 8 × 104 = 1664 [bits] and D P = 8 × [log 2 (2 20 )] + ( 104 + 5 × 8) × ([log 2 (2 × 8 + 1)] + 1) = 8 × 20 + 144 × 6 = 160 + 864 = 1024 [bits], and even if the total number of rules increases to 1M, 640 bits of read data per rule list The amount can be reduced.
 また、非特許文献4で開示されているParallel BV処理をベースに用いた場合の本発明のパケット分類手法を用いた場合、探索回路2000において、フィールドの複数ビット単位にL[bits]のBVデータを読み出す。ここで、全フィールドに対して2bitsのサブフィールドを規定、つまり、BVは2bits単位に読み出すとすると、ルールのビット長W[bits]に対してW/2個のBVを読み出すことになる。さらに、1つのルールIDリストを読み出すことから、1ルールリストあたりに読み出すデータ量D[bits]は、以下の式で得られる。 Further, when the packet classification method of the present invention is used based on the Parallel BV process disclosed in Non-Patent Document 4, the search circuit 2000 uses L [bits] BV data in units of a plurality of bits. Is read. Here, if 2 bits subfields are defined for all fields, that is, if BV is read in units of 2 bits, W / 2 BVs are read for the bit length W [bits] of the rule. Furthermore, since one rule ID list is read, the data amount D P [bits] read per rule list is obtained by the following equation.
Figure JPOXMLDOC01-appb-M000004
 例えば、上記と同様、W=104[bits]、F=5、L=8、R=10K(=10×210)とすると、D=1664[bits]であり、D=8×([log(10×210)]+104/2)=8×(14+52)=528[bits]となり、1ルールリストあたり1136bitsのデータ量を削減することが可能となる。Decision Treeの高さHに対して、処理するルールリストはH+1個存在するため、この差のH+1倍の読み出しデータ量を削減することができる。
Figure JPOXMLDOC01-appb-M000004
For example, if W = 104 [bits], F = 5, L = 8, and R = 10K (= 10 × 2 10 ), D E = 1664 [bits] and D P = 8 × ( [Log 2 (10 × 2 10 )] + 104/2) = 8 × (14 + 52) = 528 [bits], and it is possible to reduce the data amount of 1136 bits per rule list. Since there are H + 1 rule lists to be processed with respect to the height H of the decision tree, the amount of read data can be reduced by H + 1 times this difference.
 また、例えば、上記でL=16とすると、D=3328[bits]であり、D=16×([log(10×210)]+104/2)=16×(14+52)=1056[bits]となり、1ルールリストあたり2272bitsのデータ量を削減することが可能であり、ルールリストに含まれるルール数Lが増えるほど、その差は大きくなることが分かる。 Further, for example, if L = 16 in the above, D E = 3328 [bits], and D P = 16 × ([log 2 (10 × 2 10 )] + 104/2) = 16 × (14 + 52) = 1056 [Bits], it is possible to reduce the data amount of 2272 bits per rule list, and it can be seen that the difference increases as the number of rules L included in the rule list increases.
 同様に、例えば、上記でIPv6を想定し、送信元IPアドレスと宛先IPアドレスがそれぞれ128bitsであるとすると、W=296[bits]となる。この場合、D=4736[bits]であり、D=8×([log(10×210)]+296/2)=8×(14+148)=1296[bits]となり、1ルールリストあたり3440bitsの読み出しデータ量を削減することが可能であり、ルールのビット長が増加すればするほど、その差は大きくなることが分かる。 Similarly, for example, assuming IPv6 above, if the source IP address and the destination IP address are 128 bits each, W = 296 [bits]. In this case, D E = 4736 [bits], and D P = 8 × ([log 2 (10 × 2 10 )] + 296/2) = 8 × (14 + 148) = 1296 [bits]. It can be seen that the amount of read data of 3440 bits can be reduced, and the difference increases as the bit length of the rule increases.
 さらに、上記で全ルール数をR=1M(=220)とすると、D=1664[bits]であり、D=8×([log(220)]+104/2)=8×(20+52)=576[bits]となり、全ルール数が1Mに増加した場合でも1ルールリストあたり1088bitsの読み出しデータ量を削減することが可能となる。 Further, assuming that the total number of rules is R = 1M (= 2 20 ), D E = 1664 [bits], and D P = 8 × ([log 2 (2 20 )] + 104/2) = 8 × (20 + 52) = 576 [bits], and even when the total number of rules is increased to 1M, it is possible to reduce the read data amount of 1088 bits per rule list.
 以上より、本発明のパケット分類器を用いることで、1パケット処理あたりのメモリからの読み出しデータ量が削減できることが分かる。この結果、メモリのDynamic Powerを削減することができ、全体の消費電力の削減が見込まれる。 From the above, it can be seen that the amount of data read from the memory per packet processing can be reduced by using the packet classifier of the present invention. As a result, the dynamic power of the memory can be reduced, and the overall power consumption can be reduced.
 また、Dicision TreeとParallel BVを組み合わせることにより、ルール数が多くても、Dicision Treeによって適合する可能性のあるルール数を絞り込むことができるため、BVのビット長を削減することができ、メモリからデータを読み出すのに必要なクロックサイクル数の増加を抑制できるパケット分類器を提供することができる。 In addition, by combining Division Tree and Parallel BV, even if there are many rules, the number of rules that can be matched by Division Tree can be narrowed down, so the bit length of BV can be reduced and from memory It is possible to provide a packet classifier that can suppress an increase in the number of clock cycles required for reading data.
(2)第2の実施の形態
(2-1)第2の実施の形態の構成
 次に、本発明の第2の実施の形態について図面を参照して説明する。
(2) Second Embodiment (2-1) Configuration of Second Embodiment Next, a second embodiment of the present invention will be described with reference to the drawings.
 本発明の第2の実施の形態におけるパケット分類器では、ルールを構成するヘッダフィールドとして、予め定められたフィールド以外を用いる場合にも、パケット分類器自体を再構成せずとも利用できるような構成になっている点が、第1の実施の形態におけるパケット分類器と異なる。但し、ルール全体のビット長W[bits]やルールを構成するヘッダフィールド数F、また、各ノードで領域分割に利用するヘッダフィールド数Cの値は予め定められており、その条件が許す範囲で自由に設定可能であるとする。 The packet classifier according to the second exemplary embodiment of the present invention can be used without reconfiguring the packet classifier itself even when a field other than a predetermined field is used as a header field constituting the rule. This is different from the packet classifier in the first embodiment. However, the bit length W [bits] of the entire rule, the number of header fields F constituting the rule, and the value of the number of header fields C used for area division at each node are determined in advance, and within the range permitted by the conditions. It can be set freely.
 本発明の第2の実施の形態におけるパケット分類器の全体構成は、第1の実施の形態におけるパケット分類器である図14と同様であるが、本発明の第2の実施の形態におけるTree Pipeline Stageの構成が第1の実施の形態におけるTree Pipeline Stageの構成と異なる。 The overall configuration of the packet classifier in the second embodiment of the present invention is the same as that of FIG. 14 which is the packet classifier in the first embodiment, but the Tree Pipeline in the second embodiment of the present invention. The configuration of the Stage is different from the configuration of the Tree Pipeline Stage in the first embodiment.
 図27は、本発明の第2の実施の形態におけるTree Pipeline Stageの構成を示すブロック図である。図27を参照すると、本発明の第2の実施の形態におけるTree Pipeline Stageは、図16に示す本発明の第1の実施の形態におけるTree Pipeline Stageの領域分割回路100と有効ビット長更新回路103が、領域分割回路105と有効ビット長更新回路107にそれぞれ置き換わり、さらに、フィールド抽出回路106が新たに追加された構成となっている。その他の構成については、第1の実施の形態におけるTree Pipeline Stageと同様であるため、詳細な説明は省略する。 FIG. 27 is a block diagram showing the configuration of the Tree Pipeline Stage according to the second embodiment of the present invention. Referring to FIG. 27, the Tree Pipeline Stage in the second embodiment of the present invention is the same as the area dividing circuit 100 and the effective bit length update circuit 103 of the Tree Pipeline Stage in the first embodiment of the present invention shown in FIG. However, the area dividing circuit 105 and the effective bit length updating circuit 107 are replaced with each other, and a field extracting circuit 106 is newly added. The other configurations are the same as the Tree Pipeline Stage in the first embodiment, and thus detailed description thereof is omitted.
 図28は、本発明の第2の実施の形態におけるDecision Treeの各ノードにおける領域分割情報を示す図である。本発明の第2の実施の形態においては、領域分割情報において、上述した条件に合う範囲で定義されたルールを構成するヘッダフィールドを、フィールドIDを用いて一意に識別するため、図28に示す領域分割情報を用いる。本領域分割情報は、フィールドIDとその分割数の組をC個備える以外は、図7に示した本発明の基本的なパケット分類方法における領域分割情報と同様である。フィールドIDは、ルールを構成するヘッダフィールドに対して予め定義されるものとする。 FIG. 28 is a diagram showing area division information in each node of the Decision Tree in the second exemplary embodiment of the present invention. In the second embodiment of the present invention, in the area division information, a header field that constitutes a rule defined in a range that meets the above-described conditions is uniquely identified using a field ID. Use region division information. This region division information is the same as the region division information in the basic packet classification method of the present invention shown in FIG. 7 except that C sets of field IDs and the number of divisions are provided. The field ID is defined in advance for the header field that constitutes the rule.
 本実施の構成におけるフィールド抽出回路106には、Memory Controller101が領域分割情報記憶ブロック102から読み取った領域分割情報と、検索キーとその有効ビット長が入力される。フィールド抽出回路106は、領域分割情報に含まれるフィールドIDを参照し、検索キーと有効ビット長から当該処理ノードにおける領域分割に用いられるヘッダフィールドのデータを抽出する。抽出した検索キーと有効ビット長の各フィールドデータ、及び領域分割情報をそれぞれ情報毎に分離した状態で領域分割回路105に出力すると共に、抽出した有効ビット長の各フィールドデータと、そのフィールドの分割数を有効ビット長更新回路107に出力する。 In the field extraction circuit 106 in the present configuration, the region division information read by the memory controller 101 from the region division information storage block 102, the search key, and the effective bit length thereof are input. The field extraction circuit 106 refers to the field ID included in the region division information, and extracts header field data used for region division in the processing node from the search key and the effective bit length. The extracted search key, each field data of the effective bit length, and the area division information are output to the area dividing circuit 105 in a state of being separated for each information, and each field data of the extracted effective bit length and the division of the field are output. The number is output to the effective bit length update circuit 107.
 有効ビット長更新回路107は、入力された領域分割に用いられるヘッダフィールドの有効ビット長に対し、その分割数を減じることで、各有効ビット長を更新する。 The effective bit length update circuit 107 updates each effective bit length by subtracting the number of divisions from the effective bit length of the header field used for the input region division.
 図29は、本発明の第2の実施の形態における領域分割回路105の構成を示すブロック図である。図29を参照すると、本発明の第2の実施の形態における領域分割回路105は、図17に示す本発明の第1の実施の形態における領域分割回路100から、領域分割情報分離回路1000を除いた構成であり、その他の構成は本発明の第1の実施の形態における領域分割回路100と同様であるため、詳細な説明は省略する。本実施の形態では、フィールド抽出回路106において、領域分割情報の各情報データは分離した状態で領域分割回路105に入力されるため、同様の機能を果たしていた領域分割情報分離回路1000が除かれている。 FIG. 29 is a block diagram showing a configuration of the area dividing circuit 105 according to the second embodiment of the present invention. Referring to FIG. 29, the area dividing circuit 105 according to the second embodiment of the present invention excludes the area dividing information separating circuit 1000 from the area dividing circuit 100 according to the first embodiment of the present invention shown in FIG. Since other configurations are the same as those of the region dividing circuit 100 according to the first embodiment of the present invention, detailed description thereof is omitted. In the present embodiment, each information data of the region division information is input to the region division circuit 105 in a separated state in the field extraction circuit 106, so that the region division information separation circuit 1000 that has performed the same function is excluded. Yes.
(2-2)第2の実施の形態の動作
 次に、図30の本発明の第2の実施の領域分割時の動作(ステップA6)を示す流れ図を参照しながら、本実施の形態における動作について説明する。なお、本実施の形態における動作は、図9に示す基本的なパケット分類方法の動作を示す流れ図と基本的には同様であり、ステップA6の領域分割時の動作のみ異なるため、ここでは、図9に示すステップA6の動作についてのみ説明を行い、その他について詳細な説明を省略する。
(2-2) Operation of the Second Embodiment Next, referring to the flowchart showing the operation (step A6) at the time of area division according to the second embodiment of the present invention in FIG. 30, the operation in the present embodiment. Will be described. The operation in the present embodiment is basically the same as the flowchart showing the operation of the basic packet classification method shown in FIG. 9, and only the operation at the time of area division in step A6 is different. Only the operation of step A6 shown in FIG. 9 will be described, and detailed description of the other will be omitted.
 本実施の形態における領域分割時の処理では、まず、フィールド抽出回路106において、Memory Controller101から領域分割情報を、前段のTree Pipeline Stageよりから検索キーと有効ビット長を受け取る。フィールド抽出回路106は、領域分割情報に含まれるC個のフィールドIDを参照し、対応するフィールドの分割数、及び検索キーと有効ビット長から対応するフィールドのデータを抽出し、領域分割回路105に出力する(ステップC9)。上記のデータを受け取った領域分割回路105は、図24に示す本発明の第1の実施の形態における領域分割時の動作と同様、ステップC1からステップC8までの処理を実行し、結果として得たアドレス値を次ノードの領域分割情報が記憶されているメモリのアドレス値として出力する(ステップC10)。なお、ステップC1からステップC8までの処理については、本発明の第1の実施の形態における動作と同様であるため、詳細な説明は省略する。 In the process at the time of area division in the present embodiment, first, the field extraction circuit 106 receives area division information from the Memory Controller 101, and a search key and effective bit length from the previous Pipe Pipeline Stage. The field extraction circuit 106 refers to the C field IDs included in the region division information, extracts the corresponding field data from the number of divisions of the corresponding field, the search key, and the effective bit length, and sends it to the region division circuit 105. Output (step C9). The area dividing circuit 105 that has received the above data executes the processing from step C1 to step C8 and obtains the result, similar to the operation during area division in the first embodiment of the present invention shown in FIG. The address value is output as the address value of the memory storing the area division information of the next node (step C10). Note that the processing from step C1 to step C8 is the same as the operation in the first embodiment of the present invention, and thus detailed description thereof is omitted.
 なお、本実施の形態では、第1の実施の形態と同様、各Tree Pipeline Stageにおいて、領域分割情報にVirtual Flagを持たせることで、当該処理ノードが実ノードであるか、Virtual Nodeであるか判断していたが、領域分割情報にVirtual Flagを保持せず、Tree Pipeline Stageの加算器1003の後段において、Priority Pipeline Stageにおけるアドレス変換回路201を備えることで、算出したアドレス値と、後段のPriority Pipeline Stageのワード数(ノード数)Wを比較させることで、Virtual Nodeを判断し、後段のTree Pipeline Stageに対してその情報を出力させることで、同様の処理を実現することが可能である。 Note that in this embodiment, as in the first embodiment, in each Pipe Pipeline Stage, whether the processing node is a real node or a Virtual Node by providing the area division information with a Virtual Flag. However, the virtual flag is not held in the region division information, and the post-pipeline stage adder 1003 is provided with the address conversion circuit 201 in the priority pipeline stage in the subsequent stage, so that the calculated address value and the priority of the subsequent stage are provided. Pipeline Stage number of words (number of nodes) W P be to compare determines Virtual node, be to output the information to the subsequent stage of the Tree Pipeline Stage, the It is possible to realize the process.
 また、本実施の形態では、第1の実施の形態と同様、各Priority Pipeline Stageにおいては、非特許文献3で開示されているParallel BV処理をベースとしているが、これを非特許文献4で開示されているParallel BV処理をベースに用いても良い。 Further, in the present embodiment, as in the first embodiment, each Priority Pipeline Stage is based on the Parallel BV processing disclosed in Non-Patent Document 3, but this is disclosed in Non-Patent Document 4. It may be used on the basis of the current Parallel BV processing.
 さらに、本実施の形態においても、第1の実施の形態と同様、Tree Pipeline Stage10-1にDecision Treeの根ノードが配置される例を用いて説明したが、これをDecision Treeの複数の部分木の根ノードをTree Pipeline Stage10-1から配置していく形態でも構わず、本実施の構成を何ら変更せずに構成することができることは明らかである。 Furthermore, in the present embodiment, as in the first embodiment, the description has been given using the example where the root node of the Decision Tree is arranged in the Tree Pipeline Stage 10-1, but this is the root of a plurality of subtrees of the Decision Tree. It is obvious that the node may be arranged from the Tree Pipeline Stage 10-1 and can be configured without any change in the configuration of the present embodiment.
(2-3)第2の実施の形態の作用効果
 次に、本発明の第2の実施の形態の作用効果について説明する。
(2-3) Operational Effects of Second Embodiment Next, the operational effects of the second embodiment of the present invention will be described.
 本実施の形態では、第1の実施の形態と同様、Dicision TreeとParallel Bit Vectorを組み合わせることにより、1パケットあたりの処理においてメモリから読み出すデータ量を削減することができ、1つのルールを構成するヘッダフィールド長の総和が大きくなっても、また、ルール数が多くなっても、メモリのDynamic Powerの増加を抑制し、結果的にハードウェア全体の消費電力を増加させないパケット分類器を提供することができる。なお、この際のDicision Treeベースの手法と、本発明におけるパケット分類器の1パケットあたりの処理においてメモリから読み出すデータ量の比較については、第1の実施の形態と同様であるため、省略する。 In this embodiment, as in the first embodiment, the amount of data read from the memory can be reduced in processing per packet by combining the Discription Tree and the Parallel Bit Vector, and one rule is configured. To provide a packet classifier that suppresses the increase in dynamic power of the memory and consequently does not increase the power consumption of the entire hardware even if the total header field length increases or the number of rules increases. Can do. Note that the comparison between the Division Tree-based method at this time and the amount of data read from the memory in the processing per packet of the packet classifier in the present invention is the same as in the first embodiment, and is therefore omitted.
 また、本実施の形態では、第1の実施の形態と同様、Dicision TreeとParallel BVを組み合わせることにより、ルール数が多くても、Dicision Treeによって適合する可能性のあるルール数を絞り込むことができるため、BVのビット長を削減することができ、メモリからデータを読み出すのに必要なクロックサイクル数の増加を抑制できるパケット分類器を提供することができる。 Also, in this embodiment, as in the first embodiment, by combining the Decision Tree and Parallel BV, the number of rules that may be matched by the Decision Tree can be narrowed down even if the number of rules is large. Therefore, it is possible to provide a packet classifier that can reduce the BV bit length and can suppress an increase in the number of clock cycles required to read data from the memory.
 さらに、本実施の形態では、第1の実施の形態と異なり、ルールとして用いるパケットヘッダ情報を、ルールのビット長W、フィールド数F、領域分割に用いることができるフィールド数Cの許す範囲で、ハードウェア回路の変更を行うことなく、自由に変更できるパケット分類器を提供することができる。なお、本実施の形態では、図28に示す領域分割情報に含まれる、各ノードで領域分割に利用するヘッダフィールド数Cや領域分割回路105に含まれるフィールド分割回路の数Cと、各Priority Pipeline Stageに含まれるBV選択回路の数F、また、本パケット分類器無いの検索キーを伝える信号線のビット幅Wは予め定められているため、上述した条件に合う範囲において自由に変更できるパケット分類器であることは明らかである。 Furthermore, in the present embodiment, unlike the first embodiment, packet header information used as a rule is within the range allowed by the bit length W of the rule, the number of fields F, and the number of fields C that can be used for area division. It is possible to provide a packet classifier that can be freely changed without changing the hardware circuit. In the present embodiment, the number C of header fields used for area division at each node and the number C of field division circuits included in the area division circuit 105 included in the area division information shown in FIG. 28, and each Priority Pipeline. Since the number F of the BV selection circuits included in the stage and the bit width W of the signal line for transmitting the search key without this packet classifier are determined in advance, the packet classification can be freely changed within a range that meets the above-described conditions. It is clear that it is a vessel.
(3)第3の実施の形態
(3-1)第3の実施の形態の構成
 次に、本発明の第3の実施の形態について図面を参照して説明する。
(3) Third Embodiment (3-1) Configuration of Third Embodiment Next, a third embodiment of the present invention will be described with reference to the drawings.
 本発明の第3の実施の形態におけるパケット分類器では、ヘッダフィールド単位等、検索キーを複数に分割し、それぞれの検索キー(これをサブ検索キーと呼ぶ)に対応した複数のDecision Treeを用いてパケット分類を行う点が、第1、第2の実施の形態と異なる。 In the packet classifier according to the third embodiment of the present invention, the search key is divided into a plurality of header fields, etc., and a plurality of Decision Trees corresponding to the respective search keys (referred to as sub-search keys) are used. The packet classification is different from the first and second embodiments.
 図31は、本発明の第3の実施の形態におけるパケット分類器の構成を示す図である。図31を参照すると、本発明の第3の実施の形態におけるパケット分類器4は、P個のDecision Tree処理回路(決定木処理回路)30-1、30-2、・・・、30-Pと、最適解選択回路40と、検索キー分離回路50と、を含む。 FIG. 31 is a diagram showing a configuration of a packet classifier according to the third embodiment of the present invention. Referring to FIG. 31, the packet classifier 4 in the third exemplary embodiment of the present invention includes P decision tree processing circuits (decision tree processing circuits) 30-1, 30-2,..., 30-P. And an optimal solution selection circuit 40 and a search key separation circuit 50.
 本実施の形態における入力2は、第1、第2の実施の形態と同様、検索キーが入力される。また、本実施の形態における出力3は、第1、第2の実施の形態と同様、適合したルールのうち、最も適切なルールIDが結果として出力される。 In the input 2 in the present embodiment, a search key is input as in the first and second embodiments. In the output 3 according to the present embodiment, the most appropriate rule ID is output as a result among the matched rules, as in the first and second embodiments.
 検索キー分離回路50は、入力された検索キーを、P個のサブ検索キーに分離し、個々のサブ検索キーを、それぞれのサブ検索キーに対応するDecision Treeを構成しているDecision Tree処理回路に出力する。 The search key separating circuit 50 separates the input search key into P sub-search keys, and each sub-search key is a Decision Tree processing circuit that constitutes a Decision Tree corresponding to each sub-search key. Output to.
 図32は、本発明の第3の実施の形態におけるDecision Tree処理回路の構成を示す図である。本実施の形態におけるDecision Tree処理回路は、第1、第2の実施の形態におけるパケット分類器1のPriority Pipeline20を解候補選択回路21に置き換えた構成であり、解候補選択回路21から最適解選択回路40へ解候補となるルールIDリストが出力される。その他の構成は第1、第2の実施の形態におけるパケット分類器1と同様の構成であるため、詳細な説明は省略する。 FIG. 32 is a diagram illustrating a configuration of a Decision Tree processing circuit according to the third embodiment of the present invention. The decision tree processing circuit in the present embodiment has a configuration in which the priority pipeline 20 of the packet classifier 1 in the first and second embodiments is replaced with a solution candidate selection circuit 21, and an optimum solution selection from the solution candidate selection circuit 21 is performed. A rule ID list as a solution candidate is output to the circuit 40. Since other configurations are the same as those of the packet classifier 1 in the first and second embodiments, detailed description thereof is omitted.
 解候補選択回路21は、H+1個のBit Vector(BV)処理回路21-0、21-1、21-2、・・・、21-(H-1)、21-Hから構成される。図33は、本実施の形態におけるBV処理回路の構成を示すブロック図である。図33を参照すると、本実施の形態におけるBV処理回路は、図21に示す本発明の第1、第2の実施の形態におけるPriority Pipeline Stageの構成において、優先度チェック回路203を、解候補ルールIDリスト生成回路205に置き換え、前段のPriority Pipeline StageからのルールIDの入力、及び後段のPriority Pipeline Stageに対するルールIDの出力が無く、代わりに解候補ルールIDリスト生成回路205から、解候補となるルールIDリストを最適解選択回路40へ出力する構成であり、その他の構成は、図21に示す本発明の第1、第2の実施の形態におけるPriority Pipeline Stageの構成と同様であるため、詳細な説明は省略する。 The solution candidate selection circuit 21 includes H + 1 bit vector (BV) processing circuits 21-0, 21-1, 21-2, ..., 21- (H-1), 21-H. FIG. 33 is a block diagram showing a configuration of the BV processing circuit in the present embodiment. Referring to FIG. 33, the BV processing circuit according to the present embodiment includes a priority check circuit 203 as a solution candidate rule in the configuration of the priority pipeline stage in the first and second embodiments of the present invention shown in FIG. Replaced with the ID list generation circuit 205, there is no input of the rule ID from the preceding Priority Pipeline Stage, and no output of the rule ID for the Priority Pipeline Stage in the subsequent stage, and instead the solution candidate rule ID list generation circuit 205 becomes a solution candidate. This is a configuration for outputting the rule ID list to the optimum solution selection circuit 40, and the other configuration is the same as the configuration of the Priority Pipeline Stage in the first and second embodiments of the present invention shown in FIG. Do description thereof is omitted.
 解候補ルールIDリスト生成回路205は、ORゲート202から入力された本BV処理回路における最終的なBVを受け取ると共に、Tree Pipeline Stageから入力されたアドレス値に従って、ルールIDリスト記憶ブロック204からルールIDリストを読み出す。続いて、ORゲート202から受け取ったBVの各ビット位置の値が1であれば、それに対応するルールIDリストのルールIDはそのままの値とし、0であれば、そのルールには適合していないことを示すため、当該ルールIDのビットを全て1とする。ルールIDのビットが全て1である場合、そのルールIDはdon’t careとし、そのルールID領域には適合するルールが存在しないことを意味する。上記のようにして生成したルールIDリストを最適解選択回路40に出力する。 The solution candidate rule ID list generation circuit 205 receives the final BV in the present BV processing circuit input from the OR gate 202, and the rule ID from the rule ID list storage block 204 according to the address value input from the Tree Pipeline Stage. Read the list. Subsequently, if the value of each bit position of the BV received from the OR gate 202 is 1, the rule ID of the corresponding rule ID list is left as it is, and if it is 0, it does not conform to the rule. Therefore, all the bits of the rule ID are set to 1. When all the bits of the rule ID are 1, the rule ID is don't care, which means that there is no matching rule in the rule ID area. The rule ID list generated as described above is output to the optimum solution selection circuit 40.
 最適解選択回路40には、P個のDecision Tree回路に含まれるH+1個のBV処理回路から、合計P×(H+1)個のルールIDリストが入力される。このうち、同一のDecision Treeに含まれるH+1個のBV処理回路から入力されたルールIDリストは、それらを結合して当該サブ検索キーに対する解候補ルールIDリストとなる。図34は、本発明の第3の実施の形態におけるルールIDリストの構成例を示す図である。最適解選択回路40では、P個のこれら解候補ルールIDリストを比較し、P個の解候補ルールIDリスト全て含まれるルールIDを確認した上で、最も優先度が高い解を最適解とし、そのルールIDを出力3として出力する。なお、P個の解候補ルールIDリスト全てに含まれるルールIDの確認処理については、単なる比較処理であり、当事者にとっては容易に実現できるため、詳細な説明は省略する。 The optimal solution selection circuit 40 receives a total of P × (H + 1) rule ID lists from the H + 1 BV processing circuits included in the P decision tree circuits. Among these, the rule ID lists input from the H + 1 BV processing circuits included in the same Decision Tree are combined into a solution candidate rule ID list for the sub search key. FIG. 34 is a diagram illustrating a configuration example of a rule ID list according to the third embodiment of the present invention. The optimum solution selection circuit 40 compares the P candidate solution rule ID lists, confirms the rule IDs included in all the P solution candidate rule ID lists, and sets the solution with the highest priority as the optimum solution. The rule ID is output as output 3. Note that the confirmation processing of the rule IDs included in all the P solution candidate rule ID lists is merely a comparison processing and can be easily realized by the parties, and thus detailed description thereof is omitted.
 本実施の形態では、ルールを構成する単一、又は複数のフィールド毎、あるいは、ルールのビット長を固定的に複数に分割する等し、P個に分割したフィールド、ビット長毎にDecision Treeを構成する。このようにして構成したP個のDecision Treeは、それぞれP個のDecision Tree処理回路によって構成される。より具体的には、Decision Tree処理回路におけるTree Pipeline10上にDecision Treeが構成され、解候補選択回路21のBV処理回路において、第1、第2の実施の形態におけるParallel BV処理が実行される。但し、この場合、各Decision Tree処理回路によって処理した解はあくまでその分割したフィールド、又はビット長に対して適合した解であり、ルール、つまり検索キー全体に対して適合しているかは不明である。このため、各Decision Tree処理回路で解候補となったルールIDを基に最適解選択回路40にて、再度確認を行い、最適解を選択する。 In this embodiment, the decision tree is set for each field or bit length divided into P pieces, for example, by dividing the bit length of the rule into a plurality of fields or a fixed number of fields constituting the rule. Constitute. The P decision trees configured in this way are each constituted by P decision tree processing circuits. More specifically, the Decision Tree is configured on the Tree Pipeline 10 in the Decision Tree processing circuit, and the Parallel BV processing in the first and second embodiments is executed in the BV processing circuit of the solution candidate selection circuit 21. However, in this case, the solution processed by each Decision Tree processing circuit is only a solution that matches the divided field or bit length, and it is unclear whether the rule, that is, the entire search key is applicable. . For this reason, the optimum solution selection circuit 40 performs confirmation again based on the rule ID that is a solution candidate in each Decision Tree processing circuit, and selects the optimum solution.
(3-2)第3の実施の形態の動作
 次に、図35の本発明の第3の実施の形態における動作を示す流れ図を参照しながら、本実施の形態における動作について説明する。
(3-2) Operation of the Third Embodiment Next, the operation of the present embodiment will be described with reference to the flowchart of FIG. 35 showing the operation of the third embodiment of the present invention.
 本実施の形態におけるパケット分類の動作では、まず、入力2として入力された検索キーを、検索キー分離回路50にて、P個のDecision Treeに対応するサブ検索キーに分離し、それぞれのサブ検索キーを各Decision Tree処理回路に出力する(ステップA8)。ここで、本実施の形態では、上述したように、ルール、つまり検索キーを構成する単一、又は複数のフィールド毎、あるいは、ルールのビット長を固定的に複数に分割する等し、P個に分割したフィールド、ビット長毎にDecision Treeを構成している。サブ検索キーは、このP個に分割したそれぞれのフィールド、又はビット群を指す。 In the packet classification operation in the present embodiment, first, the search key input as input 2 is separated into sub-search keys corresponding to P Decision Trees by the search key separation circuit 50, and each sub-search is performed. The key is output to each Decision Tree processing circuit (step A8). Here, in the present embodiment, as described above, a rule, that is, a single or a plurality of fields constituting a search key, or a rule bit length is fixedly divided into a plurality of P pieces. A Decision Tree is configured for each field and bit length. The sub search key indicates each field or bit group divided into P pieces.
 続いて、各Decision Tree処理回路では、第1、第2の実施の形態における動作と同様に、図9に示すステップA1からA7の処理を行う(ステップA9)。ここでは、第1、第2の実施の形態におけるDecision Treeが、検索キー全体に対するDecision Treeであり、本実施の形態におけるDecision Treeは、サブ検索キーに対するTreeであるという点のみが異なり、本質的には何ら変わりはない。より具体的に、図36に、ステップA2における本実施の形態におけるParallel BV処理時の動作を示す流れ図を示す。本実施の形態では、解候補選択回路21の各BV処理回路において、図36に示すParallel BV処理を行う。図36を参照すると、本処理は、基本的に図23に示す第1、第2の実施の形態におけるParallel BV処理と同様である。各BV処理回路では、各Tree Pipeline Stageから、アドレス値や検索キー(ここではサブ検索キーとなる)、その有効ビット長が入力され、ステップB1からステップB4までの処理を、実行する(ステップB7)。本ステップB7の処理は、第1、第2の実施の形態と同様であるため、詳細な説明は省略する。各BV処理回路における解候補ルールIDリスト生成回路205では、Tree Pipeline Stageから入力されたアドレス値に従って、ルールIDリスト記憶ブロック204からルールIDリストを読み出す。この読み出したルールIDリストに対し、ORゲート202から入力されたBVの各ビット位置の値を確認しながら、最適解選択回路40に出力するルールIDリストを生成する。ここで、ORゲート202から入力されたBVの各ビットに対して、その値が1であれば、そのビット位置に対応するルールは解候補であることを意味するため、ルールIDリストの当該ルールIDはそのままの値とし、各ビットの値が0であれば、そのルールには適合していないことを示すため、当該ルールIDのビットを全て1とする(ステップB8)。なお、ルールIDのビットが全て1である場合、そのルールIDはdon’t careとし、そのルールID領域には適合するルールが存在しないことを意味するものとする。 Subsequently, each Decision Tree processing circuit performs the processing of Steps A1 to A7 shown in FIG. 9 in the same manner as the operations in the first and second embodiments (Step A9). Here, the only difference is that the Decision Tree in the first and second embodiments is the Decision Tree for the entire search key, and the Decision Tree in the present embodiment is the Tree for the sub search key. There is no change. More specifically, FIG. 36 shows a flowchart showing the operation during the Parallel BV processing in the present embodiment in step A2. In the present embodiment, the Parallel BV process shown in FIG. 36 is performed in each BV processing circuit of the solution candidate selection circuit 21. Referring to FIG. 36, this process is basically the same as the Parallel BV process in the first and second embodiments shown in FIG. In each BV processing circuit, an address value, a search key (in this case, a sub search key), and its effective bit length are input from each Tree Pipeline Stage, and the processing from Step B1 to Step B4 is executed (Step B7). ). Since the process of this step B7 is the same as that of 1st, 2nd embodiment, detailed description is abbreviate | omitted. The solution candidate rule ID list generation circuit 205 in each BV processing circuit reads the rule ID list from the rule ID list storage block 204 in accordance with the address value input from the Tree Pipeline Stage. A rule ID list to be output to the optimum solution selection circuit 40 is generated while checking the value of each bit position of the BV input from the OR gate 202 with respect to the read rule ID list. Here, for each bit of BV input from the OR gate 202, if the value is 1, it means that the rule corresponding to the bit position is a solution candidate, so that the rule in the rule ID list The ID is left as it is, and if the value of each bit is 0, it indicates that the rule does not conform, and therefore all the bits of the rule ID are set to 1 (step B8). When all the bits of the rule ID are 1, the rule ID is don't care, meaning that there is no matching rule in the rule ID area.
 上記のようにして生成したルールIDリストを最適解選択回路40に出力する。最適解選択回路40では、P個のDecision Tree処理回路に含まれるH+1個のBV処理回路から、それぞれのサブ検索キーに対する適合ルールのルールIDリストが入力される。これらのルールIDリストのうち、同一のDecision Tree処理回路に含まれるBV処理回路からのルールIDリストを結合し、解候補ルールIDリストを生成する(ステップA10)。 The rule ID list generated as described above is output to the optimum solution selection circuit 40. In the optimum solution selection circuit 40, a rule ID list of matching rules for each sub search key is input from H + 1 BV processing circuits included in the P decision tree processing circuits. Of these rule ID lists, rule ID lists from BV processing circuits included in the same Decision Tree processing circuit are combined to generate a solution candidate rule ID list (step A10).
 最後に、最適解選択回路40では、P個の解候補ルールIDリスト全てに含まれるルールIDを確認すると共に、それらのルールのうち最も優先度の高いルールを最適解として、最終的な解とする(ステップA11)。 Finally, the optimal solution selection circuit 40 confirms the rule IDs included in all P solution candidate rule ID lists, and sets the rule with the highest priority among these rules as the optimal solution. (Step A11).
 なお、上記の本実施の形態では、第1の実施の形態をベースに説明したが、第2の実施の形態をベースに用いても実現可能である。 In the above-described embodiment, the description has been made based on the first embodiment. However, the present embodiment can be implemented using the second embodiment as a base.
 また、第1、第2の実施の形態と同様、各Tree Pipeline Stageにおいて、領域分割情報にVirtual Flagを持たせることで、当該処理ノードが実ノードであるか、Virtual Nodeであるか判断していたが、領域分割情報にVirtual Flagを保持せず、Tree Pipeline Stageの加算器1003の後段において、Priority Pipeline Stageにおけるアドレス変換回路201を備えることで、算出したアドレス値と、後段のPriority Pipeline Stageのワード数(ノード数)Wを比較させることで、Virtual Nodeを判断し、後段のTree Pipeline Stageに対してその情報を出力させることで、同様の処理を実現することが可能である。 Further, as in the first and second embodiments, in each Pipe Pipeline Stage, it is determined whether the processing node is a real node or a Virtual Node by giving a virtual flag to the area division information. However, the virtual flag is not held in the area division information, and the address conversion circuit 201 in the Priority Pipeline Stage is provided in the subsequent stage of the adder 1003 of the Tree Pipeline Stage, so that the calculated address value and the Priority Pipeline Stage in the subsequent stage are included. be to compare the number of words (number of nodes) W P, it determines the Virtual node, be to output the information to the subsequent stage of the Tree Pipeline Stage, real similar processing It is possible to.
 さらに、本実施の形態でも、第1、第2の実施の形態と同様、各Priority Pipeline Stageにおいては、非特許文献3で開示されているParallel BV処理をベースとしているが、これを非特許文献4で開示されているParallel BV処理をベースに用いても良い。 Further, in this embodiment, as in the first and second embodiments, each Priority Pipeline Stage is based on the Parallel BV processing disclosed in Non-Patent Document 3, but this is not the case. The Parallel BV process disclosed in 4 may be used as a base.
 上記に加え、本実施の形態においても、第1、第2の実施の形態と同様、Tree Pipeline Stage10-1にDecision Treeの根ノードが配置される例を用いて説明したが、これをDecision Treeの複数の部分木の根ノードをTree Pipeline Stage10-1から配置していく形態でも構わず、本実施の構成を何ら変更せずに構成することができることは明らかである。 In addition to the above, in the present embodiment as well as in the first and second embodiments, the description has been given using the example in which the root node of the Decision Tree is arranged in the Tree Pipeline Stage 10-1, but this is also described in the Decision Tree. It is obvious that the root nodes of the plurality of subtrees may be arranged from the Tree Pipeline Stage 10-1, and the configuration of this embodiment can be changed without any change.
(3-3)第3の実施の形態の作用効果
 次に、本発明の第3の実施の形態の作用効果について説明する。
(3-3) Effects of Third Embodiment Next, functions and effects of the third embodiment of the present invention will be described.
 本実施の形態では、第1、第2の実施の形態と同様、Dicision TreeとParallel BVを組み合わせることにより、1パケットあたりの処理においてメモリから読み出すデータ量を削減することができ、1つのルールを構成するヘッダフィールド長の総和が大きくなっても、また、ルール数が多くなっても、メモリのDynamic Powerの増加を抑制し、結果的にハードウェア全体の消費電力を増加させないパケット分類器を提供することができる。なお、この際のDicision Treeベースの手法と、本発明におけるパケット分類器の1パケットあたりの処理においてメモリから読み出すデータ量の比較については、第1、第2の実施の形態とサブ検索キーに対してParallel BV処理を行うか否かの違いだけであり、本質的には同様であるため、省略する。 In the present embodiment, as in the first and second embodiments, the amount of data read from the memory in the processing per packet can be reduced by combining the Dition Tree and the Parallel BV. Providing a packet classifier that suppresses the increase in dynamic power of the memory and consequently does not increase the power consumption of the entire hardware even if the total header field length is large or the number of rules is large can do. Note that the comparison of the amount of data read from the memory in the processing based on the Division Tree and the packet classifier in the present invention in this case is the same as in the first and second embodiments and the sub search key. The difference is only whether or not the Parallel BV processing is performed, and the description is omitted because it is essentially the same.
 また、本実施の形態では、第1、第2の実施の形態と同様、Dicision TreeとParallel BVを組み合わせることにより、ルール数が多くても、Dicision Treeによって適合する可能性のあるルール数を絞り込むことができるため、BVのビット長を削減することができ、メモリからデータを読み出すのに必要なクロックサイクル数の増加を抑制できるパケット分類器を提供することができる。 Also, in this embodiment, as in the first and second embodiments, by combining the Combination Tree and Parallel BV, the number of rules that can be matched by the Distribution Tree is narrowed down even if the number of rules is large. Therefore, it is possible to provide a packet classifier that can reduce the bit length of the BV and can suppress an increase in the number of clock cycles required to read data from the memory.
 さらに、本実施の形態では、第2の実施の形態と同様、ルールとして用いるパケットヘッダ情報を、ルールのビット長W、フィールド数F、領域分割に用いることができるフィールド数Cの許す範囲で、ハードウェア回路の変更を行うことなく、自由に変更できるパケット分類器を提供することができる。 Furthermore, in the present embodiment, as in the second embodiment, packet header information used as a rule is within a range permitted by the bit length W of the rule, the number of fields F, and the number of fields C that can be used for area division. It is possible to provide a packet classifier that can be freely changed without changing the hardware circuit.
(4)第4の実施の形態
 次に、本発明の第4の実施の形態について図面を参照して説明する。
(4) Fourth Embodiment Next, a fourth embodiment of the present invention will be described with reference to the drawings.
 図37は、本発明の第4の実施の形態のパケット分類器の構成例を示している。図37において、パケット分類器は、プログラム処理装置5とネットワークインタフェース装置6と、パケット分類プログラム7と、を備える。 FIG. 37 shows a configuration example of a packet classifier according to the fourth embodiment of the present invention. In FIG. 37, the packet classifier includes a program processing device 5, a network interface device 6, and a packet classification program 7.
 プログラム処理装置5は、サーバやPCを初めとするホストのCPU等によって実現される。ネットワークインタフェース装置6は、例えば、サーバの拡張カードやオンボードで搭載されるNIC(Network Interface Card)である。プログラム処理装置7は、サーバやPCをはじめとするホストのCPU等により実現される。 The program processing device 5 is realized by a CPU of a host such as a server or a PC. The network interface device 6 is, for example, a server expansion card or a NIC (Network Interface Card) mounted on board. The program processing device 7 is realized by a CPU of a host such as a server or a PC.
 本実施の形態では、ネットワークインタフェース装置6に、ネットワークから入力されたパケットから、本発明のパケット分類で用いる検索キーを抽出し、プログラム処理装置5に入力する。 In the present embodiment, the search key used in the packet classification of the present invention is extracted from the packet input from the network to the network interface device 6 and input to the program processing device 5.
 パケット分類プログラム7は、プログラム処理装置5によって実行されるコンピュータプログラムであり、プログラム処理装置5の動作を制御する。 The packet classification program 7 is a computer program executed by the program processing device 5 and controls the operation of the program processing device 5.
 プログラム処理装置5には、本発明の第1、第2の実施例におけるパケット分類器1、より具体的にはTree Pipeline10とPriority Pipeline20とを備えており、プログラム処理装置5がパケット分類プログラム7を実行することにより実現される。なお、Tree Pipeline10とPriority Pipeline20の機能は、本発明の第1、第2の実施の形態と同じである。 The program processing device 5 includes the packet classifier 1 in the first and second embodiments of the present invention, more specifically, the Tree Pipeline 10 and the Priority Pipeline 20, and the program processing device 5 includes the packet classification program 7. It is realized by executing. Note that the functions of Tree Pipeline 10 and Priority Pipeline 20 are the same as those in the first and second embodiments of the present invention.
 本発明の第1、第2の実施の形態では、上述のパケット分類器1はハードウェア回路によって実現しているが、同様の処理をソフトウェアによって実行する。さらに、プログラム処理装置5として、複数のCPUコアを有するマルチコアプロセッサ(さらには、より多くのCPUコアを有するメニーコアプロセッサ)によって構成し、各CPUコアに、Tree Pipeline10とPriority Pipeline20に具備されているそれぞれのPipeline Stageの処理を実行させることにより、より高速な処理が可能となる。 In the first and second embodiments of the present invention, the packet classifier 1 described above is realized by a hardware circuit, but the same processing is executed by software. Further, the program processing device 5 is constituted by a multi-core processor having a plurality of CPU cores (and a many-core processor having more CPU cores), and each CPU core is provided in the Tree Pipeline 10 and the Priority Pipeline 20 respectively. By executing the Pipeline Stage process, higher speed processing is possible.
 なお、パケット分類プログラム7は、コンピュータ読み取り可能な記録媒体に記録されていてもよく、プログラム処理装置5として、本発明の第3の実施の形態におけるパケット分類器1の処理を実行させてもよい。 Note that the packet classification program 7 may be recorded on a computer-readable recording medium, and the program processing device 5 may cause the packet classifier 1 in the third embodiment of the present invention to execute processing. .
 以上、本発明の実施の形態が添付の図面を参照することにより説明された。但し、本発明は、上述の実施の形態に限定されず、要旨を逸脱しない範囲で当業者により適宜変更され得る。 The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the above-described embodiment, and can be appropriately changed by those skilled in the art without departing from the gist.
 本発明は、パケットのヘッダ情報から特定のフィールドの組み合わせによって、パケットが属するフローを識別し、QoS処理や負荷分散等、フロー毎に特定の処理を行わせるスイッチやルータ等のネットワーク装置、及びロードバランサー等のアプライアンス装置といった用途に適用できる。 The present invention identifies a flow to which a packet belongs by a combination of specific fields from packet header information and performs a specific process for each flow such as QoS processing or load distribution, and a network device such as a switch and a router, and a load balancer It can be applied to uses such as appliance devices.
 本出願は、2010年3月5日に出願された日本出願特願2010-49051を基礎とする優先権を主張し、その開示の全てをここに取り込む。 This application claims priority based on Japanese Patent Application No. 2010-49051 filed on Mar. 5, 2010, the entire disclosure of which is incorporated herein.

Claims (10)

  1.  複数のフィールドを用いて定義された多数のルールから構成されるルールセットから、被検索対象である検索キーが適合するルールを、複数種類の予め決められた少数の長さのビット配列を用いて検索するパケット分類器であって、
     決定木(Decision Tree)を用いて、多数のルールから適合する可能性のあるルールを予め決められた個数に絞り込み、
     検索キーのうち予め決められたデータ毎に決定木で絞り込んだルール数と同じ長さのビット配列を利用し、これらのビット配列のビット位置が示すルール識別子をリストとして備えたルール識別子リストを用いて、絞り込んだルールから適合するルールを特定し、
     特定されたルールの優先度に応じて最終的結果としての適合ルールを決定する、
     ことを特徴とするパケット分類器。
    From a rule set composed of a large number of rules defined using a plurality of fields, a rule that matches the search key to be searched is selected using a plurality of types of bit arrays having a predetermined small number of lengths. A packet classifier to search for,
    Using a decision tree, we narrow down the rules that can be matched from a large number of rules to a predetermined number,
    Using a bit identifier having the same length as the number of rules narrowed down by the decision tree for each predetermined data in the search key, and using a rule identifier list having rule identifiers indicated by the bit positions of these bit arrays as a list Identify the matching rule from the narrowed-down rules,
    Determine the final matching rule according to the priority of the identified rule,
    A packet classifier.
  2.  前記パケット分類器は、
     決定木を用いて、多数のルールから適合する可能性のあるルールを予め決められた個数に絞り込む処理をパイプライン制御によって行うツリーパイプライン処理回路と、
     検索キーのうち予め決められたデータ毎に決定木で絞り込んだルール数と同じ長さのビット配列を利用し、これらのビット配列のビット位置が示すルール識別子をリストとして備えたルール識別子リストを用いて、絞り込んだルールから適合するルールを特定する処理と、特定されたルールの優先度に応じて最終的結果としての適合ルールを決定する処理と、をパイプライン制御によって行うプライオリティパイプライン処理回路と、
     を備えることを特徴とする請求項1に記載のパケット分類器。
    The packet classifier
    A tree pipeline processing circuit that performs processing by pipeline control to narrow down a rule that may match from a large number of rules to a predetermined number using a decision tree;
    Using a bit identifier having the same length as the number of rules narrowed down by the decision tree for each predetermined data in the search key, and using a rule identifier list having rule identifiers indicated by the bit positions of these bit arrays as a list A priority pipeline processing circuit that performs processing for identifying a rule to be matched from the narrowed down rules, processing for determining a matching rule as a final result according to the priority of the identified rule, and pipeline control. ,
    The packet classifier according to claim 1, comprising:
  3.  前記ツリーパイプライン処理回路は、
     決定木の根ノードから開始し、深さ方向に1つノードを辿る処理を実行する複数のツリーパイプライン処理部を備え、
     さらに、前記複数のツリーパイプライン処理部の各々は、
     当該ツリーパイプライン処理部で処理するノードの領域分割情報を記憶する領域分割情報記憶ブロックと、
     領域分割情報を読み出すメモリコントローラと、
     領域分割情報を基に、入力された検索キーを用いて領域分割を行い、後段のツリーパイプライン処理部で処理するノードの領域分割情報が記憶された領域分割情報記憶ブロックに対するアドレス値を算出する領域分割回路と、
     検索キーの有効ビット長を更新する有効ビット長更新回路と、
     当該ツリーパイプライン処理部に入力された検索キーにある一定の遅延を持たせ、他の出力と同期させるための検索キー遅延回路と、を備え、
     さらに、前記領域分割回路は、
     当該ノードの領域分割情報から領域分割に用いるヘッダフィールド毎にその分割数を切り出す領域分割情報分離回路と、
     ヘッダフィールド毎に領域分割処理を行うフィールド分割回路と、
     前記領域分割情報分離回路の出力と前記フィールド分割回路の出力とを基に、後段のツリーパイプライン処理部で処理するノードの領域分割情報が記憶されたアドレス値を決定する決定部と、を備え、
     前記プライオリティパイプライン処理回路は、
     前記ツリーパイプライン処理部で処理したノードのルール識別子リストに対して、そのルール識別子リストと、ルール識別子リストの順序とビット位置とが対応付けられたビット配列と、を参照しながら、適合するルールを特定する処理と、それまでに適合すると判断したルールの中から優先度に応じてその時点で最も適合するルールを決定する処理と、を実行する複数のプライオリティパイプライン処理部を備え、
     さらに、前記複数のプライオリティパイプライン処理部の各々は、
     検索キーに含まれる各ヘッダフィールドのデータを抽出するフィールド分離回路と、
     前記ツリーパイプライン処理部から指定されたアドレス値から実際にルール識別子リストを有するノードであるかを判断するアドレス変換回路と、
     当該ノードの前記ビット配列を選択する複数のビット配列選択回路と、
     適合ルール候補のうち最も適合するルールを選択する優先度チェック回路と、
     ルール識別子リストを記憶するルールIDリスト記憶ブロックと、を備え、
     さらに、前記ビット配列選択回路は、
     検索キーから切り出したヘッダフィールドの値によって適切な前記ビット配列を選択する探索回路と、
     ビット配列を記憶するビット配列記憶ブロックと、を備える、
     ことを特徴とする請求項2に記載のパケット分類器。
    The tree pipeline processing circuit includes:
    A plurality of tree pipeline processing units for executing a process starting from the root node of the decision tree and tracing one node in the depth direction,
    Further, each of the plurality of tree pipeline processing units includes:
    An area division information storage block for storing area division information of nodes processed by the tree pipeline processing unit;
    A memory controller that reads out the region division information;
    Based on the area division information, the area is divided using the input search key, and an address value for the area division information storage block in which the area division information of the node to be processed by the subsequent tree pipeline processing unit is calculated is calculated. An area dividing circuit;
    An effective bit length update circuit for updating the effective bit length of the search key;
    A search key delay circuit for causing a search key input to the tree pipeline processing unit to have a certain delay and synchronizing with another output;
    Further, the region dividing circuit includes:
    An area division information separation circuit that extracts the number of divisions for each header field used for area division from the area division information of the node;
    A field division circuit that performs region division processing for each header field;
    A determination unit that determines an address value in which region division information of a node to be processed by a subsequent tree pipeline processing unit is stored based on the output of the region division information separation circuit and the output of the field division circuit; ,
    The priority pipeline processing circuit includes:
    A rule that matches a rule identifier list of a node processed by the tree pipeline processing unit with reference to the rule identifier list and a bit array in which the order and bit position of the rule identifier list are associated with each other And a plurality of priority pipeline processing units for executing a process for determining the most suitable rule at that time in accordance with the priority from among the rules determined to be matched so far,
    Further, each of the plurality of priority pipeline processing units includes:
    A field separation circuit that extracts data of each header field included in the search key;
    An address conversion circuit that determines whether the node actually has a rule identifier list from the address value specified by the tree pipeline processing unit;
    A plurality of bit array selection circuits for selecting the bit array of the node;
    A priority check circuit that selects the most suitable rule among the matching rule candidates;
    A rule ID list storage block for storing a rule identifier list,
    Further, the bit array selection circuit includes:
    A search circuit for selecting an appropriate bit arrangement according to the value of the header field cut out from the search key;
    A bit array storage block for storing the bit array;
    The packet classifier according to claim 2.
  4.  前記決定木のノードにおける領域分割情報は、
     当該ノードが決定木における葉ノードであるか否かを示すフラグと、
     決定木の各ノードにおいて領域を分割するために用いる特定数のヘッダフィールドに対する当該ノードにおける分割数と、
     当該ノードの子ノードの領域分割情報が格納されている領域分割情報記憶ブロックに対するベースアドレスと、
     当該ノードが実ノードではなく仮想ノードであることを示すフラグと、から構成され、
     前記分割数は、当該ヘッダフィールドに対して2で分割する場合に、kで指定される
     ことを特徴とする請求項3に記載のパケット分類器。
    The area division information in the decision tree node is:
    A flag indicating whether or not the node is a leaf node in the decision tree;
    The number of divisions at that node for a particular number of header fields used to divide the region at each node of the decision tree;
    A base address for an area division information storage block in which area division information of child nodes of the node is stored;
    A flag indicating that the node is not a real node but a virtual node, and
    The number of divisions, in the case of split 2 k with respect to the header field, a packet classifier according to claim 3, characterized in that specified by k.
  5.  前記複数のツリーパイプライン処理部の各々は、
     さらに、各ノードにおける領域分割情報の分割数をフィールド識別子によって識別し、そのフィールド識別子を実際のルールに規定されたヘッダフィールドと対応付け、必要な情報を抽出するフィールド抽出回路を備える、
     ことを特徴とする請求項3に記載のパケット分類器。
    Each of the plurality of tree pipeline processing units includes:
    Furthermore, a field extraction circuit that identifies the division number of the area division information in each node by a field identifier, associates the field identifier with a header field defined in an actual rule, and extracts necessary information is provided.
    The packet classifier according to claim 3.
  6.  前記決定木のノードにおける領域分割情報は、
     当該ノードが決定木における葉ノードであるか否かを示すフラグと、
     決定木の各ノードにおいて領域を分割するために用いるヘッダフィールドの当該ノードにおける分割数を示すフィールド識別子と分割数の組と、
     当該ノードの子ノードの領域分割情報が格納されている領域分割情報記憶ブロックに対するベースアドレスと、
     当該ノードが実ノードではなく仮想ノードであることを示すフラグと、から構成され、
     前記分割数は、当該ヘッダフィールドに対して2で分割する場合に、kで指定される
     ことを特徴とする請求項5に記載のパケット分類器。
    The area division information in the decision tree node is:
    A flag indicating whether or not the node is a leaf node in the decision tree;
    A set of a field identifier and a division number indicating the division number of the header field used to divide the region in each node of the decision tree;
    A base address for an area division information storage block in which area division information of child nodes of the node is stored;
    A flag indicating that the node is not a real node but a virtual node, and
    The number of divisions, in the case of split 2 k with respect to the header field, a packet classifier according to claim 5, characterized in that specified by k.
  7.  前記パケット分類器は、
     ヘッダフィールド単位または特定のビット長単位に独立に構成した複数の決定木に対し、それぞれの決定木毎に、検索キーのうち予め決められたデータ毎にルールを絞り込み、決定木で絞り込んだルール数と同じ長さのビット配列を利用し、これらのビット配列のビット位置が示すルール識別子をリストとして備えたルール識別子リストを用いて、絞り込んだルールから適合する可能性のあるルールを特定し、解候補ルール識別子リストを生成する処理をパイプライン制御によって行う複数の決定木処理回路と、
     前記複数の決定木処理回路で特定された解候補ルール識別子リストから優先度の高い最も適合するルールを選択する最適解選択回路と、
     各決定木処理回路が処理する決定木に対応する検索キーを抽出する検索キー分離回路と、
     を備えることを特徴とする請求項1に記載のパケット分類器。
    The packet classifier
    For multiple decision trees configured independently in header field units or specific bit length units, for each decision tree, the rules are narrowed down for each predetermined data of the search key, and the number of rules narrowed down by the decision tree Using the rule identifier list, which uses the same length bit array as the list, and the rule identifier list that includes the rule identifiers indicated by the bit positions of these bit arrays as a list, the rule that may be matched from the narrowed-down rules is identified, and the solution A plurality of decision tree processing circuits for performing processing for generating a candidate rule identifier list by pipeline control;
    An optimal solution selection circuit that selects a rule with the highest priority from the solution candidate rule identifier list identified by the plurality of decision tree processing circuits;
    A search key separation circuit for extracting a search key corresponding to the decision tree processed by each decision tree processing circuit;
    The packet classifier according to claim 1, comprising:
  8.  前記決定木処理回路は、
     決定木を用いて、多数のルールから適合する可能性のあるルールを絞り込む処理をパイプライン制御によって行うツリーパイプライン処理回路と、
     解候補選択回路と、を備え、
     さらに、前記ツリーパイプライン処理回路は、
     決定木の根ノードから開始し、深さ方向に1つノードを辿る処理を実行する複数のツリーパイプライン処理部を備え、
     さらに、前記複数のツリーパイプライン処理部の各々は、
     当該ツリーパイプライン処理部で処理するノードの領域分割情報を記憶する領域分割情報記憶ブロックと、
     領域分割情報を読み出すメモリコントローラと、
     領域分割情報を基に、入力された検索キーを用いて領域分割を行い、後段のツリーパイプライン処理部で処理するノードの領域分割情報が記憶された領域分割情報記憶ブロックに対するアドレス値を算出する領域分割回路と、
     検索キーの有効ビット長を更新する有効ビット長更新回路と、
     当該ツリーパイプライン処理部に入力された検索キーにある一定の遅延を持たせ、他の出力と同期させるための検索キー遅延回路と、を備え、
     さらに、前記領域分割回路は、
     当該ノードの領域分割情報から領域分割に用いるヘッダフィールド毎にその分割数を切り出す領域分割情報分離回路と、
     ヘッダフィールド毎に領域分割処理を行うフィールド分割回路と、
     前記領域分割情報分離回路の出力と前記フィールド分割回路の出力とを基に、後段のツリーパイプライン処理部で処理するノードの領域分割情報が記憶されたアドレス値を決定する決定部と、を備え、
     前記解候補選択回路は、
     検索キーに含まれる各フィールドのデータを抽出するフィールド分離回路と、
     前記ツリーパイプライン処理部から指定されたアドレス値から実際にルール識別子リストを有するノードであるかを判断するアドレス変換回路と、
     当該ノードの前記ビット配列を選択する複数のビット配列選択回路と、
     前記ルール識別子リストを記憶するルールIDリスト記憶ブロックと、
     前記ビット配列とルール識別子リストを用いて、解候補ルール識別子リストを生成する解候補選択回路と、を備える、
     ことを特徴とする請求項7に記載のパケット分類器。
    The decision tree processing circuit includes:
    A tree pipeline processing circuit that uses pipeline control to narrow down rules that may match from a large number of rules using a decision tree;
    A solution candidate selection circuit,
    Further, the tree pipeline processing circuit includes:
    A plurality of tree pipeline processing units for executing a process starting from the root node of the decision tree and tracing one node in the depth direction,
    Further, each of the plurality of tree pipeline processing units includes:
    An area division information storage block for storing area division information of nodes processed by the tree pipeline processing unit;
    A memory controller that reads out the region division information;
    Based on the area division information, the area is divided using the input search key, and an address value for the area division information storage block in which the area division information of the node to be processed by the subsequent tree pipeline processing unit is calculated is calculated. An area dividing circuit;
    An effective bit length update circuit for updating the effective bit length of the search key;
    A search key delay circuit for causing a search key input to the tree pipeline processing unit to have a certain delay and synchronizing with another output;
    Further, the region dividing circuit includes:
    An area division information separation circuit that extracts the number of divisions for each header field used for area division from the area division information of the node;
    A field division circuit that performs region division processing for each header field;
    A determination unit that determines an address value in which region division information of a node to be processed by a subsequent tree pipeline processing unit is stored based on the output of the region division information separation circuit and the output of the field division circuit; ,
    The solution candidate selection circuit includes:
    A field separation circuit that extracts data of each field included in the search key;
    An address conversion circuit that determines whether the node actually has a rule identifier list from the address value specified by the tree pipeline processing unit;
    A plurality of bit array selection circuits for selecting the bit array of the node;
    A rule ID list storage block for storing the rule identifier list;
    A solution candidate selection circuit that generates a solution candidate rule identifier list using the bit arrangement and the rule identifier list;
    The packet classifier according to claim 7.
  9.  複数のフィールドを用いて定義された多数のルールから構成されるルールセットから、被検索対象である検索キーが適合するルールを検索するパケット分類器によるパケット分類方法であって、
     決定木を用いて、多数のルールから適合する可能性のあるルールを予め決められた個数に絞り込み、
     検索キーのうち予め決められたデータ毎に決定木で絞り込んだルール数と同じ長さのビット配列を利用し、これらのビット配列のビット位置が示すルール識別子をリストとして備えたルール識別子リストを用いて、絞り込んだルールから適合するルールを特定し、
     特定されたルールの優先度に応じて最終的結果としての適合ルールを決定する、
     ことを特徴とするパケット分類方法。
    A packet classification method by a packet classifier that searches a rule set composed of a large number of rules defined using a plurality of fields and that matches a search key that is a search target,
    Using a decision tree, narrow down the number of rules that may match from a large number of rules to a predetermined number,
    Using a bit identifier having the same length as the number of rules narrowed down by the decision tree for each predetermined data in the search key, and using a rule identifier list having rule identifiers indicated by the bit positions of these bit arrays as a list Identify the matching rule from the narrowed-down rules,
    Determine the final matching rule according to the priority of the identified rule,
    A packet classification method characterized by the above.
  10.  複数のフィールドを用いて定義された多数のルールから構成されるルールセットから、被検索対象である検索キーが適合するルールを検索するコンピュータに、
     決定木を用いて、多数のルールから適合する可能性のあるルールを予め決められた個数に絞り込む処理と、
     検索キーのうち予め決められたデータ毎に決定木で絞り込んだルール数と同じ長さのビット配列を利用し、これらのビット配列のビット位置が示すルール識別子をリストとして備えたルール識別子リストを用いて、絞り込んだルールから適合するルールを特定する処理と、
     特定されたルールの優先度に応じて最終的結果としての適合ルールを決定する処理と、
     を実行させることを特徴とするパケット分類プログラム。
    From a rule set consisting of a large number of rules defined using multiple fields to a computer that searches for a rule that matches the search key that is the search target,
    Using a decision tree, a process of narrowing down a rule that may be matched from a large number of rules to a predetermined number,
    Using a bit identifier having the same length as the number of rules narrowed down by the decision tree for each predetermined data in the search key, and using a rule identifier list having rule identifiers indicated by the bit positions of these bit arrays as a list Process to identify the matching rule from the narrowed down rules,
    Determining the final matching rule according to the priority of the identified rule;
    The packet classification program characterized by performing this.
PCT/JP2010/072548 2010-03-05 2010-12-15 Packet classifier, packet classification method, and packet classification program WO2011108168A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012502968A JP5673667B2 (en) 2010-03-05 2010-12-15 Packet classifier, packet classification method, packet classification program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2010049051 2010-03-05
JP2010-049051 2010-03-05

Publications (1)

Publication Number Publication Date
WO2011108168A1 true WO2011108168A1 (en) 2011-09-09

Family

ID=44541840

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/072548 WO2011108168A1 (en) 2010-03-05 2010-12-15 Packet classifier, packet classification method, and packet classification program

Country Status (2)

Country Link
JP (1) JP5673667B2 (en)
WO (1) WO2011108168A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015504196A (en) * 2011-11-08 2015-02-05 ザイリンクス インコーポレイテッドXilinx Incorporated Embedded memory and dedicated processor structure in integrated circuits
EP2813036A4 (en) * 2012-02-07 2015-10-07 Oricane Ab Classification engine for data packet classification
KR102023475B1 (en) * 2018-03-29 2019-09-20 계명대학교 산학협력단 Double cutting based packet classification method and system for high speed security policy detection

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009021892A1 (en) * 2007-08-10 2009-02-19 Alcatel Lucent Method and unit for classifying traffic in ip networks

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009021892A1 (en) * 2007-08-10 2009-02-19 Alcatel Lucent Method and unit for classifying traffic in ip networks

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
FLORIN BABOESCU ET AL.: "Scalable Packet Classification", IEEE/ACM TRANSACTIONS ON NETWORKING, vol. 13, no. ISSUE, February 2005 (2005-02-01), pages 2 - 14 *
WEIRONG JIANG ET AL.: "Energy-Efficient Multi- Pipeline Architecture for Terabit Packet Classification", GLOBAL TELECOMMUNICATIONS CONFERENCE, 2009. GLOBECOM 2009. IEEE, 30 November 2009 (2009-11-30), pages 1 - 6 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015504196A (en) * 2011-11-08 2015-02-05 ザイリンクス インコーポレイテッドXilinx Incorporated Embedded memory and dedicated processor structure in integrated circuits
EP2813036A4 (en) * 2012-02-07 2015-10-07 Oricane Ab Classification engine for data packet classification
US9900409B2 (en) 2012-02-07 2018-02-20 Fabulous Inventions Ab Classification engine for data packet classification
KR102023475B1 (en) * 2018-03-29 2019-09-20 계명대학교 산학협력단 Double cutting based packet classification method and system for high speed security policy detection

Also Published As

Publication number Publication date
JP5673667B2 (en) 2015-02-18
JPWO2011108168A1 (en) 2013-06-20

Similar Documents

Publication Publication Date Title
US10778583B2 (en) Chained longest prefix matching in programmable switch
US7668160B2 (en) Methods for performing packet classification
US8478707B1 (en) System and method for reducing flow rules in forwarding tables
JP3881663B2 (en) Packet classification apparatus and method using field level tree
JP2004517519A (en) Apparatus and method for performing high-speed Internet protocol route lookup and managing routing / forwarding table
JP5807676B2 (en) Packet classifier, packet classification method, and packet classification program
US20070233628A1 (en) Pattern matching technique for high throughput network processing
GB2452760A (en) Storing and searching data in a database tree structure for use in data packet routing applications.
CN112565090B (en) High-speed forwarding method and device
US20050083937A1 (en) IP address lookup method using pipeline binary tree, hardware architecture, and recording medium
Kesselman et al. Space and speed tradeoffs in TCAM hierarchical packet classification
Sun et al. Tree-based minimization of TCAM entries for packet classification
JP5673667B2 (en) Packet classifier, packet classification method, packet classification program
CN106789668B (en) Method and device for processing message
JP5682442B2 (en) Packet classifier, packet classification method, and packet classification program
JP3609358B2 (en) Flow identification search apparatus and method
EP1657859B1 (en) Protocol speed increasing device
Vijay et al. Implementation of memory-efficient linear pipelined IPv6 lookup and its significance in smart cities
Park et al. An efficient IP address lookup algorithm based on a small balanced tree using entry reduction
Matoušek et al. Towards hardware architecture for memory efficient IPv4/IPv6 Lookup in 100 Gbps networks
Lu et al. Packet classification using two-dimensional multibit tries
WO2022097725A1 (en) Information processing device, information processing method, and computer program
JP3591426B2 (en) Method and apparatus for searching for associative information using a plurality of addresses including a prefix
Tata MicroCuckoo Hash Engine for High-Speed IP Lookup
Qu et al. Packet classification on multi-core platforms

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: 10847064

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2012502968

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10847064

Country of ref document: EP

Kind code of ref document: A1