CN101350788B - 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 PDF

Info

Publication number
CN101350788B
CN101350788B CN2008102108937A CN200810210893A CN101350788B CN 101350788 B CN101350788 B CN 101350788B CN 2008102108937 A CN2008102108937 A CN 2008102108937A CN 200810210893 A CN200810210893 A CN 200810210893A CN 101350788 B CN101350788 B CN 101350788B
Authority
CN
China
Prior art keywords
hash value
memory
processing unit
searching
external search
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
CN2008102108937A
Other languages
Chinese (zh)
Other versions
CN101350788A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN2008102108937A priority Critical patent/CN101350788B/en
Publication of CN101350788A publication Critical patent/CN101350788A/en
Application granted granted Critical
Publication of CN101350788B publication Critical patent/CN101350788B/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 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

A kind of method for mixed loop-up table of network processor inside and outside
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;
Step 202, 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, if belong in the inner searching storage, then execution in step 203, otherwise, carry out the step poly-204;
Step 203, network processing unit are directly searched this table in other tables of inner searching storage, and directly read the data in this table;
The key assignments that step 204, network processing unit are treated look-up table carries out the HASH computing and obtains a HASH value;
Step 205, network processing unit are searched concordance list and are obtained the corresponding memory location of this HASH value, if search successfully, carry out the step and gather 206, otherwise, finish this and search;
Step 206, network processing unit are searched table to be found (being the form storage of " HASH value+table " content in extra-the searching storage in the external search memory) to this memory location in the external search memory.
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 (4)

1. 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 inner searching storage, preserve the memory location in pairing one or more extra-the searching storages of each HASH value; 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 described concordance list in the clauses and subclauses of this HASH value;
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;
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 is after receiving table look-up command, judge 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, if belong in the inner searching storage, then network processing unit is directly searched this table in other tables of inner searching storage, and directly reads the data in this table.
2. 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.
3. method as claimed in claim 1 or 2 is characterized in that, further comprises:
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.
4. 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.
CN2008102108937A 2008-08-25 2008-08-25 Method for mixed loop-up table of network processor inside and outside Expired - Fee Related CN101350788B (en)

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 CN101350788A (en) 2009-01-21
CN101350788B true 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)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101556610B (en) * 2009-05-04 2011-12-21 中兴通讯股份有限公司 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
CN102511148B (en) * 2011-11-17 2014-08-13 华为技术有限公司 Sublist deploying method of key word/value storage system, device and system thereof
WO2014000305A1 (en) * 2012-06-30 2014-01-03 华为技术有限公司 Method and apparatus for content matching
US9009165B2 (en) * 2013-01-10 2015-04-14 Telefonaktiebolaget L M Ericsson (Publ) High performance hash-based lookup for packet processing in a communication network
US9537771B2 (en) * 2013-04-04 2017-01-03 Marvell Israel (M.I.S.L) Ltd. Exact match hash lookup databases in network switch devices
CN103353887A (en) * 2013-06-28 2013-10-16 贵阳朗玛信息技术股份有限公司 Method and device for searching user data
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
CN106844233A (en) * 2016-12-07 2017-06-13 深圳市德传技术有限公司 A kind of router service data caching method and system based on Hash table
CN108664518B (en) * 2017-03-31 2021-12-07 深圳市中兴微电子技术有限公司 Method and device for realizing table look-up processing

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1602485A (en) * 2001-12-11 2005-03-30 国际商业机器公司 Hybrid search memory for network processor and computer systems
CN1863169A (en) * 2006-03-03 2006-11-15 清华大学 Route searching result cache method based on network processor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1602485A (en) * 2001-12-11 2005-03-30 国际商业机器公司 Hybrid search memory for network processor and computer systems
CN1863169A (en) * 2006-03-03 2006-11-15 清华大学 Route searching result cache method based on network processor

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
钟婷等.基于IXP2400网络处理器的高速包过滤的研究.《计算机应用》.2005,第25卷(第11期),第2568至2570页. *

Also Published As

Publication number Publication date
CN101350788A (en) 2009-01-21

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
US8812789B2 (en) Systems and methods for cache line replacement
CN101826107A (en) Hash data processing method and device
CN102362464A (en) Memory access monitoring method and device
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
CN112882663A (en) Random writing method, electronic equipment and storage medium
CN104166649B (en) Caching method and equipment for search engine
CN103577564A (en) Method and device for reducing HASH collision through software shift
CN101739359B (en) Storage device, access method for mobile terminal and data, and frequency modulation 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
CN103581024A (en) Learning method and device combining MAC address hardware and software
CN102780620A (en) Network processor and message processing method
CN102609240B (en) The method of processor circuit and reading data
CN103399920B (en) Key value searching method, key value searching device and chip
US6516399B2 (en) Dynamically configurable page table
CN111695685A (en) On-chip storage system and method for graph neural network application
CN114706467B (en) Energy-saving processing method for multiple DRAM systems
CN111565255B (en) Communication device and modem
CN101079764A (en) A high-speed searching method for contents in 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