CN1866912A - Method and route apparatus for loading instruction code in network processor - Google Patents

Method and route apparatus for loading instruction code in network processor Download PDF

Info

Publication number
CN1866912A
CN1866912A CNA2005100912056A CN200510091205A CN1866912A CN 1866912 A CN1866912 A CN 1866912A CN A2005100912056 A CNA2005100912056 A CN A2005100912056A CN 200510091205 A CN200510091205 A CN 200510091205A CN 1866912 A CN1866912 A CN 1866912A
Authority
CN
China
Prior art keywords
processing unit
network processing
module
instruction code
functional module
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
Application number
CNA2005100912056A
Other languages
Chinese (zh)
Other versions
CN100442768C (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.)
Huawei Technologies Co Ltd
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 CNB2005100912056A priority Critical patent/CN100442768C/en
Publication of CN1866912A publication Critical patent/CN1866912A/en
Application granted granted Critical
Publication of CN100442768C publication Critical patent/CN100442768C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a method for loading command code on the network processor and relative route device. it is characterized in that: dividing the command code of network processor into several function modules and fixing needed function module of network processor; then loading said function module into the network processor. The invention can combine the loaded command code and the real demand of network processor compactly, to avoid unneeded command code consuming the command storage space, to reduce the realization cost of route device.

Description

A kind of in network processing unit the method and the routing device of loading instruction code
Technical field
The present invention relates to the network communications technology field, be specifically related to a kind of in network processing unit the method and the routing device of loading instruction code.
Background technology
In data communication field, in order to improve the message forward efficiency, big capacity router generally adopts distributed forwarding structure, as shown in Figure 1.
Among Fig. 1, the route querying of packet is finished by forwarding engine, and the packet switch between the different forwarding engines is realized by switching network.The corresponding interface board of each forwarding engine takies a groove position of router machine frame.Route is calculated and is finished by the processor that is independent of forwarding engine and switching network.
The outstanding feature of the router of this architecture is to transmit layer to separate with key-course, makes the function singlenessization of forwarding engine, the characteristics that the more outstanding in design bag of forwarding engine is transmitted, thus make the bag forwarding of high-speed high capacity become possibility.
Forwarding engine in the router can adopt logic chip, application-specific integrated circuit (ASIC) (ASIC) or network processing unit (Network Processor) to realize usually.
Adopt logic chip can have higher forward efficiency as forwarding engine, still, forwarding engine maintainable poor.
Adopt application-specific integrated circuit (ASIC) can have very high forward efficiency, still, have shortcomings such as cost height, construction cycle length, the new function difficulty of increase simultaneously as forwarding engine.
Network processing unit combines the characteristics of ASIC and universal cpu, promptly has the forward efficiency of ASIC, again the support software flexibility of programming.Adopt network processing unit not only to have very high forward efficiency, also have advantages such as cost is low, the construction cycle short, the new function of convenient increase as forwarding engine.
At present, the method for loading instruction code is in network processing unit: the file destination that the unified compiling of supporting according to router of interface type generates is loaded into this file destination in the instruction memory space of network processing unit.
The interface type that routing device is supported is generally abundanter, and, fast development along with IP network, the function of router and the kind of interface of support, quantity are all in rapid expansion, the main flow router is on the basis that IP transmits and MPLS transmits, major part all possesses three-layer VPN (Virtual Private Network), two-layer VPN, IPV6, IP tunnel function, simultaneously, router also needs to provide POS (based on the packet forward of SDH), Ethernet, ATM (asynchronous transfer mode), E1, T1, E3, frame relay, interfaces such as RPR (Resilient Packet Ring), channelizing E1.
Because distinct interface has its particularity, be difficult to accomplish that instruction code reuses, so, different interfaces generally all needs the corresponding instruction code to carry out special processing, the interface that routing device is supported is many more, corresponding size of code is just big more, increases the expansion that above-mentioned forwarding capability and interface mean file destination in the network processing unit.
The instruction memory space of network processing unit is certain in the router, that is to say that the size of code that network processing unit can hold fixes, so, network processing unit can face the problem of instruction insufficient memory, even the instruction memory space of network processing unit is enough at present, along with the problem of the instruction insufficient memory of network processing unit also can appear in router new interface type, the appearance of function newly.
At present, solving network processing unit instructs the method for memory space problem to mainly contain following three kinds:
Method one: reduce the software function method.
When the instruction memory space of network processing unit can not hold the instruction code of the whole forwarding capabilitys of router, only store the instruction code of a part of forwarding capability in the network processing unit, be a network processing unit file destination that the compiling of loading section forwarding capability generates, make router that the part forwarding capability only is provided.
The shortcoming of method one is very obvious, for the user who buys router, each forwarding engine must be abandoned a part of professional forwarding capability, realize whole forwarding capabilitys, need to buy a plurality of forwarding engines, thereby remedy the deficiency of single forwarding engine on forwarding capability by the quantity that improves forwarding engine, the groove position of sacrificing router.
Method two, on an interface board, use two network processing unit cooperatings, each network processing unit is born a part of forwarding capability, these two network processing units logically constitute a forwarding engine, thereby finish the forwarding capability that a network processing unit can't be realized.
The shortcoming of method two is also very obvious, router hardware cost height.
Three, forwarding engine of method uses a network processing unit, uses FPGA to finish the function of a part of network processing unit simultaneously, has reduced the size of code that the instruction memory space need be stored in the network processing unit by this way.
The shortcoming of method three equally also clearly, the hardware cost height.
Summary of the invention
The objective of the invention is to, provide a kind of in network processing unit the method and the routing device of loading instruction code, by in network processing unit, only loading the functional module that it needs, when not increasing hardware cost, efficiently solve the problem of network processing unit instruction limited storage space.
For achieving the above object, provided by the invention a kind of in network processing unit the method for loading instruction code, comprising:
A, the instruction code of network processing unit is divided into a plurality of functional modules;
B, the functional module that definite network processing unit needs from described each functional module;
C, the functional module of described needs is loaded in the network processing unit.
Described step a specifically comprises:
The instruction code of network processing unit is divided into public module and each interface module.
Described step b specifically comprises:
Determine the interface type that network processing unit is supported;
The interface module of the interface type correspondence of public module and network processing unit support is defined as the functional module that network processing unit needs.
Described step b specifically comprises:
When network processing unit started, the interface type that network processing unit is supported was determined in the processor controls analysis;
Processor controls is defined as the functional module that network processing unit needs with the interface module of the interface type correspondence of public module and network processing unit support.
Described each functional module exists with the form of the file destination of independent compiling.
Described step c specifically comprises:
Processor controls downloads to each file destination of the interface type correspondence of network processing unit support and synthetic file destination of file destination of public module in the network processing unit.
Described network processing unit is: the forwarding engine in the router of distributed forwarding structure.
The size of code of described each functional module all is no more than the instruction memory space of network processing unit.
The present invention also provides a kind of routing device, comprising: the loading instruction code device, and described loading instruction code device comprises:
Memory module: each functional module after the instruction code of network processing unit is cut apart in storage;
Determination module: from each functional module of described memory module storage, determine the functional module that network processing unit needs;
Load-on module: the functional module that described determination module is determined is loaded in the network processing unit.
Described load-on module comprises:
Compiling submodule: the functional module that described determination module is determined is synthesized a file destination;
Load submodule: the file destination that described compiling submodule is synthetic is loaded in the network processing unit.
Description by technique scheme as can be known, be divided into a plurality of little functional modules by instruction code with network processing unit, the instruction code that loads in the network processing unit can be combined closely with the actual needs of network processing unit, as combining closely with the forwarding capability of network processing unit support, make the instruction code that loads in the network processing unit pointed, avoided the phenomenon of unnecessary instruction code consumption network processor instruction memory space, made the instruction memory space of network processing unit can access efficient utilization; By when network processing unit starts, the interface type that processor controls dynamic analysis network processing unit is supported can accurately coincide the instruction code of dynamic load in network processing unit with the forwarding capability that network processing unit is supported; Thereby efficiently solve the problem of network processing unit instruction limited storage space by technical scheme provided by the invention, realized reducing the purpose that routing device is realized cost.
Description of drawings
Fig. 1 is the structural representation of distributed forwarding structure router;
Fig. 2 be of the present invention in network processing unit the method flow diagram of loading instruction code.
Embodiment
Because the interface type of network processing unit support is limited in the routing device, the unified compiling of instruction code of network processing unit is generated a file destination, the instruction memory space that will cause the instruction code of the unsupported interface correspondence of network processing unit also to download to network processing unit has suffered, thereby, caused the waste of instruction memory space.If can the corresponding instruction code be downloaded to the instruction memory space of network processing unit according to the actual needs of network processing unit such as the interface type of network processing unit support etc., the instruction memory space of network processing unit is efficiently utilized.
Therefore, of the present invention in network processing unit the method for loading instruction code and the core of routing device be: determine the functional module that network processing unit needs each functional module after the instruction code of network processing unit is divided, and these functional modules that need be loaded in the network processing unit.
Based on core concept of the present invention technical scheme provided by the invention is further described below.
Network processing unit among the present invention is: the forwarding engine in the router of distributed forwarding structure.
Whole instruction code unifications that the present invention need change network processing unit are compiled as the method for file destination, whole instruction codes to network processing unit are cut apart, and the method for cutting apart is: the interface module that whole instruction codes of network processing unit is divided into public module and various router interface type correspondences.These functional modules can exist with the form of file destination, promptly public module are compiled separately, to the also compiling respectively of interface module of various router interface type correspondences.Like this, just generated a plurality of file destinations, and the size of code of each file destination correspondence all should be no more than the instruction memory space of network processing unit.
After instruction code cut apart compiling, should determine the functional module that network processing unit needs.The method of determining functional module that network processing unit needs can be the functional module of determining the network processing unit needs according to the interface type of network processing unit support.Like this, the functional module of network processing unit needs can comprise: each interface module and the public module of the interface type correspondence that network processing unit is supported.
Accuracy for the functional module in the instruction memory space that guarantees to be loaded into network processing unit, the present invention can dynamically carry out when network processing unit starts to the process of network processing unit value-added tax function module, and can realize process to network processing unit value-added tax function module by processor controls.Processor controls has the management function to network processing unit.
When processor controls starts at network processing unit, the interface type that the dynamic analysis network processing unit is supported, and the interface type of supporting according to network processing unit, from the file destination of respectively cutting apart, choose corresponding file destination, be the file destination of public module and the file destination of the interface type correspondence that network processing unit is supported, the file destination combination of choosing is generated a new file destination, and the file destination that this is new is loaded in the instruction memory space of network processing unit.
Because the part of the interface type that the interface type of network processing unit support can only be a router to be supported, so, adopt method of the present invention, can avoid the instruction code of the unsupported interface type of network processing unit is loaded in the network processing unit, thereby the problem that efficiently solves such code space of network processing unit is effectively solved.Simultaneously, the new interface type of supporting of router can further not consume code space.
Of the present invention in network processing unit loading instruction code method as shown in Figure 2.
Among Fig. 2, in step 1, when network processing unit starts, processor controls is obtained the file pointer that each functional module is the memory address of each file destination.
Obtain the file destination of public module according to the file pointer of each file destination to step 2, network processing unit.
Analyze the interface type that this network processing unit is supported to step 3, processor controls.
Select corresponding file destination to step 4, processor controls according to the interface type of this network processing unit support.The file destination that processor controls is selected may be one or more.
To step 5, processor controls the file destination of the interface type correspondence of selection and the file destination of public module are synthesized a new file destination, like this, the instruction code of the unsupported interface type correspondence of network processing unit just need not appear at newly-generated file destination and suffered.
The file destination that processor controls is new with this downloads in the instruction memory space of network processing unit, like this, unnecessary instruction code just can the consumption network processor the instruction memory space, make the instruction memory space of network processing unit can access efficient utilization, thereby efficiently solve the problem of network processing unit instruction limited storage space, reduced the realization cost of routing device.
Be provided with the loading instruction code device in the routing device provided by the invention, and the function of loading instruction code device is realized that by memory module, determination module and load-on module wherein the function of load-on module is realized by compiling submodule and loading submodule.
Memory module is mainly used in each functional module after the storage networking processor instruction code division, as the functional module of storage public module, each interface type correspondence.Each functional module is all stored with the form of file destination.The size of code of each file destination all should be no more than the instruction memory space of network processing unit.
Determination module is mainly used in when network processing unit starts, and dynamically determines the interface type that network processing unit is supported, and determines the functional module of the interface type correspondence that network processing unit is supported from each functional module of memory module storage.
The compiling submodule is mainly used in the file destination of the interface type correspondence that network processing unit that determination module is determined supports and synthetic new file destination of file destination of public module.
The loading submodule is mainly used in the synthetic new file destination of compiling submodule is loaded in the instruction memory space of network processing unit.
Memory module among the present invention, determination module, compiling submodule and loading submodule can be arranged in processor controls, and the loading instruction code device among the present invention can be realized by software.
Though described the present invention by embodiment, those of ordinary skills know, the present invention has many distortion and variation and do not break away from spirit of the present invention, and the claim of application documents of the present invention comprises these distortion and variation.

Claims (10)

1, a kind of in network processing unit the method for loading instruction code, it is characterized in that, comprising:
A, the instruction code of network processing unit is divided into a plurality of functional modules;
B, the functional module that definite network processing unit needs from described each functional module;
C, the functional module of described needs is loaded in the network processing unit.
2, as claimed in claim 1 a kind of in network processing unit the method for loading instruction code, it is characterized in that described step a specifically comprises:
The instruction code of network processing unit is divided into public module and each interface module.
3, as claimed in claim 2 a kind of in network processing unit the method for loading instruction code, it is characterized in that described step b specifically comprises:
Determine the interface type that network processing unit is supported;
The interface module of the interface type correspondence of public module and network processing unit support is defined as the functional module that network processing unit needs.
4, as claimed in claim 3 a kind of in network processing unit the method for loading instruction code, it is characterized in that described step b specifically comprises:
When network processing unit started, the interface type that network processing unit is supported was determined in the processor controls analysis;
Processor controls is defined as the functional module that network processing unit needs with the interface module of the interface type correspondence of public module and network processing unit support.
5, as claim 1,2,3 or 4 described a kind of in network processing unit the method for loading instruction code, it is characterized in that described each functional module exists with the form of the file destination of independent compiling.
6, as claimed in claim 5 a kind of in network processing unit the method for loading instruction code, it is characterized in that described step c specifically comprises:
Processor controls downloads to each file destination of the interface type correspondence of network processing unit support and synthetic file destination of file destination of public module in the network processing unit.
7, as claim 1,2,3 or 4 described a kind of in network processing unit the method for loading instruction code, it is characterized in that described network processing unit is: the forwarding engine in the router of distributed forwarding structure.
8, as claim 1,2,3 or 4 described a kind of in network processing unit the method for loading instruction code, it is characterized in that the size of code of described each functional module all is no more than the instruction memory space of network processing unit.
9, a kind of routing device comprises: the loading instruction code device is characterized in that described loading instruction code device comprises:
Memory module: each functional module after the instruction code of network processing unit is cut apart in storage;
Determination module: from each functional module of described memory module storage, determine the functional module that network processing unit needs;
Load-on module: the functional module that described determination module is determined is loaded in the network processing unit.
10, a kind of routing device as claimed in claim 9 is characterized in that, described load-on module comprises:
Compiling submodule: the functional module that described determination module is determined is synthesized a file destination;
Load submodule: the file destination that described compiling submodule is synthetic is loaded in the network processing unit.
CNB2005100912056A 2005-08-05 2005-08-05 Method and route apparatus for loading instruction code in network processor Expired - Fee Related CN100442768C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100912056A CN100442768C (en) 2005-08-05 2005-08-05 Method and route apparatus for loading instruction code in network processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100912056A CN100442768C (en) 2005-08-05 2005-08-05 Method and route apparatus for loading instruction code in network processor

Publications (2)

Publication Number Publication Date
CN1866912A true CN1866912A (en) 2006-11-22
CN100442768C CN100442768C (en) 2008-12-10

Family

ID=37425801

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100912056A Expired - Fee Related CN100442768C (en) 2005-08-05 2005-08-05 Method and route apparatus for loading instruction code in network processor

Country Status (1)

Country Link
CN (1) CN100442768C (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101335644B (en) * 2008-07-30 2011-05-11 中兴通讯股份有限公司 Method for network processor dynamically loading microcode
CN102148754A (en) * 2010-12-30 2011-08-10 杭州华三通信技术有限公司 Loading method and device for FPGA (field programmable gate array) logic editions
CN110868329A (en) * 2020-01-09 2020-03-06 网络通信与安全紫金山实验室 Dynamic adjustment method and system for router interface type
WO2020132838A1 (en) * 2018-12-24 2020-07-02 华为技术有限公司 Network processor and message processing method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6169745B1 (en) * 1999-06-18 2001-01-02 Sony Corporation System and method for multi-level context switching in an electronic network
US6404752B1 (en) * 1999-08-27 2002-06-11 International Business Machines Corporation Network switch using network processor and methods
US7103881B2 (en) * 2002-12-10 2006-09-05 Intel Corporation Virtual machine to provide compiled code to processing elements embodied on a processor device
CN1328890C (en) * 2004-02-10 2007-07-25 中兴通讯股份有限公司 Method for realizing group control function by means of network processor

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101335644B (en) * 2008-07-30 2011-05-11 中兴通讯股份有限公司 Method for network processor dynamically loading microcode
CN102148754A (en) * 2010-12-30 2011-08-10 杭州华三通信技术有限公司 Loading method and device for FPGA (field programmable gate array) logic editions
CN102148754B (en) * 2010-12-30 2013-12-11 杭州华三通信技术有限公司 Loading method and device for FPGA (field programmable gate array) logic editions
WO2020132838A1 (en) * 2018-12-24 2020-07-02 华为技术有限公司 Network processor and message processing method
CN110868329A (en) * 2020-01-09 2020-03-06 网络通信与安全紫金山实验室 Dynamic adjustment method and system for router interface type

Also Published As

Publication number Publication date
CN100442768C (en) 2008-12-10

Similar Documents

Publication Publication Date Title
CN1784678A (en) System and method for efficiently searching a forwarding database that is split into a bounded number of sub-databases having a bounded size
CN1735878A (en) State engine for data processor
CN1955948A (en) Digital data processing device and method for managing cache data
CN1866912A (en) Method and route apparatus for loading instruction code in network processor
CN1677958A (en) Compact packet switching node storage architecture employing double data rate synchronous dynamic RAM
CN101039215A (en) Method and system for maintaining ternary content addressable memory items
CN1630268A (en) A breakout routing method for multi-ISP local area network
CN1787477A (en) Method for searching IPv6 routing table
CN1992641A (en) System and method for realizing board software loading
CN1702659A (en) IP base LSI designing system and designing method
CN1949736A (en) Text edition circuit and method
CN1207878C (en) Routing table compression method
CN102594650B (en) Method for processing multicast message and exchange access apparatus
CN1858705A (en) Method for realizing network processor dynamic loading micro code and network device
CN103457855A (en) Method and device for establishing classless inter-domain routing table and forwarding messages
CN1674538A (en) Network storing system based on local network and its method for reading and writing data
CN1248417C (en) System and method of implementing a wireless communication system using a reconfigurable chip with a reconfigurable fabric
CN104301227B (en) High-speed low-power-consumption IP route table lookup method based on TCAM
CN1859251A (en) Method for realizing communication unit interconnection
CN1476212A (en) Method and device for realizing data package transmission on synchronous digital system
CN1534463A (en) Synchronous multiline procedure processor circuit and computer program product and operating method
CN100344103C (en) Method for uniform distribution of physical layer data transmitting time slot in whole time domain
CN101047719A (en) Port switchover control system and method
CN1250016C (en) Method for realizing business roote configuration in three stage CLOS matrix
CN1150731C (en) High speed routing search system based on content addressable memory

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

Granted publication date: 20081210

Termination date: 20170805

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