CN100479436C - Management and maintenance method for static multi-interface range matching table - Google Patents

Management and maintenance method for static multi-interface range matching table Download PDF

Info

Publication number
CN100479436C
CN100479436C CNB2005101240855A CN200510124085A CN100479436C CN 100479436 C CN100479436 C CN 100479436C CN B2005101240855 A CNB2005101240855 A CN B2005101240855A CN 200510124085 A CN200510124085 A CN 200510124085A CN 100479436 C CN100479436 C CN 100479436C
Authority
CN
China
Prior art keywords
management
interface
rule
static multi
priority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2005101240855A
Other languages
Chinese (zh)
Other versions
CN1866918A (en
Inventor
胡睿
余蓁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2005101240855A priority Critical patent/CN100479436C/en
Publication of CN1866918A publication Critical patent/CN1866918A/en
Application granted granted Critical
Publication of CN100479436C publication Critical patent/CN100479436C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a method for managing and maintaining the static multi-interface match list, which comprises: first, building independently one group of related management maintaining structure for each interface group in said match list, while the management maintaining structure of each interface group is independent to other, and said structure contains the priority relationships between said structures; each management maintaining structure unit is relative to one rule of one interface group; then using said management maintaining structure to manage and maintain the rules of each interface group in the match list, according to the priorities. With said invention, the match list can effectively use advantages of memories as TCAM to manage and maintain, to improve the search and maintain efficiency.

Description

The management and maintenance method of static multi-interface range matching table
Technical field
The present invention relates to the memory management technique field, relate in particular to a kind of management and maintenance method of static multi-interface range matching table.
Background technology
Static multi-interface range matching table is the static multi-interface range matching table that has the demand of commensurate in scope interface packets.GroupID (group identification) group refers to and can supply multiplexing interface group, comprises a plurality of commensurate in scope rules in each interface group.Between each GroupID group is separate, and is present in jointly in the same range matching table.There is not any logical relation between the GroupID group, so there is not the branch of priority sequencing.
At present, released a kind of TCAM (Ternary Content Addressable Memory, Ternary Content Addressable Memory), what they were different with normal memory is: the addressing system of normal memory is an Input Address, output content; And described Content Addressable Memory can obtain the address according to the content of input, that is to say, when importing a content when (being called comparand usually), TCAM can compare the data among comparand and the TCAM, if hit, then export the address of hitting list item, each memory cell of TCAM is except " 0 ", " 1 ", a kind of in addition " don ' t care " state promptly not only can but also can be " 1 " for " 0 ".
Because TCAM has the function of ternary storage, therefore, when comparand of input, can there be content and comparand in a plurality of TCAM address to hit, the list item of depositing among the TCAM has the priority feature, the list item of low physical address has higher priority, the lookup result of the list item correspondence that output priority is the highest occurring under the situation of hitting more.
It is as follows to use TCAM to carry out the method that scope represents: the ternary storage mode of TCAM provides storage mode very easily for the data of band mask, and the data of band mask are actually a kind of special scope, such as from 2 n~2 N+1-1 scope; For general scope, can split into the union of several such special range, can prove that data bit width is that any range of the data segment of n can split into the individual scope that can directly leave the special data/mask form among the TCAM in of 2 (n-1) at most.Article one, after range matching table represents that according to the scope of TCAM table rule is split as one or more scopes interval, can be used as one or more TCAM list item and deposit TCAM in.
TCAM has the characteristics of priority storage, and its low address position list item always has high priority.Therefore, the interpolation of list item and deletion attended operation must sort according to the following priority of forwarding list item and add and deletion, with guarantee TCAM list item storage order meet issue search the priority requirement.Because do not have the logical relation of priority between the static multi-interface range matching table of each interface group correspondence, and need to share the TCAM space in the same scope, therefore, the difficulty of carrying out the list item attended operation increases greatly.
At present, also there is not a kind of management and maintenance method of good static multi-interface range matching table can be so that the storage of the static multi-interface range matching table of many interfaces can effectively utilize the advantage of TCAM memory.
Summary of the invention
In view of above-mentioned existing in prior technology problem, the purpose of this invention is to provide a kind of management and maintenance method of static multi-interface range matching table, thus can be so that static multi-interface range matching table can utilize the advantage of TCAM to carry out storage administration.
The objective of the invention is to be achieved through the following technical solutions:
The invention provides a kind of management and maintenance method of static multi-interface range matching table, comprising:
A, set up the management maintenance structure of one group of association respectively for each interface group in the static multi-interface range matching table, separate and interweave and be stored in the common storage space with priority storage feature between the management maintenance structure of described each interface group correspondence, according to priority related between each the management maintenance structure that is comprised in described one group of management maintenance structure, and a rule under the corresponding interface group of each management maintenance structure;
B, utilize described some groups of management maintenance structures the rule under each interface group in the described static multi-interface range matching table of preserving to be carried out the management maintenance of branch priority.
Described steps A comprises:
Adopt data structure that the management maintenance structure of each interface group correspondence is managed, needing in data structure provides the corresponding interface group index for the management maintenance structure under each interface group.
Described steps A comprises:
The corresponding regular node of each management maintenance structure in described one group of management maintenance structure, commensurate in scope rule in the corresponding described static multi-interface range matching table of described regular node adopts binary tree structure, structure of arrays or list structure to manage each regular node that comprises in the described static multi-interface range matching table.
Described steps A comprises:
Adopt the balanced binary tree structure that the management maintenance structure of each interface group correspondence in the described static multi-interface range matching table is managed, according to priority related between described each management maintenance structure.
The information of described management maintenance structure management comprises:
Interface group information under regular node balance factor, the rule, priority, regular breakdown item number, front priority node, back priority node, the rule of rule in affiliated interface group decomposes first list item and/or rule is decomposed the tail list item, and when adopting the described management maintenance structure of balanced binary tree structure connection, the information of described management maintenance structure management also comprises left child's regular node pointer and right child's regular node pointer.
Described static multi-interface range matching table is stored in the three-state content addressable memory TCAM, perhaps with the preservation of TCAM with search in the identical memory of feature.
When increasing the static multi-interface range matched rule in static multi-interface range matching table, described step B comprises:
B1, determine corresponding one group of management maintenance structure according to the interface group information under the described rule;
B2, search one group of management maintenance structure and determine that described static multi-interface range matched rule is added to the position in the three-state content addressable memory TCAM, and add described static multi-interface range matched rule among the TCAM relevant position.
Described step B2 comprises:
B21, described static multi-interface range matched rule is split as corresponding TCAM list item, if in the described TCAM list item during insertion of the remaining enough new regulation list items of list item number, whether the idle list item of then judging corresponding insertion position is enough, if, execution in step B22 then, otherwise, execution in step B23;
B22, the TCAM list item after splitting is added among the TCAM by the corresponding space proportion of respective priority according to priority under the list item;
B23, search for idle list item to low address with to high address, after search obtains enough idle list items, these idle list items that search moved at the place, insertion position that determines, idle list item is moved the insertion position after, execution in step B22.
Described step B23 comprises:
B231, in the insertion position of determining along searching for clear position according to priority block to low address with to the high address both direction, record clear position quantity in search procedure, and write down the distance that this clear position comprises and will add list item position priority block farthest;
B232, when the quantity of the clear position that finds is enough, to add list item position priority block farthest from the distance that finds and begin the position of priority block among TCAM moved to the direction with new interpolation list item position opposite.
Among the present invention, when deletion static multi-interface range matched rule, described step B comprises:
B3, search management maintenance structure that the corresponding management of each rule enclosed structure is determined described static multi-interface range matched rule correspondence;
B4, according to all list items of this matched rule correspondence of preserving in the described management maintenance structural information deletion three-state content addressable memory TCAM, and revise corresponding management maintenance structure.
Described method also comprises:
When need between the rule of two continuous priority, insert one new when regular, then need to adjust each regular corresponding priorities absolute figure, the relative priority level relation between each rule is constant.
As seen from the above technical solution provided by the invention, realization of the present invention can be so that static multi-interface range matching table can effectively utilize the advantage of the memory of TCAM or similar TCAM to carry out storage administration.Utilize the present invention can be so that the search of list item is finished by hardware, attended operations such as the insertion of commensurate in scope list item, deletion, aging, renewal be then finished by software, thereby can improve the efficient of searching and safeguarding the static interface range matching table.
Description of drawings
Fig. 1 is a regular node structural representation provided by the invention;
Fig. 2 is TCAM inlet enclosed structure schematic diagram among the present invention;
Fig. 3 is for increasing the processing procedure schematic diagram of list item among the present invention;
Fig. 4 moves the process schematic diagram for list item provided by the invention;
Fig. 5 is a remove entries processing procedure schematic diagram provided by the invention;
Fig. 6 is the processing procedure schematic diagram of delete interface group provided by the invention.
Embodiment
Core of the present invention is in the range matching table of reality, the storage of rule in TCAM under each interface group of different GroupID (interface group sign) geographically is interweaved, promptly for each interface group, there is not the priority sequencing between each interface group, thereby the regular shared same memory space of all interface group in the table.In same memory space, guarantee the priority orders of list item in memory (as the TCAM chip) of the different range matched rule correspondence in the same GroupID group by algorithm.The present invention also is applicable to the preservation of TCAM and searches in other identical any memories of feature.
Therefore, the present invention proposes a kind of effective static multi-interface range matching table maintaining method, effectively improved current static multi-interface range matching table present situation difficult in maintenance.Simultaneously, the present invention has also solved when maintenance is stored among the general TCAM commensurate in scope list item, and contents in table itself does not possess under the situation of priority tag, to the problem of the maintenance management difficulty of static multi-interface range matching table.
In follow-up description, will be that example carries out technical scheme provided by the invention is set forth explanation to adopt TCAM to store static ACL table, the ACL table of subsequent descriptions part is all to refer to static ACL table without specified otherwise.
For the present invention there being further understanding, will be described in detail the method for the invention below.
Because the priority that different acl rules is corresponding different, the tissue of data is divided according to priority block among the TCAM, the corresponding memory block of rule that priority is high is placed on low physical address (i.e. top), and the corresponding memory block of rule that priority is low is placed on higher physical address (i.e. below).
Therefore, the characteristics of range matching algorithm provided by the invention are:
1, every acl rule a plurality of list items in can corresponding TCAM;
2, the priority number that can support of maximum is more, to ACL, how many acl rules is arranged, and what priority are range matching algorithm just need;
3, owing to need the user to specify the priority of a list item of new interpolation, when the user need have between two rules of continuous priority insert one new when regular, need to adjust the absolute figure of some regular priority, and the priority relativeness is constant.
Method of the present invention can be from the superficial to the deep from GroupID interface group level, commensurate in scope rule level and three levels of regular corresponding TCAM list item level.Wherein:
(1) top layer is the enclosed structure to all GroupID, the concrete data structures such as array or chained list that adopt can realize this enclosed structure, being used for some groups of management maintenance structures of docking port group manages and index, for example, when the enclosed structure that adopts array as interface group, one group of management maintenance structure of the corresponding interface group of then corresponding array element specifically can adopt the interface group index of array element offset address as the corresponding interface group;
(2) second layer is the enclosed structure to the strictly all rules of each interface group, i.e. one of an interface group correspondence group of management maintenance structure, can adopt the management maintenance structure of array, chained list or binary tree between each management maintenance structure that described one group of management maintenance structure comprises, many rules of each management maintenance structure correspondence that comprises in the same interface group can continuously or disperse and be stored in the corresponding memory space, do not require that promptly each rule in the same interface group is stored in the memory space continuously;
(3) bottom is the maintenance and management structure to all corresponding TCAM list items of each commensurate in scope rule, same rule will be stored in a plurality of TCAM list items by fractionation, and this one deck is just realized the management of each TCAM list item that a rule to a management maintenance structure correspondence comprises.
Based on above-mentioned three-decker, will describe specific implementation of the present invention below.
Among the present invention, for the commensurate in scope rule of each new interpolation, at first the interface group that is subordinate to according to rule is assigned to it in corresponding GroupID enclosed structure.Then, rule is split as carries out maintenance management after the TCAM list item adds.
Be each rule in the corresponding static multi-interface range matching table to be managed maintenance among the present invention by the management maintenance structure of setting up corresponding static multi-interface range matched rule, described management maintenance structure includes, but are not limited to following content and form:
(1) regular node balance factor, the management maintenance structure that is used for the record rule correspondence is positioned at the position balance factor information of balanced binary tree;
(2) interface group information under the rule is used to identify the affiliated interface group identification information of this rule;
(3) priority of rule in affiliated interface group is used for writing down the precedence information of this rule in this interface group;
(4) regular breakdown item number, the TCAM list item number after being used to write down described rule and being decomposed;
(5) left child's regular node pointer is used for writing down the left child nodes pointer of this rule in the node correspondence of binary tree;
(6) right child's regular node pointer is used for writing down the right child nodes pointer of this rule in the node correspondence of binary tree;
(7) forward direction priority node pointer is used for writing down the previous node pointer of this rule in the high priority direction of TCAM;
(8) back is used for writing down the back node pointer of this rule in the low priority direction of TCAM to the priority node pointer;
(9) rule is decomposed first list item pointer, is used for writing down the head node of the regular list item subclass that is stored in TCAM after node rule is decomposed, corresponding article one decomposition rule;
(10) rule is decomposed tail list item pointer, is used for writing down the tail node of the regular list item subclass that is stored in TCAM after node rule is decomposed, corresponding the last item decomposition rule.
Among the present invention, preferred balanced binary tree manages maintenance to described static multi-interface range matching table, certainly, also can adopt other binary trees or modes such as array, chained list that described static multi-interface range matching table is managed.
Be example to adopt balanced binary tree that static multi-interface range matching table is managed, respectively corresponding balanced binary tree of each interface group in the described static multi-interface range matching table, each rule that is used for this interface group is comprised manages, as shown in Figure 1, respectively corresponding concrete rule of each node in the described balanced binary tree, the management maintenance structure by correspondence can manage maintenance to this rule.
In the balanced binary tree enclosed structure of strictly all rules correspondence, the equal correspondence of each bar commensurate in scope rule of same interface group is under the jurisdiction of in the same balanced binary tree structure in the maintained range matching table, the priority of each node is lower than the priority of all nodes on its left subtree, and is higher than the priority of all nodes on its right subtree.And, carrying out the TCAM list item when safeguarding, begin to determine the node insertion position by the root node position of tree by priority relatively, or deleted node location, and be updated node location.
In the TCAM table, also can oppositely safeguard the priority of each node, simultaneously, corresponding management process also needs to adjust accordingly, and concrete implementation is apparent, so no longer describe in detail.
Being that example is done with general introduction TCAM list item attended operation implementation method below with the acl rule, specifically is that example is done with general introduction TCAM list item attended operation implementation method with the acl rule.
For the situation of a plurality of GroupID, need build an enclosed structure-regular node balanced binary tree respectively at each GroupID.Between the enclosed structure of each GroupID correspondence (being corresponding one group of management maintenance structure) is separate, and interweaves and be stored in the same ACL table.That is to say, do not have any logical relation between the enclosed structure of described GroupID correspondence, so there is not the branch of priority sequencing.And the storage of the rule of different GroupID in TCAM geographically is interweaved.
For guaranteeing the priority orders of list item in the TCAM chip of the different acl rule correspondences among the same GroupID.Then need to set up corresponding GroupID and safeguard array (or other forms of enclosed structure), the attribute of array element comprises the pointer of GroupID index, GroupID effective status, GroupID group strictly all rules enclosed structure etc.When this GroupID was not used, its significance bit was changed to disarmed state.
A kind of specific implementation of the present invention is by each GroupID all being used the mode of a balanced binary tree structure safeguard the commensurate in scope rule that affiliated upper strata issues, each node above the regular corresponding balanced binary tree, corresponding again all the TCAM list items that come by this rule decomposition of node.In the tree node according to certain regular weaves together, when interpolation/deletion/renewal list item by the logical place scope of the quick location node of this structure in this GroupID.Two pointer structures in the corresponding node structure are left child nodes (Pointer of Left Child Node of this Node) and right child nodes (Pointer of Right Child Node of this Node).
Simultaneously, safeguard the index structure of a TCAM entry to all ACL (TCAM inlet) in internal memory, as shown in Figure 2, this structure is an element with the current state attribute of each entry (inlet).Information by can obtaining the current behaviour in service of each entry to the inquiry of this concordance list (promptly whether idle condition).And all wear by doubly linked list for each the status attribute node in each its manipulative indexing of the entry that has used.This structure of arrays is used for the accurately TCAM list item insertion position use of location new regulation when inserting.
To each GroupID use a node in the balanced binary tree adopt the structure of doubly linked list form corresponding to strictly all rules among this GroupID in the actual TCAM chip with priority orders be unique logical relation safeguard chained list (two pointer structures in the corresponding node structure are Preceding Node ofthis Node in this GroupID and Behind Node of this Node in thisGroupID), when carrying out the insertion/deletion of concrete list item/renewal, in time find the logical place of node in tree, so that to the maintenance of commensurate in scope rule.
In addition, issue regular node all to the employed entry information of this node, use when inserting and moving in each of all GroupID.
As depicted in figs. 1 and 2, each Entry attribute node in the TCAM entry enclosed structure corresponding shown in Figure 2 of each entry above the chained list among the node structure figure shown in Figure 1.
After being provided with above-mentioned each layer enclosed structure, the present invention just can utilize corresponding enclosed structure to being stored in the maintenance management of the static multi-interface range matching table in the TCAM table, specifically comprises the management such as increase, deletion of list item.
Following first-selection will describe the processing procedure of carrying out list item interpolation operation among the present invention in conjunction with the accompanying drawings.Need to prove that all nodes mentioned among the present invention and priority all refer to and regular node and the priority that is in the same interface group GroupID group of new interpolation.
As shown in Figure 3, when need increase list item in TCAM, when promptly increasing acl rule in static multi-interface range matching table, corresponding processing procedure comprises among the present invention:
Step 31: acl rule is converted to some TCAM list items that can leave among the TCAM.
Step 32: judge whether the TCAM idle capacity enough inserts the list item number that decomposes the back acquisition;
If the list item number that decomposes gained is greater than the free list item number in the range matching table, when promptly remaining sky was shown the insertion of not enough new regulation among the TCAM, then process finished, and returned and insert the new regulation failure;
If during the insertion of the enough new regulation list items of remaining list item number, continue execution in step 33.
Step 33: judge whether enough new idle list item list item in the legal insertion position insert and use, if then execution in step 34, otherwise, execution in step 36;
This step is specially: basis issues the priority index of rule with the new regulation node in the corresponding priority balanced binary tree of this interface group, and by the binary tree root node begin comparison its with the tree in node priority, determine the node insertion position, determine the new position range of rule in TCAM that insert according to adjacent priority nodal information before and after new node is in same GroupID group: the priority of supposing newly to insert list item is X, the priority index of adjacent piece is respectively M and N before and after existing and the X in table, M<X<N is then arranged, and the priority orders of its corresponding list item is M from high to low, X, N.
Suppose: the free list item number between M and N priority block is InterSpaceMtoN again, insertion priority is that the needed list item space of new acl rule of X is XneedSpace, then judge whether to satisfy InterSpaceMtoN>=XneedSpace, if satisfy this condition, then execution in step 34, otherwise, execution in step 36, i.e. employing is moved algorithm accordingly and is carried out the space adjustment, to obtain the space of enough new list items of insertion;
Step 34: the idle list item of search in legal insertion position;
Step 35: judge whether the idle list item that searches is enough, if then execution in step 39, otherwise, continue execution in step 34.
Step 36: when the insertion of the corresponding list item of the not enough new regulation of the idle list item of new regulation between adjacent two priority block of same GroupID, then in TCAM entry property index array, idle list item space is taken turns to search for from both direction up and down in the position outside the scope between the new regulation two adjacent priority block;
Step 37: judge whether the idle list item search is enough, newly then stop search when adding the list item number that rule will deposit in when the list item space number that searches reaches to hold, and execution in step 38, otherwise, continuation execution in step 36;
Step 38: begin to carry out list item and move, being specially the idle list item that will search moves on the legal priority position, be the TCAM list item move finish after, raise in legal priority position and wholely to obtain inserting the needed list item space of TCAM list item, and execution in step 39;
Step 39: carry out the interpolation operation of new list item, be specially: will need the list item of the acl rule correspondence that increases to be inserted into corresponding position among definite TCAM, and corresponding information is inserted in the balanced binary tree, also need simultaneously tree is adjusted maintenance, make it to keep poised state; In addition, also need this node is inserted the regular node doubly linked list;
So far, just realized corresponding rule is increased among the TCAM.
Need to prove, for moving each time, exchange, can be suppressed to minimum with moving number of times like this if guarantee that list item of the most close insertion position of the adjacent priority block of empty list item and its next close new regulation insertion position.
Again the operation process of deleting acl rule (promptly deleting corresponding list item) according to the present invention in TCAM is described below, as shown in Figure 5, specific as follows:
The GroupID of deletion rule and the priority under this GroupID (index) as required find the TCAM list item position of balanced binary tree regular node correspondence and remove entries.With this node rule and balanced binary tree, adjust binary tree according to balanced binary tree knot removal algorithm list item, and deleted regular node is wiped out out the two-way position chained list of binary tree regular node to new poised state.Then, revise the value of this rule corresponding each entry state node in TCAM entry property index array, it is invalid that Status Flag is changed to.
Among the present invention, can also delete the acl rule of the GroupID group of preserving among the TCAM as required, as shown in Figure 6, concrete implementation method is as follows:
The GroupID that needs is deleted strictly all rules transmits, the interface group ID of the interface group of the rule that i.e. acquisition need be deleted, and travel through each regular node in this interface group balanced binary tree according to this interface group ID, delete all TCAM list item values of its correspondence.At last, delete the release node space one by one according to the two-way position chained list of balanced binary tree node.Simultaneously, revise the value of this rule corresponding each entry state node in TCAM entry property index array, it is invalid that the entry Status Flag is changed to.At last, put GroupID and safeguard that the corresponding GroupID active position in the array is invalid.
In sum, realization of the present invention can be so that static multi-interface range matching table can effectively utilize the advantage of the memory of TCAM or similar TCAM to carry out storage administration.In realizing process of the present invention, can be so that finish by hardware at the search of list item, then finish at attended operations such as the insertion of commensurate in scope list item, deletion, aging, renewals, thereby can improve the efficient of searching and safeguarding the static interface range matching table by software.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.

Claims (11)

1, a kind of management and maintenance method of static multi-interface range matching table is characterized in that, comprising:
A, set up the management maintenance structure of one group of association respectively for each interface group in the static multi-interface range matching table, separate and interweave and be stored in the common storage space with priority storage feature between the management maintenance structure of described each interface group correspondence, according to priority related between each the management maintenance structure that is comprised in described one group of management maintenance structure, and a rule under the corresponding interface group of each management maintenance structure;
B, utilize described some groups of management maintenance structures the rule under each interface group in the described static multi-interface range matching table of preserving to be carried out the management maintenance of branch priority.
2, the management and maintenance method of static multi-interface range matching table according to claim 1 is characterized in that, described steps A comprises:
Adopt data structure that the management maintenance structure of each interface group correspondence is managed, needing in data structure provides the corresponding interface group index for the management maintenance structure under each interface group.
3, the management and maintenance method of static multi-interface range matching table according to claim 1 is characterized in that, described steps A comprises:
The corresponding regular node of each management maintenance structure in described one group of management maintenance structure, commensurate in scope rule in the corresponding described static multi-interface range matching table of described regular node adopts binary tree structure, structure of arrays or list structure to manage each regular node that comprises in the described static multi-interface range matching table.
4, the management and maintenance method of static multi-interface range matching table according to claim 3 is characterized in that, described steps A comprises:
Adopt the balanced binary tree structure that the management maintenance structure of each interface group correspondence in the described static multi-interface range matching table is managed, according to priority related between described each management maintenance structure.
According to the management and maintenance method of claim 1,2,3 or 4 described static multi-interface range matching tables, it is characterized in that 5, the information of described management maintenance structure management comprises:
Interface group information under regular node balance factor, the rule, priority, regular breakdown item number, front priority node, back priority node, the rule of rule in affiliated interface group decomposes first list item and/or rule is decomposed the tail list item, and when adopting the described management maintenance structure of balanced binary tree structure connection, the information of described management maintenance structure management also comprises left child's regular node pointer and right child's regular node pointer.
6, the management and maintenance method of static multi-interface range matching table according to claim 1, it is characterized in that, described static multi-interface range matching table is stored in the three-state content addressable memory TCAM, perhaps with the preservation of TCAM with search in the identical memory of feature.
According to the management and maintenance method of claim 1,2,3,4 or 6 described static multi-interface range matching tables, it is characterized in that 7, when increasing the static multi-interface range matched rule in static multi-interface range matching table, described step B comprises:
B1, determine corresponding one group of management maintenance structure according to the interface group information under the described rule;
B2, search one group of management maintenance structure and determine that described static multi-interface range matched rule is added to the position in the three-state content addressable memory TCAM, and add described static multi-interface range matched rule among the TCAM relevant position.
8, the management and maintenance method of static multi-interface range matching table according to claim 7 is characterized in that, described step B2 comprises:
B21, described static multi-interface range matched rule is split as corresponding TCAM list item, if in the described TCAM list item during insertion of the remaining enough new regulation list items of list item number, whether the idle list item of then judging corresponding insertion position is enough, if, execution in step B22 then, otherwise, execution in step B23;
B22, the TCAM list item after splitting is added among the TCAM by the corresponding space proportion of respective priority according to priority under the list item;
B23, search for idle list item to low address with to high address, after search obtains enough idle list items, these idle list items that search moved at the place, insertion position that determines, idle list item is moved the insertion position after, execution in step B22.
9, the management and maintenance method of static multi-interface range matching table according to claim 8 is characterized in that, described step B23 comprises:
B231, in the insertion position of determining along searching for clear position according to priority block to low address with to the high address both direction, record clear position quantity in search procedure, and write down the distance that this clear position comprises and will add list item position priority block farthest;
B232, when the quantity of the clear position that finds is enough, to add list item position priority block farthest from the distance that finds and begin the position of priority block among TCAM moved to the direction with new interpolation list item position opposite.
According to the management and maintenance method of claim 1,2,3,4 or 6 described static multi-interface range matching tables, it is characterized in that 10, when deletion static multi-interface range matched rule, described step B comprises:
B3, search management maintenance structure that the corresponding management of each rule enclosed structure is determined described static multi-interface range matched rule correspondence;
B4, according to all list items of this matched rule correspondence of preserving in the described management maintenance structural information deletion three-state content addressable memory TCAM, and revise corresponding management maintenance structure.
According to the management and maintenance method of claim 1,2,3,4 or 6 described static multi-interface range matching tables, it is characterized in that 11, described method also comprises:
When need between the rule of two continuous priority, insert one new when regular, then need to adjust each regular corresponding priorities absolute figure, the relative priority level relation between each rule is constant.
CNB2005101240855A 2005-11-28 2005-11-28 Management and maintenance method for static multi-interface range matching table Expired - Fee Related CN100479436C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005101240855A CN100479436C (en) 2005-11-28 2005-11-28 Management and maintenance method for static multi-interface range matching table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005101240855A CN100479436C (en) 2005-11-28 2005-11-28 Management and maintenance method for static multi-interface range matching table

Publications (2)

Publication Number Publication Date
CN1866918A CN1866918A (en) 2006-11-22
CN100479436C true CN100479436C (en) 2009-04-15

Family

ID=37425807

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005101240855A Expired - Fee Related CN100479436C (en) 2005-11-28 2005-11-28 Management and maintenance method for static multi-interface range matching table

Country Status (1)

Country Link
CN (1) CN100479436C (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8527694B2 (en) 2010-06-11 2013-09-03 Beijing Star-Net Ruijie Networks Co., Ltd. Method and apparatus for updating table entries of a ternary content addressable memory
CN102508813B (en) * 2011-10-11 2013-07-31 盛科网络(苏州)有限公司 Single-interface chip and method for realizing data transmission between chip and multiple TCAMs (ternary content addressable memories) by adopting chip
CN105099918B (en) * 2014-05-13 2019-01-29 华为技术有限公司 A kind of matched method and apparatus of data search
US11474988B2 (en) * 2018-10-02 2022-10-18 Barcelona Supercomputing Center—Centro Nacional de Supercomputación Distributed indexes
CN110377654B (en) * 2019-07-19 2022-05-17 北京字节跳动网络技术有限公司 Data request processing method and device, electronic equipment and computer-readable storage medium
CN113392039B (en) * 2021-06-09 2023-06-20 新华三信息安全技术有限公司 Data storage and searching method and device
CN113656329B (en) * 2021-08-09 2024-02-02 国家计算机网络与信息安全管理中心 Mask rule insertion method based on TCAM, electronic equipment and storage medium
CN115865839B (en) * 2023-01-20 2023-05-23 苏州浪潮智能科技有限公司 ACL management method, ACL management device, communication equipment and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
IPv6的快速路由查找算法研究. 王燕.计算机应用与软件,第22卷第10期. 2005
IPv6的快速路由查找算法研究. 王燕.计算机应用与软件,第22卷第10期. 2005 *
TCAM表项管理算法研究. 赵峥嵘,李鹏,兰巨龙.微计算机信息,第21卷第8-3期. 2005
TCAM表项管理算法研究. 赵峥嵘,李鹏,兰巨龙.微计算机信息,第21卷第8-3期. 2005 *

Also Published As

Publication number Publication date
CN1866918A (en) 2006-11-22

Similar Documents

Publication Publication Date Title
CN100479436C (en) Management and maintenance method for static multi-interface range matching table
CN100566281C (en) The method and apparatus of virtual private network routing search
CN110888886B (en) Index structure, construction method, key value storage system and request processing method
CN107153707B (en) Hash table construction method and system for nonvolatile memory
CN109299113B (en) Range query method with storage-aware mixed index
CN100410949C (en) Data bank system and method for controlling data bank data
CN107066393A (en) The method for improving map information density in address mapping table
CN102484610A (en) Routing table construction method and device and routing table lookup method and device
CN100578469C (en) Storage and polling method and storage controller and polling system
CN108139882B (en) Implement the system and method for stratum's distribution lists of links for network equipment
CN101072178A (en) Switching system routing table management method
CN112000847B (en) GPU parallel-based adaptive radix tree dynamic indexing method
US9672239B1 (en) Efficient content addressable memory (CAM) architecture
CN102521334A (en) Data storage and query method based on classification characteristics and balanced binary tree
CN108134739B (en) Route searching method and device based on index trie
CN100433009C (en) Method for managing and maintaining tatic range matching table
CN109981464A (en) A kind of TCAM circuit structure and its matching process realized in FPGA
US20030188090A1 (en) Content addressable memories having entries stored therein with independently searchable weight fields and methods of operating same
CN102984071B (en) Method for organizing routing table of segment address route and method for checking route
CN100393072C (en) Method and apparatus for storing table entry, and inquiry method
CN105791132B (en) A kind of list item update method and device based on multi-path search tree route querying
CN104794196B (en) A kind of acquisition of tree structure data and update method
CN102904812A (en) Storage method, search method, device and system of routing table entries
CN100386762C (en) Dynamic-range matching listing maintenance
CN104753788A (en) Data forwarding method and device based on index allocation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090415

Termination date: 20161128