A method and device for mask quintuple rule matching
A matching device and quintuple technology, applied to electrical components, other database retrieval, other database indexes, etc., can solve the problems of TCAM storage space overhead and weak rule expansion, etc., to improve mask quintuple rules capacity, improved utilization, and cost-saving effects
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0033] Taking a network data traffic processing device as an example, there are 3 IPv4 mask quintuple rules. The SIP and DIP address fields are expressed in the form of suffix masks, and the SP, DP, and P fields are all masked to 0, and they don't care. And the result length is fixed 4 bytes, as shown in Table 1:
[0034] Database User Data
[0035] SIP=1.1.1.0 / 24, DIP=2.2.2.0 / 24, SP=10000, DP=80, P=6 Result A
[0036] SIP=1.1.2.0 / 24, DIP=2.2.2.0 / 24, SP=10000, DP=80, P=6 Result B
[0037] SIP=1.1.3.0 / 24, DIP=2.2.2.0 / 24, SP=10000, DP=80, P=6 Result C
[0038] Table 1
[0039] According to the traditional storage method, the storage space of 3 rules is occupied, and the unconcerned part is represented by X. The TCAM storage space consumed by the matching part of the three mask quintuple rules in Table 1 is 20*3=60 bytes. The result The partially consumed storage space is 4*3=12 bytes, such as figure 1 shown.
[0040] A rule matching method provided by this embodiment inclu...
Embodiment 2
[0048] In the rule matching method provided by this embodiment, a rule valid flag is introduced into the result part corresponding to each rule, occupying 1 bit of storage space, and the flag is set when the mask rule entry is created to indicate whether there is a corresponding The mask quintuple rule for .
[0049] The merged rule uses the value of the 2-bit merge bit as the offset of the result part to index the result corresponding to each rule, and judges whether the rule exists according to whether the rule valid flag in the result is set. The specific rule matching process is as follows Figure 4 As shown, the specific steps include:
[0050] Step 11.1, the program starts;
[0051] Step 11.2, data message input;
[0052] Step 11.3, extract the quintuple information according to the data message, and send it to the TCAM for rule table entry search;
[0053] Step 11.4, the merged rule uses the value of the merged bit as the offset of the result part to index the corres...
Embodiment 3
[0058] A mask quintuple rule matching device applied to a ternary content addressable memory TCAM chip provided by this embodiment specifically includes:
[0059] The rule merging module is used to identify the merging bit feature of the suffix mask in the mask quintuple rule in the Database part, and merge multiple mask quintuple rules including the recognized merging bits into one rule;
[0060] The matching result indexing module is used to jointly store the corresponding matching results of the merged multiple rules in the User Data part corresponding to this merged rule, and assign the above-mentioned merged bits to the corresponding matching results as an index respectively;
[0061] The matching module is used for indexing the final matching result based on the merging bit after the quintuple information of the data packet is matched with the merging rule.
[0062] In the rule matching apparatus provided by this embodiment, the rule merging module further includes: a me...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


