CN103973571A - Network processor and routing searching method - Google Patents

Network processor and routing searching method Download PDF

Info

Publication number
CN103973571A
CN103973571A CN201310046118.3A CN201310046118A CN103973571A CN 103973571 A CN103973571 A CN 103973571A CN 201310046118 A CN201310046118 A CN 201310046118A CN 103973571 A CN103973571 A CN 103973571A
Authority
CN
China
Prior art keywords
routing iinformation
searched
module
tcam
route
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.)
Pending
Application number
CN201310046118.3A
Other languages
Chinese (zh)
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 CN201310046118.3A priority Critical patent/CN103973571A/en
Publication of CN103973571A publication Critical patent/CN103973571A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a network processor and a routing searching method. The network processor comprises a microcode module, a counter module and a TCAM module. The counter module is used for counting the searched times of routing information. The microcode module is used for receiving a routing searching request and judging whether the searched times of the routing information is larger than the preset times or not according to the routing searching request, and if so, searching the corresponding routing information from the TCAM module; or else searching the corresponding routing information from a DRAM, and caching the routing information searched from the DRAM to the TCAM module when the searched times of the routing information are equal to the preset times. The TCAM module is used for caching the routing information reaching the preset times. The network processor has the advantages that by using the features of low price and high flexibility of the network processor, routing searching time can be lowered, high routing searching efficiency is achieved, and system cost is lowered.

Description

Network processing unit and method for searching route thereof
Technical field
The present invention relates to networking technology area, relate in particular to a kind of network processing unit and method for searching route thereof.
Background technology
The current continuous increase along with the network bandwidth, requires the core router groupings that can forward more than millions of and even up to ten million per second.The essential step of forwarding of packets is searched routing table exactly, and therefore route querying is fast to realize the key that high-speed packet forwards.
At present programmable networks switching equipment, mainly comprises two kinds to searching of routing table: the first, by retrieval DRAM(Dynamic Random Access Memory, dynamic random access memory) in route table items realize and searching; The second, hardware based TCAM(Ternary Content Addressable Memory, three-state content addressing memory) search retrieval routing table and realize and searching.
The first is by by common IP address dividing, each several part retrieves respectively to improve recall precision, although it has improved efficiency with respect to the longest common matching process, but because the route table items of the method retrieval is to leave on the DRAM of relative low speed all the time, so along with the increase of converting flow, the lookup method of DRAM cannot meet the forwarding of requirements at the higher level.Although the recall precision of the second is higher than the recall precision of the first, TCAM is more expensive, and capacity relative is less, and TCAM use PARALLEL MATCHING manner of comparison, and power consumption is larger.
Summary of the invention
Main purpose of the present invention is to provide a kind of network processing unit, is intended to improve route querying efficiency, has also reduced system cost simultaneously.
The invention provides a kind of network processing unit, comprise microcode module, counter module and TCAM module, wherein: described counter module is counted for the number of times that routing iinformation is searched; Described microcode module is used for receiving route querying request, and treats according to route querying request judgement whether the number of times that routing iinformation is searched is greater than preset times, is from TCAM, to search corresponding routing iinformation; Otherwise from DRAM, search corresponding routing iinformation, and the number of times of being searched when described routing iinformation is while equaling preset times, by the routing iinformation buffer memory finding from DRAM to described TCAM module; Described TCAM module reaches the routing iinformation of preset times for buffer memory.
Preferably, also comprise: TCAM entry module, the number of times of being searched for recording routing iinformation; Described microcode module also for: TCAM entry module is carried out to initialization, and to the number of times recording in the TCAM entry module processing of sorting; Receiving after route querying request, inquiry TCAM entry module treats to obtain the number of times that routing iinformation is searched.
Preferably, described microcode module also for: receive after routing iinformation removal request, the corresponding routing iinformation of buffer memory in TCAM module deleted, delete the record of corresponding routing iinformation in TCAM entry module simultaneously.
Preferably, described microcode module is for periodically carrying out initialization to TCAM entry module.
The present invention also provides a kind of method for searching route of network processing unit, comprises the following steps:
Receive route querying request;
According to route querying request, judgement treats whether the number of times that routing iinformation is searched is greater than preset times;
Be from TCAM, to search corresponding routing iinformation, and the number of times that this routing iinformation is searched is counted;
Otherwise from DRAM, search corresponding routing iinformation, and the number of times of being searched when described routing iinformation is while equaling preset times, by the routing iinformation buffer memory finding from DRAM, and the number of times that this routing iinformation is searched is counted.
Preferably, the described number of times that routing iinformation is searched also comprises after counting:
Record the number of times that routing iinformation is searched.
Preferably, described method for searching route also comprises:
The number of times that the routing iinformation recording in network processing unit is searched is resequenced.
Preferably, described according to route querying request, judgement treats whether number of times that routing iinformation is searched is greater than preset times and comprises:
According to route querying request, the number of times that the routing iinformation recording in requester network processor is searched, to obtain the number of times for the treatment of that routing iinformation is searched;
Whether the number of times that routing iinformation is searched for the treatment of that judgement is obtained is greater than preset times.
Preferably, also comprise:
Receive after removal request, the corresponding routing iinformation of buffer memory in TCAM module is deleted, delete the record of the number of times that corresponding routing iinformation searched simultaneously.
Preferably, described method for searching route also comprises:
The number of times of periodically routing iinformation recording in network processing unit being searched is resequenced.
The embodiment of the present invention is utilized low price, the high flexibility feature of network processing unit, utilize its inner TCAM module buffer memory to be routed the number of times of searching to reach the routing iinformation of preset times, when microcode module is carried out route querying, in the time that the number of times of being searched until routing iinformation is greater than preset times, from TCAM module, obtain concrete routing iinformation; In the time that the number of times of being searched until routing iinformation is less than or equal to preset times, from DRAM module, obtain concrete routing iinformation.So can reduce the time of route querying, realize the high efficiency of route querying, but also reduce system cost.
Brief description of the drawings
Fig. 1 is the high-level schematic functional block diagram of network processing unit preferred embodiment of the present invention;
Fig. 2 is the schematic flow sheet of the method for searching route preferred embodiment of network processing unit of the present invention.
Realization, functional characteristics and the advantage of the object of the invention, in connection with embodiment, are described further with reference to accompanying drawing.
Embodiment
Further illustrate technical scheme of the present invention below in conjunction with Figure of description and specific embodiment.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Low in order to solve with DRAM search efficiency, and by the expensive difficult problem of TCAM, the present invention utilizes the TCAM buffer unit of network processing unit inside to divide routing iinformation, to reduce the time of route search, realize high efficiency route querying, and do not need additionally to arrange peripheral hardware and increase TCAM capacity, thereby reduce system cost.
With reference to Fig. 1, a kind of network processing unit that the embodiment of the present invention proposes, comprise microcode module 101, counter module 102, TCAM module 103 and TCAM entry module 104, wherein: described counter module 102 is counted for the number of times that routing iinformation is searched; The number of times that described TCAM entry module 104 records routing iinformation and searched.Described microcode module 101 is for receiving route querying request, and treats according to route querying request judgement whether the number of times that routing iinformation is searched is greater than preset times, is from TCAM, to search corresponding routing iinformation; Otherwise from DRAM, search corresponding routing iinformation, and the number of times of being searched when described routing iinformation is while equaling preset times, by the routing iinformation buffer memory finding from DRAM to described TCAM module 103; Described TCAM module 103 reaches the routing iinformation of preset times for buffer memory.
Particularly, above-mentioned counter module 102 can use software counter to realize, and also can use hardware counter to realize.Microcode module 101 is mainly used in the route querying of network processing unit, so that the information receiving is carried out to forwarding of packets.When network processing unit receives after the information that needs to forward, can trigger route querying request, to the information of forwarding is sent to destination according to searched routing iinformation.This route querying request comprises the information that needs route, for example route entry A.And microcode module 101 receives after route querying request, judge whether the number of times that this route entry A is searched is greater than preset times, be the routing iinformation of searching route entry A from TCAM; Otherwise from DRAM, search the routing iinformation of route entry A.The number of times that last counter module 102 is searched routing iinformation is again counted, and is recorded in TCAM entry module 104.For example, the number of times that original route entry A is searched is M time, and microcode module 101 is carried out according to route querying request after the route querying of route entry A, and its number of times of being searched is M+1 time.TCAM entry module 104 can be a data structure, as shown in table 1 below:
Table 1
Routing iinformation The number of times of being searched
Entry A1 M1
Entry A2 M2
Entry A3 M3
Entry A4 M4
The number of times that the routing iinformation recording in this TCAM entry module 104 is searched, be used for microcode module 101 in the time carrying out route querying route entry A, can first search the number of times that in this TCAM entry module 104, this route entry A is searched, if when this number of times is greater than preset times M, directly from TCAM module 103, search the concrete routing iinformation of route entry A; If when this number of times is less than or equal to preset times M, directly from DRAM, search the concrete routing iinformation of route entry A, and in the time that this number of times equals preset times M, by the concrete routing iinformation buffer memory of searching from DRAM to TCAM module 103.The last number of times of by counter module 102, route entry A being searched is again counted, and on original number of times, adds 1 again, and is stored in TCAM entry module 104.
Above-mentioned microcode module 101 also for: TCAM entry module 104 is carried out to initialization, and to the number of times recording in the TCAM entry module processing of sorting.The initialization of this TCAM entry module 104 can be carried out in the time that network processing unit is opened, and also can in network processing unit work, periodically carry out.Above-mentioned sequence can only be carried out descending sort to the prefix length of route entry.
Above-mentioned microcode module 101 also for: receive after the removal request of routing iinformation, the corresponding routing iinformation of buffer memory in TCAM module 103 deleted, delete the record of corresponding routing iinformation in TCAM entry module 104 simultaneously.
The embodiment of the present invention is utilized low price, the high flexibility feature of network processing unit, utilize its inner TCAM module buffer memory to be routed the number of times of searching to reach the routing iinformation of preset times, when microcode module is carried out route querying, in the time that the number of times of being searched until routing iinformation is greater than preset times, from TCAM module, obtain concrete routing iinformation; In the time that the number of times of being searched until routing iinformation is less than or equal to preset times, from DRAM module, obtain concrete routing iinformation.So can reduce the time of route querying, realize the high efficiency of route querying, but also reduce system cost.
With reference to Fig. 2, method for searching route one embodiment of network processing unit of the present invention is proposed.The method for searching route of network processing unit of the present invention can comprise the following steps:
Step S101, reception route querying request;
This route querying request comprises the information that needs route, the information of for example route entry A or other mark routes.When network processing unit receives after the message that needs to forward, can trigger route querying request, to the information of forwarding is sent to destination according to searched routing iinformation.
Step S102, according to route querying request, judgement treat whether the number of times that routing iinformation is searched is greater than preset times; To proceed to step S103; Otherwise proceed to step S104;
This preset times can arrange as the case may be.One TCAM entry module will be set, the number of times of being searched for recording routing iinformation in network processing unit.In the time receiving route querying request, inquire about and in TCAM entry module, treat the number of times that routing iinformation is searched, and itself and preset times are compared.
Step S103, from TCAM, search corresponding routing iinformation, and the number of times that this routing iinformation is searched is counted;
Because the number of times that in TCAM module, buffering route information is searched reaches the routing iinformation of preset times, when so the number of times of being searched until routing iinformation is greater than preset times, from TCAM module, search corresponding routing iinformation, then, after the number of times of it being searched adds 1, be stored in TCAM entry module.
Step S104, from DRAM, search corresponding routing iinformation, and the number of times of being searched when described routing iinformation is while equaling preset times, by the routing iinformation buffer memory finding from DRAM, and the number of times that this routing iinformation is searched is counted.
In the time that the number of times of being searched until routing iinformation is less than or equal to preset times, from DRAM, search corresponding routing iinformation, after the number of times of then it being searched adds 1, be stored in TCAM entry module.In addition, in the time that the number of times of being searched until routing iinformation equals preset times, by the routing iinformation buffer memory finding from DRAM.
In the time that network processing unit is opened, carry out initialization, the number of times that recorded routing iinformation is searched is resequenced.Or periodically carry out in network processing unit work.Above-mentioned sequence can only be carried out descending sort to the prefix length of route entry.
Above-mentioned method for searching route also comprises: receive after removal request, the corresponding routing iinformation of buffer memory in TCAM module is deleted, delete the record of the number of times that corresponding routing iinformation searched simultaneously, do not exist to avoid that actual routing iinformation occurs, but in TCAM, index relevant routing iinformation.
The embodiment of the present invention is utilized low price, the high flexibility feature of network processing unit, utilize its inner TCAM module buffer memory to be routed the number of times of searching to reach the routing iinformation of preset times, when microcode module is carried out route querying, in the time that the number of times of being searched until routing iinformation is greater than preset times, from TCAM module, obtain concrete routing iinformation; In the time that the number of times of being searched until routing iinformation is less than or equal to preset times, from DRAM module, obtain concrete routing iinformation.So can reduce the time of route querying, realize the high efficiency of route querying, but also reduce system cost.
The foregoing is only the preferred embodiments of the present invention; not thereby limit its scope of the claims; every equivalent structure or conversion of equivalent flow process that utilizes specification of the present invention and accompanying drawing content to do; directly or indirectly be used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (10)

1. a network processing unit, is characterized in that, comprises microcode module, counter module and TCAM module, wherein: described counter module is counted for the number of times that routing iinformation is searched; Described microcode module is used for receiving route querying request, and treats according to route querying request judgement whether the number of times that routing iinformation is searched is greater than preset times, is from TCAM, to search corresponding routing iinformation; Otherwise from DRAM, search corresponding routing iinformation, and the number of times of being searched when described routing iinformation is while equaling preset times, by the routing iinformation buffer memory finding from DRAM to described TCAM module; Described TCAM module reaches the routing iinformation of preset times for buffer memory.
2. network processing unit according to claim 1, is characterized in that, also comprises: TCAM entry module, the number of times of being searched for recording routing iinformation; Described microcode module also for: TCAM entry module is carried out to initialization, and to the number of times recording in the TCAM entry module processing of sorting; Receiving after route querying request, inquiry TCAM entry module treats to obtain the number of times that routing iinformation is searched.
3. network processing unit according to claim 2, it is characterized in that, described microcode module also for: receive after routing iinformation removal request, the corresponding routing iinformation of buffer memory in TCAM module deleted, delete the record of corresponding routing iinformation in TCAM entry module simultaneously.
4. network processing unit according to claim 2, is characterized in that, described microcode module is for periodically carrying out initialization to TCAM entry module.
5. a method for searching route for network processing unit, is characterized in that, comprises the following steps:
Receive route querying request;
According to route querying request, judgement treats whether the number of times that routing iinformation is searched is greater than preset times;
Be from TCAM, to search corresponding routing iinformation, and the number of times that this routing iinformation is searched is counted;
Otherwise from DRAM, search corresponding routing iinformation, and the number of times of being searched when described routing iinformation is while equaling preset times, by the routing iinformation buffer memory finding from DRAM, and the number of times that this routing iinformation is searched is counted.
6. method for searching route according to claim 5, is characterized in that, the described number of times that routing iinformation is searched also comprises after counting:
Record the number of times that routing iinformation is searched.
7. method for searching route according to claim 6, is characterized in that, also comprises:
The number of times that the routing iinformation recording in network processing unit is searched is resequenced.
8. method for searching route according to claim 6, is characterized in that, described according to route querying request, and judgement treats whether number of times that routing iinformation is searched is greater than preset times and comprises:
According to route querying request, the number of times that the routing iinformation recording in requester network processor is searched, to obtain the number of times for the treatment of that routing iinformation is searched;
Whether the number of times that routing iinformation is searched for the treatment of that judgement is obtained is greater than preset times.
9. method for searching route according to claim 6, is characterized in that, also comprises:
Receive after removal request, the corresponding routing iinformation of buffer memory in TCAM module is deleted, delete the record of the number of times that corresponding routing iinformation searched simultaneously.
10. method for searching route according to claim 6, is characterized in that, also comprises:
The number of times of periodically routing iinformation recording in network processing unit being searched is resequenced.
CN201310046118.3A 2013-02-05 2013-02-05 Network processor and routing searching method Pending CN103973571A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310046118.3A CN103973571A (en) 2013-02-05 2013-02-05 Network processor and routing searching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310046118.3A CN103973571A (en) 2013-02-05 2013-02-05 Network processor and routing searching method

Publications (1)

Publication Number Publication Date
CN103973571A true CN103973571A (en) 2014-08-06

Family

ID=51242631

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310046118.3A Pending CN103973571A (en) 2013-02-05 2013-02-05 Network processor and routing searching method

Country Status (1)

Country Link
CN (1) CN103973571A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104363177A (en) * 2014-11-06 2015-02-18 北京东土科技股份有限公司 Rule table entry optimization method and device used for message processing
CN105700859A (en) * 2014-11-25 2016-06-22 中兴通讯股份有限公司 Network-processor-based hardware table traversal method and apparatus
CN105791126A (en) * 2014-12-26 2016-07-20 中兴通讯股份有限公司 Ternary content addressable memory (TCAM) table search method and device
CN105939263A (en) * 2015-08-12 2016-09-14 杭州迪普科技有限公司 Message sending method and device
WO2020119796A1 (en) * 2018-12-13 2020-06-18 华为技术有限公司 Instruction processing method and chip
WO2021129328A1 (en) * 2019-12-23 2021-07-01 中兴通讯股份有限公司 Table entry arrangement method and apparatus, device, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6571313B1 (en) * 1998-10-27 2003-05-27 Telecom Italia Lab S.P.A. Memory for information search through prefix analysis, in particular for building routing tables for nodes of high speed communication networks, such as the internet network
US20050265346A1 (en) * 2000-12-07 2005-12-01 Nokia, Inc. Router and routing protocol redundancy
CN101902401A (en) * 2010-07-23 2010-12-01 中兴通讯股份有限公司 Search process device and network system
CN102271087A (en) * 2011-07-27 2011-12-07 中兴通讯股份有限公司 Routing search method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6571313B1 (en) * 1998-10-27 2003-05-27 Telecom Italia Lab S.P.A. Memory for information search through prefix analysis, in particular for building routing tables for nodes of high speed communication networks, such as the internet network
US20050265346A1 (en) * 2000-12-07 2005-12-01 Nokia, Inc. Router and routing protocol redundancy
CN101902401A (en) * 2010-07-23 2010-12-01 中兴通讯股份有限公司 Search process device and network system
CN102271087A (en) * 2011-07-27 2011-12-07 中兴通讯股份有限公司 Routing search method and device

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104363177A (en) * 2014-11-06 2015-02-18 北京东土科技股份有限公司 Rule table entry optimization method and device used for message processing
CN104363177B (en) * 2014-11-06 2017-10-10 北京东土科技股份有限公司 A kind of optimization method and device of rule table entry for Message processing
CN105700859A (en) * 2014-11-25 2016-06-22 中兴通讯股份有限公司 Network-processor-based hardware table traversal method and apparatus
CN105791126A (en) * 2014-12-26 2016-07-20 中兴通讯股份有限公司 Ternary content addressable memory (TCAM) table search method and device
CN105791126B (en) * 2014-12-26 2020-04-24 中兴通讯股份有限公司 Ternary Content Addressable Memory (TCAM) table look-up method and device
CN105939263A (en) * 2015-08-12 2016-09-14 杭州迪普科技有限公司 Message sending method and device
CN105939263B (en) * 2015-08-12 2019-07-09 杭州迪普科技股份有限公司 A kind of file transmitting method and device
WO2020119796A1 (en) * 2018-12-13 2020-06-18 华为技术有限公司 Instruction processing method and chip
EP3723330A4 (en) * 2018-12-13 2021-03-24 Huawei Technologies Co., Ltd. Instruction processing method and chip
US11442735B2 (en) 2018-12-13 2022-09-13 Huawei Technologies Co., Ltd. Search instruction to access a TCAM and memory to return a program counter value from the TCAM
WO2021129328A1 (en) * 2019-12-23 2021-07-01 中兴通讯股份有限公司 Table entry arrangement method and apparatus, device, and storage medium

Similar Documents

Publication Publication Date Title
EP2793436B1 (en) Content router forwarding plane architecture
CN103973571A (en) Network processor and routing searching method
CN100466627C (en) Method and device for searching address prefixion and message transfer method and system
CN101594319B (en) Entry lookup method and entry lookup device
US8243735B2 (en) System for forwarding packets with hierarchically structured variable-length identifiers using an exact-match lookup engine
CN102377664B (en) TCAM (ternary content addressable memory)-based range matching device and method
CN101505279B (en) Route searching method and apparatus
US8848707B2 (en) Method for IP longest prefix match using prefix length sorting
Bando et al. FlashTrie: beyond 100-Gb/s IP route lookup using hash-based prefix-compressed trie
CN101656765A (en) Address mapping system and data transmission method of identifier/locator separation network
EP2643762A1 (en) Method and apparatus for high performance, updatable, and deterministic hash table for network equipment
CN107770076A (en) A kind of processing method of hash-collision, device and switching equipment
CN100450100C (en) Route method and equipment
CN102971732A (en) System architecture for integrated hierarchical query processing for key/value stores
CN101620623A (en) Method and device for managing list item of content addressable memory CAM
CN100426791C (en) Engine apparatus for route forwarding table address searching
CN106789859B (en) Message matching method and device
CN102164080B (en) Routing address inquiry method and device
CN112671880B (en) Distributed content caching and addressing method, system, medium, macro base station and micro base station
JP2006246488A (en) Network router, address processing method, and computer program
CN104301227B (en) High-speed low-power-consumption IP route table lookup method based on TCAM
CN109039911B (en) Method and system for sharing RAM based on HASH searching mode
CN100477644C (en) Route storage method and apparatus
Huang et al. Fast routing table lookup based on deterministic multi-hashing
CN107204926B (en) Rapid route searching method for preprocessing cache

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20140806

RJ01 Rejection of invention patent application after publication