CN100456840C - Method for splitting LPM algorithm to two CPU - Google Patents

Method for splitting LPM algorithm to two CPU Download PDF

Info

Publication number
CN100456840C
CN100456840C CNB2003101137817A CN200310113781A CN100456840C CN 100456840 C CN100456840 C CN 100456840C CN B2003101137817 A CNB2003101137817 A CN B2003101137817A CN 200310113781 A CN200310113781 A CN 200310113781A CN 100456840 C CN100456840 C CN 100456840C
Authority
CN
China
Prior art keywords
route
prefix
cpu
index
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.)
Expired - Fee Related
Application number
CNB2003101137817A
Other languages
Chinese (zh)
Other versions
CN1545337A (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.)
Beijing property right Bats Exchange Inc
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2003101137817A priority Critical patent/CN100456840C/en
Publication of CN1545337A publication Critical patent/CN1545337A/en
Application granted granted Critical
Publication of CN100456840C publication Critical patent/CN100456840C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

The present invention provides a method for separating an LPM algorithm into two CPUs, which belongs to the field of computer network communication. The method comprises the steps that the two CPUs comprise a transmission CPU and a control CPU, and the control CPU guiding the setting of a route table of a network processor completes the maintenance of the filiation of a route prefix; before a route table item is updated, firstly, the structure on the control CPU is searched, and whether a prefix shorter than the present route prefix, namely a father prefix, exists or not is judged; if a prefix shorter than the present route prefix exists, the length of a mask code of the father prefix and an index corresponding to the route table item are placed in a delivered data structure and informed to the network processor to realize the LPM algorithm. The longest match is jointly realized through the cooperation of the two CPUs, the transmission ability of an NP is exerted to a maximal extent on the premise that the route table is completely correct, and work irrelevant to the transmission process of the longest match is eliminated from the NP.

Description

The LPM algorithm is split the method for two CPU
Affiliated technical field
The invention belongs to computer network communication field, be specifically related to a kind of method that the LPM algorithm is split two CPU.
Background technology
In the IP switching network, the network layer of IP packet is transmitted and is finished by the routing table of searching in the asic chip, in order to expand the route scale, and usually need be by network processing unit (hereinafter to be referred as NP).NP can hold at least 10 ten thousand route table items, and in order to improve seek rate, these route table items are stored in the chip internal memory to realize LPM (Longest Prefix Match) in multi-pass decoding tree mode.And the multi-pass decoding tree need be by the auxiliary management of other data structure, be used for writing down the set membership of route prefix, this work has reduced the ability of NP deal with data undoubtedly, because the set membership structure is invisible fully in repeating process, route of the every increase of NP simultaneously will be searched this father and son's structure, write down routing iinformation on node corresponding; And route NP of every deletion also will search father and son's structure and father node information is taken out remodifies multi-pass decoding tree.This will reduce the forward efficiency of CPU greatly during route oscillation, because when route table items increase, deletion or modification, can not carry out the inquiry of route table items and the forwarding of data message, the expense that the promptly any NP of influence route table items is searched all will become the bottleneck in the repeating process.
Summary of the invention
The object of the invention: provide a kind of the LPM algorithm is split the method for two CPU, guarantee to bring into play the transfer capability of NP to greatest extent under the right-on prerequisite of routing table, will from NP, reject with the irrelevant work of the longest coupling forwarding process.
Technology contents of the present invention: a kind of the LPM algorithm is split the method for two CPU, comprising:
(1) two CPU comprises network processing unit and Controlled CPU, instructs the Controlled CPU of network processing unit routing table setting to finish the work of the set membership of safeguarding route prefix;
(2) before upgrading route table items, at first search structure on the Controlled CPU, judge whether to exist than the shorter prefix of current this route prefix, it is father's prefix, if exist, mask-length with father's prefix, and the index of corresponding route table items is put in the data structure that issues, and the informing network processor is realized the LPM algorithm together.
Deposit network processing unit in the fib table of Controlled CPU and transmit index.
Further comprise:
(1) when increasing route, Controlled CPU is at first searched fib table, if there has been this route prefix, transmit index with regard to taking out the network processing unit of depositing in the fib table, together with route table items informing network processor, network processing unit enters more new technological process, if there is not this route prefix in the fib table of Controlled CPU, then the informing network processor enters the increase flow process, network processing unit uses the LPM algorithm, set up a new forwarding-table item, this table item index is write in the multi-pass decoding tree node, locate route table items during in order to route querying fast, simultaneously this index is returned to Controlled CPU, Controlled CPU is transmitted index with network processing unit and is write in the fib table of oneself together with whole route table items.
(2) when the deletion route, Controlled CPU is at first searched fib table and is watched whether there is short route prefix, if exist then take out father's prefix information informing network processor of wherein depositing, network processing unit is transmitted index according to the LPM algorithm with father's prefix and is returned in the search tree node.
Technique effect of the present invention: Controlled CPU is transferred in the work of maintained parent subrelation finished, before upgrading route table items, at first search the structure on the Controlled CPU, if there is father's prefix, the mask-length of father's prefix and the index of corresponding route table items are put in the data structure that issues, notify NP together, thereby help NP to upgrade the multi-pass decoding tree.So just concentrate on a CPU and go up the LPM algorithm of realizing and be divided into two, promptly realize the longest coupling by the co-ordination of two CPU is common with traditional.
Controlled CPU is in order to safeguard route prefix set membership structure, need additionally mark off valuable memory source, for fear of this huge memory cost, the present invention deposits network processing unit and transmits index in the storage organization of fib table, thereby takes into account the software route information table of system and the dual-use function of NP set membership structure.
Description of drawings
Fig. 1 is the process chart that route of the present invention increases and route is deleted;
Fig. 2 is the storage organization of fib table on the Controlled CPU of the present invention.
Embodiment
With reference to figure 1, Fig. 2, with the routine explanation of being embodied as of route increase or deletion technical scheme of the present invention.
1. route increases process, and route table items thes contents are as follows:
Destinatio?IP:192.168.10.1
Subnet?Mask:255.255.255.0
NexthopIp:10.5.4.1
Out?interface:Vlan10,Vlan?ID:10
Originally do not have the Np_forward_id field in the Fib_node structure, will assist NP to realize that LPM transmits now,, calculate by NP and notify Controlled CPU to fill then so increase this field.
The first step: Controlled CPU is carried out hash according to Next hop IP and is searched, and obtains an AT index, this AT index be contact next jump the adjacency list index of host ip and 2 layers of outlet information.This index will be notified to NP with the route table items that issues.
Second step: Controlled CPU is that 192.168.10.0/24 searches in fib table and whether has this route entry according to prefix information, and if there is no, notice NP increases a route.
After the 3rd step: NP receives the message that increases route, at first in the AT table of oneself safeguarding, find corresponding list item according to the AT index, fill 2 layers of outlet information then, then from transmit, take out an available index, with route table items content (route prefix, the AT index, outlet Vlan ID, next jumps number etc.) be filled into wherein.
The 4th step: NP is according to LPM algorithm all nodes that definite route that will increase occupies in search tree in 3 grades of search tree structures.The LPM algorithm is a prior art, and specific algorithm does not describe in detail at this paper.Next will transmit index is filled in these nodes.
The 5th step: NP will transmit index and be notified to Controlled CPU.
The 6th step: Controlled CPU is transmitted index with NP and is filled into together with whole route table items in the respective nodes of software fib table, and route interpolation process finishes.
Like this, when regularly upgrading this route entry, Controlled CPU will at first find it from fib table next time, and therefrom take out the NP that deposits and transmit index, then notify NP to upgrade.Next NP can transmit content and AT contents in table according to transmitting direct renewal of index.
2. route delete procedure, suppose to have had following two routes in the fib table:
(1)Prefix?192.168.10.0/24?Next?hop?Ip:10.5.4.1?NP?Forward?table?index:10
(2)Prefix?192.168.10.0/22?Next?hop?Ip:20.5.4.1?NP?Forward?table?index:20
Route (1) to be deleted now.
And in 3 grades of search trees of NP, there are following 4 routes:
<R1>Prefix?192.168.8.0/24?Next?hop?Ip:20.5.4.1?NP?Forward?table?index:20
<R2>Prefix?192.168.9.0/24?Next?hop?Ip:20.5.4.1?NP?Forward?table?index:20
<R3>Prefix?192.168.10.0/24?Next?hop?Ip:10.5.4.1?NP?Forward?table?index:10
<R4>Prefix?192.168.11.0/24?Next?hop?Ip:20.5.4.1?NP?Forward?table?index:20
Improve one's methods according to mentioned above, Controlled CPU at first finds father's prefix information of route (1) in FIB according to subnet mask length, i.e. Prefix 192.168.10.0/22, and what obtain wherein to deposit transmits index 20.Then notify NP to carry out the route deletion.NP locatees route prefix Prefix 192.168.10.0/24 according to the LPM algorithm in 3 grades of search trees, because Controlled CPU has notified NP to have father's prefix, therefore NP can not directly delete this route, but being transmitted index, his father's prefix returns in the search tree node, promptly fill index 20, so there are following 4 routes in 3 grades of search trees:
<R1>Prefix?192.168.8.0/24 Next?hop?Ip:20.5.4.1?NP?Forward?table?id:20
<R2>Prefix?192.168.9.0/24 Next?hop?Ip:20.5.4.1?NP?Forward?table?id:20
<R3>Prefix?192.168.10.0/24?Next?hop?Ip:20.5.4.1?NP?Forward?table?id:20
<R4>Prefix?192.168.11.0/24?Next?hop?Ip:20.5.4.1?NP?Forward?table?id:20
From the example of top deletion route as can be seen, the module NP that is responsible for transmitting needn't search father's prefix information, direct 3 grades of search trees of modification of the message that can issue according to Controlled CPU just, and the route table items of having simplified NP greatly is new technological process more.

Claims (3)

1. one kind splits the method for two CPU with the LPM algorithm, comprising:
(1) two CPU comprises network processing unit and Controlled CPU, instructs the Controlled CPU of network processing unit routing table setting to finish the work of the set membership of safeguarding route prefix;
(2) before upgrading route table items, at first search fib table on the Controlled CPU, judge whether to exist than the shorter prefix of current this route prefix, it is father's prefix, if exist, mask-length with father's prefix, and the index of corresponding route table items is put in the data structure that issues, and the informing network processor is realized the LPM algorithm together.
2. as claimed in claim 1 the LPM algorithm is split the method for two CPU, it is characterized in that depositing network processing unit in the fib table of Controlled CPU transmits index.
3. as claimed in claim 2 the LPM algorithm is split the method for two CPU, it is characterized in that described step (2) specifically comprises:
(1) when increasing route, Controlled CPU is at first searched fib table, if there has been this route prefix, transmit index with regard to taking out the network processing unit of depositing in the fib table, together with route table items informing network processor, network processing unit enters more new technological process, if there is not this route prefix in the fib table of Controlled CPU, then the informing network processor enters the increase flow process, network processing unit uses the LPM algorithm, set up a new forwarding-table item, this table item index is write in the multi-pass decoding tree node, locate route table items during in order to route querying fast, simultaneously this index is returned to Controlled CPU, Controlled CPU is transmitted index with network processing unit and is write in the fib table of oneself together with whole route table items
Figure C2003101137810002C1
(2) when the deletion route, Controlled CPU is at first searched fib table and is watched whether there is short route prefix, if exist then take out father's prefix information informing network processor of wherein depositing, network processing unit is transmitted index according to the LPM algorithm with father's prefix and is returned in the search tree node.
CNB2003101137817A 2003-11-25 2003-11-25 Method for splitting LPM algorithm to two CPU Expired - Fee Related CN100456840C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2003101137817A CN100456840C (en) 2003-11-25 2003-11-25 Method for splitting LPM algorithm to two CPU

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2003101137817A CN100456840C (en) 2003-11-25 2003-11-25 Method for splitting LPM algorithm to two CPU

Publications (2)

Publication Number Publication Date
CN1545337A CN1545337A (en) 2004-11-10
CN100456840C true CN100456840C (en) 2009-01-28

Family

ID=34336967

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2003101137817A Expired - Fee Related CN100456840C (en) 2003-11-25 2003-11-25 Method for splitting LPM algorithm to two CPU

Country Status (1)

Country Link
CN (1) CN100456840C (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105591915A (en) * 2014-10-22 2016-05-18 中兴通讯股份有限公司 Maintenance method and apparatus of routing table
CN107896194B (en) * 2018-01-02 2021-04-09 盛科网络(苏州)有限公司 Route searching method, device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6122279A (en) * 1995-10-02 2000-09-19 Virata Limited Asynchronous transfer mode switch
CN1270728A (en) * 1997-09-15 2000-10-18 埃弗内特集团股份有限公司 Method and system for fast routing lookups
US20020078196A1 (en) * 2000-12-18 2002-06-20 Kim Hyun-Cheol Apparatus and method for dispersively processing QoS supported IP packet forwarding
WO2002061625A2 (en) * 2001-01-30 2002-08-08 Nokia Intelligent Edge Routers Inc. Method and apparatus for routing table management
CN1406073A (en) * 2001-08-14 2003-03-26 深圳市中兴通讯股份有限公司上海第二研究所 Method for selecting route based on user' IP address route
CN1529454A (en) * 2003-09-26 2004-09-15 清华大学 Parallel route searching method and system for eliminating longest prefix match search

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6122279A (en) * 1995-10-02 2000-09-19 Virata Limited Asynchronous transfer mode switch
CN1270728A (en) * 1997-09-15 2000-10-18 埃弗内特集团股份有限公司 Method and system for fast routing lookups
US20020078196A1 (en) * 2000-12-18 2002-06-20 Kim Hyun-Cheol Apparatus and method for dispersively processing QoS supported IP packet forwarding
WO2002061625A2 (en) * 2001-01-30 2002-08-08 Nokia Intelligent Edge Routers Inc. Method and apparatus for routing table management
CN1406073A (en) * 2001-08-14 2003-03-26 深圳市中兴通讯股份有限公司上海第二研究所 Method for selecting route based on user' IP address route
CN1529454A (en) * 2003-09-26 2004-09-15 清华大学 Parallel route searching method and system for eliminating longest prefix match search

Also Published As

Publication number Publication date
CN1545337A (en) 2004-11-10

Similar Documents

Publication Publication Date Title
CN101388030B (en) Database and database processing methods
CN101119324B (en) Network address converting attribute self-adaptive method and apparatus
CN109347983B (en) Multi-path forwarding method in named data network based on network coding
CN104184664B (en) Route forwarding table items generation method and device
CN101485178A (en) Method for obtaining information objects in a communication system
CN101626392B (en) Methods and systems for storing and searching data
CN103873602A (en) Network resource naming method and generating device
CN106470158A (en) Message forwarding method and device
CN101695054A (en) Method and device for route maintenance and method and device for route query
CN105072030A (en) NDN (Named Data Networking) route system based on content clustering, and clustering query method therefor
CN1703890B (en) Method for protocol recognition and analysis in data networks
CN103201987A (en) Prioritization of routing information updates
CN103401795A (en) Method for eliminating redundancy of transmission contents in content central network
CN102891872A (en) Method and system for storing and searching data in peer to peer (P2P) network
CN105141681A (en) RPKI file synchronizing method and device
CN103502985A (en) Data processing method, device and system
CN116340055A (en) Data recovery method and system for solid state disk
US6925503B2 (en) Method and system for performing a longest prefix match search
CN101562574A (en) Method for updating routing list and device thereof
CN100456840C (en) Method for splitting LPM algorithm to two CPU
JP4971717B2 (en) Directory distributed storage device and data processing request transfer program
CN113810287A (en) Data retrieval and pushing method based on NDN and SDN
JP2008167464A (en) Method and apparatus for processing tlv-based link-state packet
CN101990135B (en) Maximum bandwidth constraint-based path query method and device
CN101394428B (en) Service positioning method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: HUAWEI TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: GANGWAN NETWORK CO., LTD.

Effective date: 20060922

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20060922

Address after: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Applicant after: Huawei Technologies Co., Ltd.

Address before: 100089, No. 21 West Third Ring Road, Beijing, Haidian District, Long Ling Building, 13 floor

Applicant before: Harbour Networks Holdings Limited

C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: BEIJING EQUITY EXCHANGE CO., LTD.

Free format text: FORMER OWNER: HUAWEI TECHNOLOGY CO LTD

Effective date: 20120323

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 518129 SHENZHEN, GUANGDONG PROVINCE TO: 100033 XICHENG, BEIJING

TR01 Transfer of patent right

Effective date of registration: 20120323

Address after: 100033, No. 17, Finance Street, Beijing, Xicheng District

Patentee after: Beijing property right Bats Exchange Inc

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: Huawei Technologies Co., Ltd.

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090128

Termination date: 20151125

EXPY Termination of patent right or utility model