CN107888521A - The method and apparatus that multi-protocols share list item resource pool - Google Patents
The method and apparatus that multi-protocols share list item resource pool Download PDFInfo
- Publication number
- CN107888521A CN107888521A CN201710985768.2A CN201710985768A CN107888521A CN 107888521 A CN107888521 A CN 107888521A CN 201710985768 A CN201710985768 A CN 201710985768A CN 107888521 A CN107888521 A CN 107888521A
- Authority
- CN
- China
- Prior art keywords
- list items
- list
- lpm
- list item
- bucket
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/10—Packet switching elements characterised by the switching fabric construction
- H04L49/103—Packet switching elements characterised by the switching fabric construction using a shared central buffer; using a shared memory
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/25—Routing or path finding in a switch fabric
Abstract
The embodiments of the invention provide the method and apparatus that multi-protocols share list item resource pool, belong to the technical field in multi-protocols shared resource pond.The method that the multi-protocols share list item resource pool includes:Reception is tabled look-up request;The bucket address of bucket in the list item resource pool pre-set according to the request of tabling look-up;And the bucket address in the list item resource pool is written and read;Wherein, the list item resource pool is shared by layer L2 list items, layer L3 list items, most long prefix matching LPM.The present invention is by pre-setting shared list item resource pool, and by sharing the address search in list item resource pool specific to the lookup to bucket address, this is a kind of dividing mode in the protocol item space of fine-grained continuously adjustabe, solves the problems, such as that various protocol item spaces can not flexible allocation.
Description
Technical field
The present invention relates to the technology in multi-protocols shared resource pond, the method for list item resource pool is shared more particularly to multi-protocols
And device.
Background technology
In the L3 Switching even Ethernet exchanging asic chip of the fourth layer is supported, a plurality of agreement flowing water is typically had
Line carries out three layers and the processing of four layer protocols of ether network packet parallel.There are multiple access ports on every streamline, it is necessary to simultaneously
Read-write protocol table.
Each agreement table is the set of one group of agreement data structure, and it externally has one or more read and write access interfaces, interior
Portion is made up of one or more RAM (random access memory), and deposits this group of agreement according to certain sequence of addresses wherein
Data structure.Agreement pipeline unit is written and read access by the reading-writing port of agreement table to each list item.
In actual chips, under some application scenarios, the capacity that may have area protocol table requirement to use is larger;And
Under other application scenarios, possible another part agreement table requires to use larger list item capacity.If all of agreement
Table is all designed according to its maximum capacity, may when the scene residing for it need not use so big list item capacity
Cause the waste of hardware resource.And if be not designed according to maximum capacity, then under some special scenes, it is impossible to reach
To system design considerations.
In order to solve this problem, in many existing Ethernet switching chips, all devise what a kind of multi-protocols were shared
Agreement table.In this shared agreement table, the list item required for each protocol process module is organized, is divided into multiple
Block, it is then that each protocol process module distributes several list item blocks according to application scenarios.So, in different application scenarios
Under, supplied according in each agreement process for the difference of list item capacity requirement, respectively its different number of list item block of distribution
It is used.List item resource distribution can so be optimized, in the case where not reducing design objective, hardware resource is improved and use effect
Rate.
Fig. 1 is to share protocol item organization chart in a kind of chip of prior art, as shown in figure 1, in the chip,
The protocol process module such as layer L2, layer L3 and most long prefix matching LPM are respectively necessary for access protocol list item.In order at these
List item resource-sharing is realized between protocol process module, it is assumed that all list items are divided into the bank of 10 different sizes by this chip
(physical memory banks), such as bank0, bank1 ... ..., wherein bank9, bank0 and bank1 are that L2 protocol processes are special,
Bank6, bank7, bank8 and bank9 are that L3 protocol processes are special, and middle bank2, bank3, bank4 and bank5 is shared
List item memory space, while when needed can also be as the space of LPM list items.If under certain scene, required for L2
Maximum capacity of the list item capacity more than bank0 and bank1, then bank2, bank3, bank4 and bank5 can be used successively;Such as
List item capacity required for fruit L3 exceedes bank6-bank9 maximum capacity, then can use bank5, bank4, bank3 successively
And bank2;In this process, same bank can only be used under certain configuration by some protocol process module, and
List item bank should be deposited continuously used in same protocol process module.So, 5 kinds are shared in this chip not
Same configuration mode, the lower 5 kinds of different application scenarios of corresponding actual conditions are as follows:
In mode zero, L2 uses bank0-bank5, L3 to use bank6-bank9, and LPM is without using any list item;
In mode 1, L2 uses bank0-bank4, L3 to use bank5-bank9, and LPM is without using any list item;
Under pattern 2, L2 uses bank0-bank3, L3 to use bank4-bank9, and LPM is without using any list item;
Under pattern 3, L2 uses bank0-bank2, L3 to use bank3-bank9, and LPM is without using any list item;
Under pattern 4, L2 uses bank0-bank1, L3 to use bank6-bank9, LPM to use bank2-bank5.
As can be seen that in the related chips of Fig. 1, only 5 kinds of configuration modes, that is to say, that the appearance of L2 list items and L3 list items
Amount only has 5 kinds of different situations, and when using LPM list item, only a kind of possible configuration is realized.
Domestic Ethernet switching chip designs manufacturer in high-end chip and wants each protocol processes part
The list item used is organized into 18 block (block).When in use, can be multiple according to the difference being currently configured, each block
Some use in protocol process module.Only have part block to be just allowed to be configured at different agreement in this chip
Manage part to use, other block are also fixed allocation, it is impossible to arbitrarily change.
In both the above mode, the list item capacity that protocol processes part can use can be according to application scenarios and demand
Difference be adjusted.But the granularity of its adjustment is in units of block, i.e., all list items in each block can only belong to same
One protocol processes part.
This processing mode, use can only be configured under several fixed modes, although being easily achieved, can not be supported more
Flexible and changeable application scenarios.However, it is necessary to be carried out to L2, L3 list item that even LPM can be used under certain application environment
More flexible configuration, or even need arbitrarily to adjust its list item capacity that can be used, two ways described above will be unable to
Realize.
The content of the invention
The purpose of the embodiment of the present invention is to provide the method and apparatus that multi-protocols share list item resource pool, various for solving
Protocol item space can not flexible allocation the problem of.
To achieve these goals, should the embodiments of the invention provide a kind of method that multi-protocols share list item resource pool
Method includes:Reception is tabled look-up request;The bucket address of bucket in the list item resource pool pre-set according to the request of tabling look-up;With
And the bucket address in the list item resource pool is written and read;Wherein, the list item resource pool is by layer L2 list items, layer L3 tables
Item, most long prefix matching LPM share.
Optionally, the list item resource pool includes one or more physical memory banks, one or more of physical stores
Each physical memory banks in body include one or more buckets, wherein, the table pre-set according to the request of tabling look-up
The bucket address of bucket includes in item resource pool:Obtained according to the request of tabling look-up by hash index in one or more of buckets
The bucket address of one bucket;And according to the bucket address search to corresponding bucket, and each list item in the corresponding bucket is entered
Row matching, returns to the list item that the match is successful.
Optionally, the L2 list items, the L3 list items, the LPM list items meet following condition:The aggregate depth of the L2 list items
Degree, the total depth of the L3 list items are not more than the total capacity of the list item resource pool with the total depth sum of the LPM list items;Institute
State initial address of the L2 list items in global address space and the total depth sum of the L2 list items exists no more than the L3 list items
Initial address in global address space;Initial address of the L3 list items in global address space is total with the L3 list items
Depth sum is not more than initial address of the LPM list items in global address space;And the LPM list items are in global address
The total depth of initial address and the LPM list items in space is not more than the total depth of the list item resource pool.
Optionally, each bucket in one or more of buckets includes one or more logic list items, and wherein bucket is thing
Manage list item.
Optionally, the address in the list item resource pool pre-set according to the request of tabling look-up includes:For described
L2 list items/L3 list items/LPM list items set the first variable, the second variable, ternary, the 4th variable, wherein described
First variable initial value is set to 1;L2 list items/L3 list items/the LPM is scanned from a high position to low level since highest order
List item, if present bit is not 1, first variable being moved to right 1, highest order mends 0, if present bit is 1, described the
Ternary for the L2 list items/L3 list items/LPM list items local address and the first variable step-by-step and knot
Fruit;If the ternary>The total depth of the L2 list items/L3 list items/LPM list items, then second variable
The total depth of=ternary-L2 list items/L3 list items/the LPM list items, otherwise, second variable=
The ternary;And initial address+institute of the 4th variable=L2 list items/L3 list items/LPM list items
State the second variable;Wherein, the 4th variable is tabled look-up for described in asks the address to be accessed in the list item resource pool.
Correspondingly, present invention also offers the device that a kind of multi-protocols share list item resource pool, the device to include:Receive mould
Block, for receiving request of tabling look-up;Acquisition module, for bucket in the list item resource pool that is pre-set of request of being tabled look-up according to
Bucket address;And module for reading and writing, it is written and read for the bucket address in the list item resource pool;Wherein, the list item
Resource pool is shared by layer L2 list items, layer L3 list items, most long prefix matching LPM.
Optionally, the list item resource pool includes one or more physical memory banks, one or more of physical stores
Each physical memory banks in body include one or more buckets, wherein, the acquisition module is additionally operable to:Please according to described table look-up
Ask the bucket address of the bucket obtained by hash index in one or more of buckets;And arrived according to the bucket address search
Corresponding bucket, and each list item in the corresponding bucket is matched, return to the list item that the match is successful.
Optionally, the L2 list items, the L3 list items, the LPM list items meet following condition:The aggregate depth of the L2 list items
Degree, the total depth of the L3 list items are not more than the total capacity of the list item resource pool with the total depth sum of the LPM list items;Institute
State initial address of the L2 list items in global address space and the total depth sum of the L2 list items exists no more than the L3 list items
Initial address in global address space;Initial address of the L3 list items in global address space is total with the L3 list items
Depth sum is not more than initial address of the LPM list items in global address space;And the LPM list items are in global address
The total depth of initial address and the LPM list items in space is not more than the total depth of the list item resource pool.
Optionally, each bucket in one or more of buckets includes one or more logic list items, and wherein bucket is thing
Manage list item.
Optionally, the acquisition module is additionally operable to:The is set for the L2 list items/L3 list items/LPM list items
One variable, the second variable, ternary, the 4th variable, wherein first variable initial value is set to 1;Since highest order from
A high position scans the L2 list items/L3 list items/LPM list items to low level, if present bit is not 1, by described first
Variable moves to right 1, and highest order mends 0, if present bit is 1, the ternary is the L2 list items/L3 list items/institute
State the local addresses of LPM list items and the first variable step-by-step and result;If the ternary>L2 list items/the institute
The total depth of L3 list items/LPM list items is stated, then the second variable=ternary-L2 list items/L3 tables
The total depth of item/LPM list items, otherwise, the second variable=ternary;And the 4th variable=described
The initial address of L2 list items/L3 list items/LPM list items+second variable;Wherein, the 4th variable is described
Table look-up and ask the address to be accessed in the list item resource pool.
Correspondingly, present invention also offers a kind of exchange chip, instruction is stored with the exchange chip, the instruction is used to make
Obtain machine and perform the application above method.
Pass through above-mentioned technical proposal, it is of the invention by pre-setting shared list item resource pool, and will be to sharing list item resource
Specific to the lookup to bucket address, this is a kind of drawing for protocol item space of fine-grained continuously adjustabe for address search in pond
The mode of dividing, solves the problems, such as that various protocol item spaces can not flexible allocation.
The further feature and advantage of the embodiment of the present invention will be described in detail in subsequent specific embodiment part.
Brief description of the drawings
Accompanying drawing is that the embodiment of the present invention is further understood for providing, and a part for constitution instruction, with
The embodiment in face is used to explain the embodiment of the present invention together, but does not form the limitation to the embodiment of the present invention.Attached
In figure:
Fig. 1 is the organization chart that protocol item is shared in a kind of chip that prior art provides;
Fig. 2 is the flow chart for the method that multi-protocols provided by the invention share list item resource pool;
Fig. 3 is the list item storage organization figure for the list item resource pool that the specific embodiment of the invention provides;
Fig. 4 is 8 entry of L2 list items in the shared list item resource pool that the specific embodiment of the invention provides at one
Storage organization in bucket;
Fig. 5 is 4 kinds of different entry of L3 list items in the shared list item resource pool that the specific embodiment of the invention provides one
Various possible situations during storage are mixed in individual bucket;
Fig. 6 be in the shared list item resource pool that the specific embodiment of the invention provides in LPM list items in a bucket 4
Kind different situations;And
Fig. 7 is the block diagram for the device that multi-protocols provided by the invention share list item resource pool.
Embodiment
The embodiment of the embodiment of the present invention is described in detail below in conjunction with accompanying drawing.It should be appreciated that this
The embodiment of place description is merely to illustrate and explain the present invention embodiment, is not intended to limit the invention embodiment.
Fig. 2 is the flow chart for the method that multi-protocols provided by the invention share list item resource pool, as shown in Fig. 2 this method
Including:
Step 201, request of tabling look-up is received.
Step 202, the bucket address of bucket in the list item resource pool for asking to be pre-set according to tabling look-up.
Step 203, the bucket address in list item resource pool is written and read.
Wherein, list item resource pool is shared by layer L2 list items, layer L3 list items, most long prefix matching LPM.
The method of list item resource pool is shared, it is necessary to list item resource pool be pre-set, then by the table for above multi-protocols
Resource pool is divided into multiple physical memory banks, and L2, L3 and LPM processing component are used in conjunction with this list item resource pool, can be with
According to the difference of current application scene, different memory spaces is distributed for each agreement table in advance, point of memory space here
Realized with the configuration signal being sent into by outside.
Fig. 3 is the list item storage organization figure for the list item resource pool that the specific embodiment of the invention provides, as shown in figure 3, table
The total capacity of item resource pool is 40K, i.e. 40K is deep, is realized using single port RAM, the list item resource pool of the 40K is divided into 8 things
Memory bank is managed, each physical memory banks are 5K deep, wherein, physical memory banks are represented with bank.
Specifically, list item resource pool includes one or more physical memory banks, in one or more physical memory banks
Each physical memory banks includes one or more buckets, wherein, in the list item resource pool pre-set according to request of tabling look-up
The bucket address of bucket includes:The bucket address that a bucket in one or more buckets is obtained by hash index is asked according to tabling look-up;With
And according to bucket address search to corresponding bucket, and each list item in the corresponding bucket is matched, return to what the match is successful
List item.
In general, a list item resource pool includes multiple bank, and a bank includes multiple bucket (bucket), a bucket
In have multiple entry (list item).In Ethernet switching chip, L2, L3 and LPM list item can use Hash (Hash) index side
Formula, that is, after protocol processes part provides the key assignments key of a Hash index, key is mapped to by bucket by Hash functions
Address, then each entry in bucket is matched with key, and return to the entry that the match is successful.
In order to avoid multiple protocol item address spaces clash, L2 list items, L3 list items, LPM list items meet following bar
Part:The total depth sum of the total depth of L2 list items, the total depth of L3 list items and LPM list items is not more than total appearance of list item resource pool
Amount;Initial address of the L2 list items in global address space and the total depth sum of L2 list items are not more than L3 list items in global address
Initial address in space;Initial address of the L3 list items in global address space and the total depth sum of L3 list items are not more than
Initial address of the LPM list items in global address space;And initial address and LPM of the LPM list items in global address space
The total depth of list item is not more than the total depth of list item resource pool.
Still so that the total capacity of list item resource pool is 40K depths as an example, distribution to memory space it is defined below:
l2_addr_depth+l3_addr_depth+lpm_addr_depth≤40K;
l2_addr_start+l2_addr_depth≤l3_addr_start;
l3_addr_start+l3_addr_depth≤lpm_addr_start;
lpm_addr_start+lpm_addr_depth≤40K。
Wherein, l2_addr_start represents initial address of the L2 list items in global address space;l2_addr_depth
Represent the total depth of L2 list items;L3_addr_start represents initial address of the L3 list items in global address space;l3_addr_
Depth represents the total depth of L3 list items;Lpm_addr_start represents initial address of the LPM list items in global address space;
Lpm_addr_depth represents the total depth of LPM list items.
If receiving a request of tabling look-up from the port of tabling look-up of some protocol processes part, if this association that its request accesses
It is req_index to discuss list item local address, judges which protocol item space belonged to according to the request port first, then basis
Whether the depth capacity in the protocol item space judges the received local address req_index beyond list item space model
Enclose.If req_index is more than this protocol item spatial depth, with req_index to depth remainder, its result is at this
Skew in list item local space since initial address.Finally by the skew of this local space and the protocol item initial address
It is added, the address as to be inquired about in global space.
This is due to that hardware realizes that remainder operation is complex, so the present invention is changed to original remainder operation
Enter, specifically, the address in the list item resource pool pre-set according to request of tabling look-up includes:For L2 list items/L3 tables
Item/LPM list items set the first variable, the second variable, ternary, the 4th variable, wherein the first variable initial value is set to 1;From
Highest order starts to scan L2 list items/L3 list items/LPM list items from a high position to low level, if present bit is not 1, by the first variable
Move to right 1, highest order mends 0, if present bit is 1, ternary for L2 list items/L3 list items/LPM list items local address with
First variable step-by-step and result;If ternary>The total depth of L2 list items/L3 list items/LPM list items, then the second variable=
The total depth of ternary-L2 list items/L3 list items/LPM list items, otherwise, the second variable=ternary;Four variables=L2 tables
The variable of initial address+the second of item/L3 list items/LPM list items;Wherein, the 4th variable is request institute in list item resource pool of tabling look-up
The address to be accessed.
Specific embodiment is given below.
If sending a request of tabling look-up from some port of L2 processing components, the local address of its requesting query is l2_
index[15:0], while the initial address of L2 tables is set as l2_addr_start [15:0], the depth of L2 tables is l2_addr_
depth[15:0], then follow the steps below:
(1) the variable l2_addr_depth_mask [15 of one 16 is set:0], its initial value is complete 1, i.e., 16 '
hffff;
(2) since highest order, l2_addr_depth [15 is scanned from left to right successively:0], if present bit is not 1,
Then by l2_addr_depth_mask [15:0] 1 is moved to right, highest order mends 0;If present bit is 1, terminate to scan l2_
addr_depth[15:0], go to (3);
(3) the variable l2_real_index [15 of 16 is set:0] and l2_mask_index [15:0], l2_mask_
index[15:0] value is l2_index [15:0] with l2_addr_depth_mask [15:0] step-by-step and result, i.e. l2_
mask_index[15:0]=l2_index [15:0]&l2_addr_depth_mask[15:0];
(4) if l2_mask_index [15:0]>l2_addr_depth[15:0], then l2_real_index [15 is made:
0]=l2_mask_index [15:0]-l2_addr_depth[15:0];Otherwise, l2_real_index [15 is made:0]=l2_
mask_index[15:0];
(5) the variable l2_global_index [15 of 16 is set:0], l2_global_index [15 is made:0]=l2_
addr_start[15:0]+l2_real_index[15:0], l2_global_index [15:0] it is that L2 processing components are sent
Table look-up request the address to be accessed in global address space.
Similar with L2 processing components for L3 processing components or LPM processing components, in this, it will not go into details.
The specific example that the present invention is applied to L2, L3, LPM is given below, it is assumed that a bucket is 840.
When L2 protocol processes part accesses list item, the bucket in list item resource pool is found using Hash indexed modes,
And connected reference is carried out to 8 entry in the bucket and matched, and return to the entry, an entry that the match is successful
Width can be 103.Here a set bucket is only a kind of example including 8 entry, art technology
Personnel should be appreciated that a bucket can include any number of entry, it is necessary to which explanation, an entry can include
105,103 therein are only used here.
Fig. 4 is 8 entry of L2 list items in the shared list item resource pool that the specific embodiment of the invention provides at one
Storage organization in bucket, it is in L2 tables, the physics list item of 840 bit wides is divided into the logical table of 8 105 bit wides
, the entry of 1 103 is included in each logic list item.It should be noted that bucket is physics list item, the physics list item can be with
It is divided into one or more logic list items.
When L3 protocol processes part accesses list item, the bucket in list item resource pool is found using Hash indexed modes,
Entry shares 4 kinds of different types, and 4 kinds of different entry types can be included in each bucket, each type
Entry width can be chosen as follows:
(1) ipv4unicast (unicast) type:Each entry width can be 86;
(2) ipv4multicast (multicast) type:Each entry width can be 190;
(3) ipv6unicast types:Each entry width can be 190;
(4) ipv6multicast types:Each entry width can be 347.
To the similar of L2 protocol processes parts with more than, by taking ipv4unicast (unicast) as an example, example is each here
Entry width is 86, but this is only an example, and entry width can be other values, for example, with altogether
Resource pool is enjoyed as 840, exemplified by a bucket includes 8 entry, a bucket is generally 105, and above-mentioned example is only adopted
With 86 therein.It is of course also possible to be that a bucket includes 4 entry, an entry is 210, then can be with
Use 190 therein (such as ipv4multicast types) or 170.
Fig. 5 is 4 kinds of different entry of L3 list items in the shared list item resource pool that the specific embodiment of the invention provides one
Various possible situations during storage are mixed in individual bucket, as shown in figure 5, in L3 list items, the physical table of 840 bit wides
Item can be divided into a variety of different forms, and the logical table of 105,210 and 420 can be included in each physics list item
.In division, the physics list item of 840 is divided into the unit of 8 105 bit wides first, the logic list item of each 105 bit wide can
To take any one unit, the logic list item of each 210 bit wide can take unit 0 and 1, or unit 2 and 3, Huo Zhedan
Member 4 and 5, or unit 6 and 7;The logic list item of each 420 bit wide can take unit 0123, or unit 4567.Each
The logic list item of 105 bit wides can include the entry of the ipv4unicast types of 1 86 bit wide, the logic of each 210 bit wide
List item can include the ipv4multicast types of 1 190 bit wide or the entry of ipv6unicast types, each 420 bit wide
Logic list item can include 1 347 bit wide ipv6multicast types entry.
When LPM protocol processes part accesses list item, the bucket in list item resource pool is found using Hash indexed modes,
It is different in following 6 being present:
(1) ipv4 types:Connected reference 12 entry, each entry width can be 70;
(2) ipv4_1 types:Connected reference 8 entry, each entry width can be 105;
(3) ipv6_64 types:Connected reference 8 entry, each entry width can be 105;
(4) ipv6_64_1 types:Connected reference 6 entry, each entry width can be 140;
(5) ipv6_128 types:Connected reference 4 entry, each entry width can be 210;
(6) ipv6_128_1 types:Connected reference 4 entry, each entry width can be 210.
Fig. 6 be in the shared list item resource pool that the specific embodiment of the invention provides in LPM list items in a bucket 4
Kind of different situations, as shown in fig. 6, in LPM tables, if the list item of ipv4 types, then the physics list item bag of 840 bit wides
Entry containing 12 70 bit wides;If the list item of ipv4_1 types or ipv6_64 types, then the physical table of 840 bit wides
Item includes the entry of 8 105 bit wides;If the list item of ipv6_64_1 types, then the physics list item of 840 bit wides includes
The entry of 6 140 bit wides;If the list item of ipv6_128 types or ipv6_128_1 types, then the thing of 840 bit wides
Manage the entry that list item includes 4 210 bit wides.Similar with above L2 protocol processes part, L3 protocol processes parts, Fig. 6 is also only
It is an example.
So, entirely the list item storage width of shared list item resource pool is 840 bit wides, total capacity 33.6Mb.Each association
The list item space that view processing component (L2, L3 or LPM) can use passes through l2_addr_start, l2_addr_depth, l3_
The signals such as addr_start, l3_addr_depth, lpm_addr_start, lpm_addr_depth are configured;Each
The physics list item of 840 bit wides is a bucket, according to the difference of Current protocol type, is included in each bucket
Entry numbers and its actual bit wide are different.
In order that each list item obtained in list item pond can meet above-mentioned L2, L3 and LPM tableau format demand, the present invention
In, physics list item width is 840, by different protocol processes parts in use, the physics list item meeting of one 840
The logic list item having been categorized into.
Fig. 7 is the block diagram for the device that multi-protocols provided by the invention share list item resource pool, as shown in fig. 7, the device bag
Include receiving module 701, acquisition module 702 and module for reading and writing 703.Wherein receiving module 701 is tabled look-up request for reception;Obtain mould
Block 702 is used for the bucket address according to bucket in the list item resource pool that is pre-set of request of tabling look-up;Module for reading and writing 703 is used for basis
Bucket address in list item resource pool is written and read;Wherein, list item resource pool is by layer L2 list items, layer L3 list items, most long prefix
Shared with LPM.
It should be noted that multi-protocols provided by the invention share the device of list item resource pool detail and benefit with
The method that multi-protocols provided by the invention share list item resource pool is similar, and in this, it will not go into details.
Correspondingly, present invention also offers a kind of exchange chip, instruction is stored with the exchange chip, the instruction is used to make
Obtain machine and perform the application above method.
The optional embodiment of the embodiment of the present invention is described in detail above in association with accompanying drawing, still, the embodiment of the present invention is simultaneously
The detail being not limited in above-mentioned embodiment, can be to of the invention real in the range of the technology design of the embodiment of the present invention
The technical scheme for applying example carries out a variety of simple variants, and these simple variants belong to the protection domain of the embodiment of the present invention.
It is further to note that each particular technique feature described in above-mentioned embodiment, in not lance
In the case of shield, it can be combined by any suitable means.In order to avoid unnecessary repetition, the embodiment of the present invention pair
Various combinations of possible ways no longer separately illustrate.
The present invention supports the Ethernet switching chip of L3 Switching, the agreement streamline share and access look-up table of different levels
When, whole list item is designed to a shared resource pond.The present invention is directed at multiple agreements in Ethernet protocol processing procedure
Reason part is shared when using protocol item, various protocol item spaces can not flexible allocation the problem of, give a kind of fine granularity
Continuously adjustabe protocol item space division and its implementation., can be with by the above technical scheme of the present invention
Bucket is granularity to configure the list item that each protocol processes part can actually use, and each list item space dividing mode is cleverer
It is living;According to the difference of the actual entry width of different agreement list item, a kind of table that can take into account various protocols entry format is devised
Item resource pool, meet various protocols while the demand of share and access list item resource pool;Address computation mode is simple, is easy to hardware
Realize.
In addition, it can also be combined between a variety of embodiments of the embodiment of the present invention, as long as it is not
The thought of the embodiment of the present invention is run counter to, it should equally be considered as disclosure of that of the embodiment of the present invention.
Claims (11)
1. a kind of method that multi-protocols share list item resource pool, it is characterised in that this method includes:
Reception is tabled look-up request;
The bucket address of bucket in the list item resource pool pre-set according to the request of tabling look-up;And
Bucket address in the list item resource pool is written and read;
Wherein, the list item resource pool is shared by layer L2 list items, layer L3 list items, most long prefix matching LPM.
2. according to the method for claim 1, it is characterised in that the list item resource pool includes one or more physical stores
Body, each physical memory banks in one or more of physical memory banks include one or more buckets, wherein, according to described
The bucket address of bucket in the list item resource pool that is pre-set of request of tabling look-up includes:
The bucket address that a bucket in one or more of buckets is obtained by hash index is asked according to described table look-up;And
According to the bucket address search to corresponding bucket, and each list item in the corresponding bucket is matched, return to matching
Successful list item.
3. method according to claim 1 or 2, it is characterised in that the L2 list items, the L3 list items, the LPM list items
Meet following condition:
The total depth of the L2 list items, the total depth of the L3 list items are with the total depth sum of the LPM list items no more than described
The total capacity of list item resource pool;
Initial address of the L2 list items in global address space and the total depth sum of the L2 list items are not more than the L3
Initial address of the list item in global address space;
Initial address of the L3 list items in global address space and the total depth sum of the L3 list items are not more than the LPM
Initial address of the list item in global address space;And
Initial address of the LPM list items in global address space and the total depth of the LPM list items are not more than the list item
The total depth of resource pool.
4. according to the method for claim 2, it is characterised in that each bucket in one or more of buckets includes one
Or multiple logic list items, wherein bucket is physics list item.
5. according to the method for claim 1, it is characterised in that provided according to the list item that the request of tabling look-up is pre-set
Address in the pond of source includes:
For the L2 list items/L3 list items/LPM list items, the first variable, the second variable, ternary, the 4th are set
Variable, wherein first variable initial value is set to 1;
L2 list items/L3 list items/the LPM list items are scanned from a high position to low level since highest order, if present bit
It is not 1, then first variable is moved to right 1, highest order mends 0, if present bit is 1, the ternary is the L2
The local address of list item/L3 list items/LPM list items and the first variable step-by-step and result;
If the ternary>The total depth of the L2 list items/L3 list items/LPM list items, then second variable
The total depth of=ternary-L2 list items/L3 list items/the LPM list items, otherwise, second variable=
The ternary;And
The initial address of the 4th variable=L2 list items/L3 list items/LPM list items+second variable;
Wherein, the 4th variable is tabled look-up for described in asks the address to be accessed in the list item resource pool.
6. a kind of multi-protocols share the device of list item resource pool, it is characterised in that the device includes:
Receiving module, for receiving request of tabling look-up;
Acquisition module, the bucket address for bucket in the list item resource pool that is pre-set of request of being tabled look-up according to;And
Module for reading and writing, it is written and read for the bucket address in the list item resource pool;
Wherein, the list item resource pool is shared by layer L2 list items, layer L3 list items, most long prefix matching LPM.
7. device according to claim 6, it is characterised in that the list item resource pool includes one or more physical stores
Body, each physical memory banks in one or more of physical memory banks include one or more buckets, wherein, the acquisition
Module is additionally operable to:
The bucket address that a bucket in one or more of buckets is obtained by hash index is asked according to described table look-up;And
According to the bucket address search to corresponding bucket, and each list item in the corresponding bucket is matched, return to matching
Successful list item.
8. the device according to claim 6 or 7, it is characterised in that the L2 list items, the L3 list items, the LPM list items
Meet following condition:
The total depth of the L2 list items, the total depth of the L3 list items are with the total depth sum of the LPM list items no more than described
The total capacity of list item resource pool;
Initial address of the L2 list items in global address space and the total depth sum of the L2 list items are not more than the L3
Initial address of the list item in global address space;
Initial address of the L3 list items in global address space and the total depth sum of the L3 list items are not more than the LPM
Initial address of the list item in global address space;And
Initial address of the LPM list items in global address space and the total depth of the LPM list items are not more than the list item
The total depth of resource pool.
9. device according to claim 7, it is characterised in that each bucket in one or more of buckets includes one
Or multiple logic list items, wherein bucket is physics list item.
10. device according to claim 6, it is characterised in that the acquisition module is additionally operable to:
For the L2 list items/L3 list items/LPM list items, the first variable, the second variable, ternary, the 4th are set
Variable, wherein first variable initial value is set to 1;
L2 list items/L3 list items/the LPM list items are scanned from a high position to low level since highest order, if present bit
It is not 1, then first variable is moved to right 1, highest order mends 0, if present bit is 1, the ternary is the L2
The local address of list item/L3 list items/LPM list items and the first variable step-by-step and result;
If the ternary>The total depth of the L2 list items/L3 list items/LPM list items, then second variable
The total depth of=ternary-L2 list items/L3 list items/the LPM list items, otherwise, second variable=
The ternary;And
The initial address of the 4th variable=L2 list items/L3 list items/LPM list items+second variable;
Wherein, the 4th variable is tabled look-up for described in asks the address to be accessed in the list item resource pool.
11. a kind of exchange chip, it is characterised in that instruction is stored with the exchange chip, the instruction is used to machine is performed
Method described in any one of the application the claims 1-5 claim.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710985768.2A CN107888521B (en) | 2017-10-20 | 2017-10-20 | Method and device for sharing table resource pool by multiple protocols |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710985768.2A CN107888521B (en) | 2017-10-20 | 2017-10-20 | Method and device for sharing table resource pool by multiple protocols |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107888521A true CN107888521A (en) | 2018-04-06 |
CN107888521B CN107888521B (en) | 2021-01-01 |
Family
ID=61781840
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710985768.2A Active CN107888521B (en) | 2017-10-20 | 2017-10-20 | Method and device for sharing table resource pool by multiple protocols |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107888521B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113098798A (en) * | 2021-04-01 | 2021-07-09 | 烽火通信科技股份有限公司 | Method for configuring shared table resource pool, packet switching method, chip and circuit |
CN113254081A (en) * | 2021-06-16 | 2021-08-13 | 中国人民解放军国防科技大学 | Mirror image reading and writing system and method for control path in exchange chip |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1538663A (en) * | 2003-04-16 | 2004-10-20 | 华为技术有限公司 | Method of finding route table item using ltsh chain table |
CN1612562A (en) * | 2003-10-28 | 2005-05-04 | 武汉烽火网络有限责任公司 | Method and device for realizing different IP data packet repeating using strategic flow |
CN104283782A (en) * | 2014-10-14 | 2015-01-14 | 杭州华三通信技术有限公司 | Method and device for determining message forwarding paths in multi-protocol label switching network |
US20160309288A1 (en) * | 2014-10-14 | 2016-10-20 | Radius Networks Inc. | Interleaving multiple bluetooth low energy advertisements |
-
2017
- 2017-10-20 CN CN201710985768.2A patent/CN107888521B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1538663A (en) * | 2003-04-16 | 2004-10-20 | 华为技术有限公司 | Method of finding route table item using ltsh chain table |
CN1612562A (en) * | 2003-10-28 | 2005-05-04 | 武汉烽火网络有限责任公司 | Method and device for realizing different IP data packet repeating using strategic flow |
CN104283782A (en) * | 2014-10-14 | 2015-01-14 | 杭州华三通信技术有限公司 | Method and device for determining message forwarding paths in multi-protocol label switching network |
US20160309288A1 (en) * | 2014-10-14 | 2016-10-20 | Radius Networks Inc. | Interleaving multiple bluetooth low energy advertisements |
Non-Patent Citations (1)
Title |
---|
付仲满,张辉,刘涛,: ""Hash算法在网络处理器中的实现"", 《计算机工程》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113098798A (en) * | 2021-04-01 | 2021-07-09 | 烽火通信科技股份有限公司 | Method for configuring shared table resource pool, packet switching method, chip and circuit |
CN113098798B (en) * | 2021-04-01 | 2022-06-21 | 烽火通信科技股份有限公司 | Method for configuring shared table resource pool, packet switching method, chip and circuit |
CN113254081A (en) * | 2021-06-16 | 2021-08-13 | 中国人民解放军国防科技大学 | Mirror image reading and writing system and method for control path in exchange chip |
Also Published As
Publication number | Publication date |
---|---|
CN107888521B (en) | 2021-01-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11012258B2 (en) | Packet transmission | |
US7724728B2 (en) | Policy-based processing of packets | |
CN103795644B (en) | Policy Table's list item collocation method, apparatus and system | |
CN107888521A (en) | The method and apparatus that multi-protocols share list item resource pool | |
CN105518631B (en) | EMS memory management process, device and system and network-on-chip | |
CN109728984A (en) | A kind of access system, method and device | |
CN105450494A (en) | Virtual network and method for implementing same | |
CN108169716A (en) | SAR imaging system matrix transposition devices and pattern deinterleaving method based on SDRAM chips | |
CN101188429B (en) | A bit interleaver and method for bit interleaving | |
CN105743678A (en) | Method and apparatus for managing table space of ternary content addressable memory (TCAM) | |
CN105630727A (en) | Access method, apparatus and system among multi-SoC nodes | |
CN105373497B (en) | matrix transposition device based on DSP chip | |
US9548885B2 (en) | Systems and methods for providing replicated data from memories to processing clients | |
CN105446935B (en) | It is shared to store concurrent access processing method and device | |
CN107888513A (en) | Caching method and device for exchange chip | |
CN106100953A (en) | The generation method of PCIe collaborative share network, Apparatus and system | |
CN102646058A (en) | Method and device for selecting node where shared memory is located in multi-node computing system | |
CN109788075A (en) | The acquisition methods and Edge Server of the private network network architecture, data | |
US20220197824A1 (en) | Elastic resource management in a network switch | |
US20060181940A1 (en) | Memory address generating circuit and memory controller using the same | |
US7793034B2 (en) | Memory controller and method for multi-path address translation in non-uniform memory configurations | |
CN104636268B (en) | The restructural caching product of one kind and method | |
US20060004943A1 (en) | Computer system for interleave memory accessing among a plurality of nodes | |
US10901917B1 (en) | Address scrambling for storage class memory | |
CN104932990B (en) | The replacement method and device of data block in a kind of cache memory |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB03 | Change of inventor or designer information |
Inventor after: Wu Nan Inventor after: Li Xiajuan Inventor after: You Ziwei Inventor after: Yang Jianzhe Inventor after: Wang Kefei Inventor before: Wu Nan Inventor before: Qi Xingyun Inventor before: Li Xiajuan Inventor before: You Ziwei Inventor before: Yang Jianzhe Inventor before: Wang Kefei |
|
CB03 | Change of inventor or designer information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |