CN101350788A - Method for mixed loop-up table of network processor inside and outside - Google Patents
Method for mixed loop-up table of network processor inside and outside Download PDFInfo
- Publication number
- CN101350788A CN101350788A CNA2008102108937A CN200810210893A CN101350788A CN 101350788 A CN101350788 A CN 101350788A CN A2008102108937 A CNA2008102108937 A CN A2008102108937A CN 200810210893 A CN200810210893 A CN 200810210893A CN 101350788 A CN101350788 A CN 101350788A
- Authority
- CN
- China
- Prior art keywords
- hash value
- memory
- searching
- external search
- processing unit
- 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
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses an internal and external combination table searching method for a network processor, which is applied to the table searching operation of the network processor comprising an external search memory and an internal search memory. The method comprises: the HASH operation is respectively carried out on the key value of each table in the internal search memory to obtain the corresponding HASH value of each table, and the position of one or a plurality of tables in the external search memory, which corresponds to each HASH value, is stored in the index table of the internal memory; when the network processor searches the table in the external search memory, the HASH operation is carried out on the key value of the table to be searched to obtain a HASH vale, the index table is searched to obtain the corresponding position of the HASH value, then the table to be searched is searched at the storage position in the external search memory. The invention solves the problem of the existing technology including unable increase of the searching efficiency of the network processor and consequently the low processing ability of the network processor.
Description
Technical field
The present invention relates to the network processes field, more particularly, relate to a kind of method for mixed loop-up table of network processor inside and outside.
Background technology
The third generation network processing unit NP-2 of EZchip company is a kind of monolithic 10G/5G full duplex able to programme linear speed network processing unit, has the data throughout of the highest 20G bit, can be applicable to various larger switch and router.
NP-2 is integrated search engine efficiently can be searched some kinds of tables simultaneously, and each table can comprise up to millions of clauses and subclauses.These tables all are stored in its inner integration search memory (Internal SearchMemory) or the external search memory (External Search Memory).At first analyze the characteristics of two kinds of searching storages: inner searching storage is SRAM, and the data bus interface of 256 bit widths is arranged, and be characterized in the access speed height, but capacity is little, has only 256KB; The external search memory is DRAM, has only the data bus interface of 72 bit widths, be characterized in that access speed is not high, but capacity is big, reaches as high as 2GB.
Therefore, the table that data are bigger is placed in the external search memory usually, does the energy consumption that not only can save chip like this, and can support can store more data in more table or each table.And store some less tables in the inner searching storage usually, as direct table or concordance list.During data in the search list, the inside and outside searching storage independently uses, and is irrelevant mutually.Like this, table (has a lot of as circuit table, transmit etc. searching for greatly when search engine; Or MAC table, have millions of clauses and subclauses) time, need externally in the searching storage back and forth access data repeatedly, because the access speed of DRAM is not high, if directly externally search in the searching storage, cause the speed of tabling look-up slower easily, but also cause HASH (hash) conflict easily (if the HASH conflict takes place, also to use another kind of algorithm computation key assignments, in current results, continue to search), like this, will cause the decline of internal data throughput, thus a bottleneck on the handling property of formation network processing unit.
Summary of the invention
Technical problem solved by the invention is to provide a kind of method for mixed loop-up table of network processor inside and outside, can't improve the network processing unit search efficiency to solve in the prior art, causes the low problem of network processing unit disposal ability.
In order to address the above problem, the invention provides a kind of method for mixed loop-up table of network processor inside and outside, be applied to comprise the table lookup operation of the network processing unit of external search memory and inner searching storage, may further comprise the steps:
The key assignments of each table in the described external search memory is done hash HASH computing respectively, obtain the corresponding HASH value of each table, in a concordance list of described internal storage, preserve each HASH value pairing one with a plurality of extra-searching storages in the memory location;
When described network processing unit is searched table in the external search memory, the key assignments for the treatment of look-up table carries out the HASH computing and obtains a HASH value, search described concordance list then and obtain the corresponding memory location of this HASH value, described table to be found is searched in this memory location in the external search memory then.
Method of the present invention wherein, further comprises:
Write down the table sign in the described network processing unit and shown the corresponding relation of stored memory with this, described network processing unit judges that according to the sign of the table in the table key assignments to be found that carries in the order this table is table in the inner searching storage or the table in the external search memory after receiving table look-up command.
Wherein, comprise a plurality of clauses and subclauses in the described concordance list, each clauses and subclauses has been preserved the memory location in one or more extra-the corresponding searching storage of a certain HASH value.
Wherein, the table in described certain HASH value and the external search memory is preserved the first address in this extra-searching storage at once in the clauses and subclauses of this HASH value in described concordance list.
Wherein, table in described certain HASH value and a plurality of external search memory is at once, to store in the mode of watch chain in these a plurality of extra-searching storages, in described concordance list, preserve the externally first address in the searching storage of this watch chain in the clauses and subclauses of this HASH value.
Wherein, when described network processing unit is searched described table to be found, for directly reading this table or in table to be found, searching certain data to be found.
Compared with prior art, the inside and outside searching storage that the present invention can work alone the network processing unit of similar NP-2 originally joins together to search for form, and search efficiency is improved, thereby promotes the disposal ability of network processing unit.
Description of drawings
Fig. 1 be network processing unit of the present invention within it, the table stored in the external search memory and the corresponding relation schematic diagram between the table;
Fig. 2 is a method concrete operations flow chart of the present invention.
Embodiment
Below embodiment is described in detail, but not as a limitation of the invention.
Technical scheme main thought of the present invention is: less at capacity, but the less concordance list of storage data in the inner faster searching storage of seek rate (SRAM), and in the slower external search memory (DRAM) of seek rate the bigger real tables of data of memory capacity, as MAC table, interface table or circuit table etc.The key assignments of each table in the external search memory is done hash HASH computing respectively, obtain the corresponding HASH value of each table, in a concordance list of internal storage, preserve the memory location in each HASH value pairing and a plurality of extra-the searching storages, and in searching the process of concordance list, might produce the situation of HASH conflict, the key assignments of for example all circuit table carries out after the HASH computing may corresponding same HASH value, in this case, the present invention links these circuit table in the external search memory, preserves the first address of this watch chain in concordance list in the clauses and subclauses of this HASH value.Even like this under the situation that the HASH conflict takes place, method of the present invention also can externally find in the searching storage by key assignments wants that circuit table of searching.
Following mask body is an example with network processing unit NP-2, describes method of the present invention in detail.
At first, as shown in Figure 1, for network processing unit of the present invention within it, the table stored in the external search memory and the corresponding relation schematic diagram between the table; Wherein, concordance list is stored in the inner searching storage, wherein comprises the corresponding clauses and subclauses of n HASH value, and each clauses and subclauses has been preserved the memory location in one or more extra-the searching storage of HASH value correspondence.Table in certain HASH value and the external search memory is preserved the first address in this extra-searching storage at once in the clauses and subclauses of this HASH value in concordance list; Table in certain HASH value and a plurality of external search memory will be stored in the mode of watch chain in these a plurality of extra-searching storages at once, preserves the externally first address in the searching storage of this watch chain in concordance list in the clauses and subclauses of this HASH value; Network processing unit NP-2 can directly read this table or search certain data to be found in table to be found.
Secondly, as shown in Figure 2,, comprise the steps: for method concrete operations flow chart of the present invention
(write down the table sign in the network processing unit and shown the corresponding relation of stored memory) after step 201, network processing unit are received a table look-up command with this;
The key assignments that step 204, network processing unit are treated look-up table carries out the HASH computing and obtains a HASH value;
Compared with prior art, the inside and outside searching storage that the described method of the embodiment of the invention can work alone the network processing unit of similar NP-2 originally joins together to search for form, and search efficiency is improved, thereby promotes the disposal ability of network processing unit.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.
Claims (6)
1, a kind of method for mixed loop-up table of network processor inside and outside is applied to comprise it is characterized in that the table lookup operation of the network processing unit of external search memory and inner searching storage, may further comprise the steps:
The key assignments of each table in the described external search memory is done hash HASH computing respectively, obtain the corresponding HASH value of each table, in a concordance list of described internal storage, preserve each HASH value pairing one with a plurality of extra-searching storages in the memory location;
When described network processing unit is searched table in the external search memory, the key assignments for the treatment of look-up table carries out the HASH computing and obtains a HASH value, search described concordance list then and obtain the corresponding memory location of this HASH value, described table to be found is searched in this memory location in the external search memory then.
2, the method for claim 1 is characterized in that, further comprises:
Write down the table sign in the described network processing unit and shown the corresponding relation of stored memory with this, described network processing unit judges that according to the sign of the table in the table key assignments to be found that carries in the order this table is table in the inner searching storage or the table in the external search memory after receiving table look-up command.
3, the method for claim 1 is characterized in that, comprises in the described concordance list that a plurality of clauses and subclauses, each clauses and subclauses have preserved the memory location in one or more extra-the corresponding searching storage of a certain HASH value.
4, as claim 1 or 3 described methods, it is characterized in that, further comprise:
Table in described certain HASH value and the external search memory is preserved the first address in this extra-searching storage at once in the clauses and subclauses of this HASH value in described concordance list.
5, as claim 1 or 3 described methods, it is characterized in that, further comprise:
Table in described certain HASH value and a plurality of external search memory will be stored in the mode of watch chain in these a plurality of extra-searching storages at once, preserves the externally first address in the searching storage of this watch chain in described concordance list in the clauses and subclauses of this HASH value.
6, method as claimed in claim 1 or 2 is characterized in that, when described network processing unit is searched described table to be found, for directly reading this table or search certain data to be found in table to be found.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008102108937A CN101350788B (en) | 2008-08-25 | 2008-08-25 | Method for mixed loop-up table of network processor inside and outside |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008102108937A CN101350788B (en) | 2008-08-25 | 2008-08-25 | Method for mixed loop-up table of network processor inside and outside |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101350788A true CN101350788A (en) | 2009-01-21 |
CN101350788B CN101350788B (en) | 2011-10-26 |
Family
ID=40269370
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2008102108937A Expired - Fee Related CN101350788B (en) | 2008-08-25 | 2008-08-25 | Method for mixed loop-up table of network processor inside and outside |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101350788B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101827137A (en) * | 2010-04-13 | 2010-09-08 | 西安邮电学院 | Hash table-based and extended memory-based high-performance IPv6 address searching method |
WO2010127536A1 (en) * | 2009-05-04 | 2010-11-11 | 中兴通讯股份有限公司 | Table creating and searching method used by network processor |
CN102511148A (en) * | 2011-11-17 | 2012-06-20 | 华为技术有限公司 | Sublist deploying method of key word/value storage system, device and system thereof |
CN102870116A (en) * | 2012-06-30 | 2013-01-09 | 华为技术有限公司 | Method and apparatus for content matching |
CN103353887A (en) * | 2013-06-28 | 2013-10-16 | 贵阳朗玛信息技术股份有限公司 | Method and device for searching user data |
CN104038416A (en) * | 2014-06-17 | 2014-09-10 | 上海新储集成电路有限公司 | Network processor |
CN104158744A (en) * | 2014-07-09 | 2014-11-19 | 中国电子科技集团公司第三十二研究所 | Method for building table and searching for network processor |
CN104904167A (en) * | 2013-01-10 | 2015-09-09 | 瑞典爱立信有限公司 | High performance hash-based lookup for packet processing in a communication network |
CN106844233A (en) * | 2016-12-07 | 2017-06-13 | 深圳市德传技术有限公司 | A kind of router service data caching method and system based on Hash table |
CN104104604B (en) * | 2013-04-04 | 2018-10-02 | 马维尔以色列(M.I.S.L.)有限公司 | The method and device of accurate match Hash lookup database in network switch device |
WO2018177184A1 (en) * | 2017-03-31 | 2018-10-04 | 深圳市中兴微电子技术有限公司 | Method and device for implementing table lookup processing, apparatus, and storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8195705B2 (en) * | 2001-12-11 | 2012-06-05 | International Business Machines Corporation | Hybrid search memory for network processor and computer systems |
CN100418331C (en) * | 2006-03-03 | 2008-09-10 | 清华大学 | Route searching result cache method based on network processor |
-
2008
- 2008-08-25 CN CN2008102108937A patent/CN101350788B/en not_active Expired - Fee Related
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2010127536A1 (en) * | 2009-05-04 | 2010-11-11 | 中兴通讯股份有限公司 | Table creating and searching method used by network processor |
CN101827137B (en) * | 2010-04-13 | 2013-01-30 | 西安邮电学院 | Hash table-based and extended memory-based high-performance IPv6 address searching method |
CN101827137A (en) * | 2010-04-13 | 2010-09-08 | 西安邮电学院 | Hash table-based and extended memory-based high-performance IPv6 address searching method |
CN102511148A (en) * | 2011-11-17 | 2012-06-20 | 华为技术有限公司 | Sublist deploying method of key word/value storage system, device and system thereof |
CN102870116A (en) * | 2012-06-30 | 2013-01-09 | 华为技术有限公司 | Method and apparatus for content matching |
WO2014000305A1 (en) * | 2012-06-30 | 2014-01-03 | 华为技术有限公司 | Method and apparatus for content matching |
CN102870116B (en) * | 2012-06-30 | 2014-09-03 | 华为技术有限公司 | Method and apparatus for content matching |
CN104904167B (en) * | 2013-01-10 | 2018-02-13 | 瑞典爱立信有限公司 | For lookup of the high-performance based on Hash of packet transaction in communication network |
CN104904167A (en) * | 2013-01-10 | 2015-09-09 | 瑞典爱立信有限公司 | High performance hash-based lookup for packet processing in a communication network |
CN104104604B (en) * | 2013-04-04 | 2018-10-02 | 马维尔以色列(M.I.S.L.)有限公司 | The method and device of accurate match Hash lookup database in network switch device |
CN103353887A (en) * | 2013-06-28 | 2013-10-16 | 贵阳朗玛信息技术股份有限公司 | Method and device for searching user data |
CN104038416A (en) * | 2014-06-17 | 2014-09-10 | 上海新储集成电路有限公司 | Network processor |
CN104038416B (en) * | 2014-06-17 | 2019-06-25 | 上海新储集成电路有限公司 | Network processing unit |
CN104158744B (en) * | 2014-07-09 | 2017-07-11 | 中国电子科技集团公司第三十二研究所 | Method for building table and searching for network processor |
CN104158744A (en) * | 2014-07-09 | 2014-11-19 | 中国电子科技集团公司第三十二研究所 | Method for building table and searching for network processor |
CN106844233A (en) * | 2016-12-07 | 2017-06-13 | 深圳市德传技术有限公司 | A kind of router service data caching method and system based on Hash table |
WO2018177184A1 (en) * | 2017-03-31 | 2018-10-04 | 深圳市中兴微电子技术有限公司 | Method and device for implementing table lookup processing, apparatus, and storage medium |
CN108664518A (en) * | 2017-03-31 | 2018-10-16 | 深圳市中兴微电子技术有限公司 | A kind of method and device for realizing processing of tabling look-up |
CN108664518B (en) * | 2017-03-31 | 2021-12-07 | 深圳市中兴微电子技术有限公司 | Method and device for realizing table look-up processing |
Also Published As
Publication number | Publication date |
---|---|
CN101350788B (en) | 2011-10-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101350788B (en) | Method for mixed loop-up table of network processor inside and outside | |
CN100470550C (en) | Information storing method, information search method and engine device | |
CN101692651A (en) | Method and device for Hash lookup table | |
CN101826107A (en) | Hash data processing method and device | |
CN102232219A (en) | Method and device for storing and searching keyword | |
CN112882663B (en) | Random writing method, electronic equipment and storage medium | |
CN101277252A (en) | Method for traversing multi-branch Trie tree | |
CN101751993A (en) | Apparatus and method for cache control | |
CN106599091A (en) | Storage and indexing method of RDF graph structures stored based on key values | |
CN104166649B (en) | Caching method and equipment for search engine | |
CN103577564A (en) | Method and device for reducing HASH collision through software shift | |
CN102354301B (en) | Cache partitioning method | |
CN104778132A (en) | Multi-core processor directory cache replacement method | |
CN104850656B (en) | A kind of dynamic self-adapting multistage Bloom filter device | |
CN100414518C (en) | Improved virtual address conversion and converter thereof | |
CN106201918A (en) | A kind of method and system quickly discharged based on big data quantity and extensive caching | |
CN103581024A (en) | Learning method and device combining MAC address hardware and software | |
CN102780620A (en) | Network processor and message processing method | |
CN105574124A (en) | Data storage system based on product information | |
CN102609240B (en) | The method of processor circuit and reading data | |
CN107870875A (en) | One kind may customize intelligent data caching method based on distributed memory | |
CN103281358A (en) | Method for storing resource based on consistency hash algorithm | |
CN103399920B (en) | Key value searching method, key value searching device and chip | |
CN111695685A (en) | On-chip storage system and method for graph neural network application | |
EP1379954B1 (en) | Dynamically configurable page table |
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: 20111026 Termination date: 20170825 |