CN1214541C - Communication method between inner core and microengine inside network processor - Google Patents
Communication method between inner core and microengine inside network processor Download PDFInfo
- Publication number
- CN1214541C CN1214541C CN 02103659 CN02103659A CN1214541C CN 1214541 C CN1214541 C CN 1214541C CN 02103659 CN02103659 CN 02103659 CN 02103659 A CN02103659 A CN 02103659A CN 1214541 C CN1214541 C CN 1214541C
- Authority
- CN
- China
- Prior art keywords
- message
- pointer
- kernel
- micro engine
- points
- 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 - Lifetime
Links
Images
Abstract
The present invention discloses a method for the communication between an inner core and a micro engine in a network processor, wherein in the process that the micro engine uE forwards a message to the inner core form a network, a unit used for storing a pointer BD which points at the message is arranged in an internal storage unit scratch_pad of the network processor, the BD in the unit is allocated to and is written into the unit by the uE, and the BD is queried and read by the Core through starting a task; in the process that the Core sends the message to the network through the uE, a unit used for storing the BD is also arranged in the scratch_pad, a certain quantity is allocated to the BD by the uE when the BD is initialized, the Core writes the information of sending the message into the BD, and after the uE reads the BD, the uE writes the newly allocated BD pointer into the unit storing the BD pointer, so that the forwarding rate is obviously improved, the BD is managed by the uE in a unified mode, and the situation that memory space leaks is avoided.
Description
Technical field
The present invention relates to network processing unit, relate in particular to the communication means between kernel and micro engine in a kind of network processing unit.
Background technology
Network processing unit is the device that is used to finish network data message forwarding function, and its core processing module is made up of a plurality of independently uE (micro engine) and a Core (kernel) usually.The uE that a plurality of independent parallels are handled mainly finishes reception, processing, storage and the forwarding of network data; Configuration, management and the processing of control message etc. that Core mainly finishes forwarding-table item focus on function.In actual applications, need to issue the message that Core handles and Core need send on the network on the network and all transmitted by uE usually, therefore, the communication means between uE and the Core can directly have influence on the efficient of network processing unit.The implementation method of prior art comprises following two processes:
One, uE E-Packets to Core from network, step as shown in Figure 1:
A1, network data message enter the network interface NetworkInterface of network processing unit;
A2, uE receive message from network interface, handle;
A3, uE distribute the pointer BD that is used in reference to message in pointer memory SRAM, message is stored in the message memory storage SDRAM and the BD corresponding address;
A4, uE write BD to the relevant information of message;
A5, uE write the BD pointer unit Maibox0 that is used for transmitting from uE to Core the BD pointer;
A6, uE send the interrupt signal that receives message to Core;
A7, Core receive after the interrupt signal, read the BD pointer in Maibox0;
A8, Core read the message information in the BD according to the BD pointer
A9, Core take message away according to the information of BD from SDRAM;
A10, Core write the BD pointer unit Maibox1 that is used for transmitting from Core to uE the BD pointer;
A11, Core send out interrupt signal notice uE and discharge BD;
A12, uE read the BD pointer from Maibox1, discharge BD.
Two, Core sends message to network by uE, step as shown in Figure 2:
B1, Core send interrupt signal to uE, and notice uE distributes BD;
After b2, uE distribute BD, the BD pointer is write the unit Mailbox3 that is used for transmitting the BD pointer from uE to Core;
B3, uE send interrupt signal to Core, and notice Core gets the BD pointer;
B4, Core take out the BD pointer from Mailbox3;
B5, Core write message in the corresponding SDRAM address according to the BD pointer;
B6, Core write the information that sends message among the BD;
B7, Core write the BD pointer that sends message the unit Mailbox2 that is used for transmitting from Core to uE the BD pointer;
B8, Core send interrupt signal to uE, and notice uE has message to send;
B9, uE take out the BD pointer that sends message from Maibox2;
B10, uE read the information of BD according to the BD pointer;
B11, uE send to message on the network interface according to BD from SDRAM, discharge BD then;
B12, network interface are dealt into message on the network.
Adopt the communication mechanism that sends interrupt signal in this method between uE and the Core, the step more complicated, by test, 64 byte message forwarding speed have only about 5000pps (packet per second); Secondly because Core also participates in the management of BD directly, BD that needs special formation to manage to receive message and the BD that applies for when sending message cause BD to lose in the time of at full capacity easily, thus the leakage situation that causes the correspondence memory space to use.
Summary of the invention
The object of the present invention is to provide communication efficiency between a kind of uE of raising and the Core to prevent the communication means of memory overflow.
For achieving the above object, the technical solution used in the present invention is: the communication means in a kind of network processing unit between kernel and micro engine, method comprises that micro engine uE E-Packets from network and sends the process of message to the network to the process of kernel Core and Core by uE, wherein, for E-Packeting from network, uE among network processing unit internal storage unit scratch_pad, is provided for depositing the unit of the pointer BD that points to message to the process of Core, BD in this unit is distributed by uE and writes, and is inquired about and is read by the Core initiating task; For Core sends message also is provided for depositing the pointer BD that points to message in network processing unit internal storage unit scratch_pad to the process on the network unit by uE, this BD distributes some when the initialization by uE, Core writes BD to the information that sends message, and uE writes the unit of depositing the BD pointer with newly assigned BD pointer after reading this BD again.
Owing to adopt above technical scheme, message between uE and the Core is transmitted step and is obtained simplifying, speed is significantly improved, by test, 64 byte message forwarding speed reach about 9300pps, have almost improved nearly one times, and BD is by the uE unified management, the BD that discharges with needs that Core need not be provided with that formation deposits application has overcome that BD loses and the situation that causes the correspondence memory space to be leaked has improved the fail safe and the reliability of BD operation.
Description of drawings
Fig. 1 is that uE E-Packets to the process schematic diagram of Core from network in the prior art;
Fig. 2 is that Core sends the process schematic diagram of message to network by uE in the prior art;
Fig. 3 is that the inventive method uE E-Packets to the process schematic diagram of Core from network;
Fig. 4 is that the inventive method Core sends the process schematic diagram of message to network by uE.
Embodiment
Below in conjunction with drawings and Examples the inventive method is described further.
To be uE from network E-Packet the inventive method is provided for depositing the unit of the pointer BD that points to message among network processing unit internal storage unit scratch_pad to the process of Core, BD in this unit is distributed by uE and writes, and is inquired about and is read by the Core initiating task; For Core sends message also is provided for depositing the pointer BD that points to message in scratch_pad to the process on the network unit by uE, this BD distributes some when the initialization by uE, Core writes BD to the information that sends message, and uE writes the unit of depositing the BD pointer with newly assigned BD pointer after reading this BD again.With reference to Fig. 3, Fig. 4, in concrete the enforcement
UE from the execution in step that network E-Packets to uE side the process of Core is:
C1, network data message enter the network interface of network processing unit;
C2, uE receive message from network interface, handle;
C3, uE distribute BD, message are stored in the address in the message memory storage SDRAM of BD correspondence;
C4, uE write BD to the relevant information of message;
C5, uE read the unit of depositing the BD pointer, wherein have the BD pointer then to discharge BD, do not have the BD pointer then to continue step c6;
C6, uE write the unit of depositing the BD pointer to the BD pointer of current reception message; The execution in step of Core side is:
The unit that the BD pointer is deposited in c7, Core inquiry then reads if any the BD pointer;
C8, Core read the message information in the BD;
C9, Core take message away according to the information of BD from SDRAM;
C10, Core put back to the BD pointer in the unit of depositing the BD pointer.
Send by uE in the process of message to the network at Core, at first through initialization step d1 uE is write in the unit of depositing the BD pointer to a certain number of BD pointer that Core distributes, the execution in step of Core side is:
D2, Core get the BD pointer from the unit of depositing the BD pointer;
D3, Core write message in the corresponding message memory storage SDRAM address according to the BD pointer;
D4, Core write the information that sends message among the BD;
D5, Core send a signal to uE, and notice uE has message to send;
The execution in step of uE side is:
D6, uE take out the BD pointer that sends message from the unit of depositing the BD pointer;
D7, the uE BD that reallocates writes the BD pointer in the unit of depositing the BD pointer;
D8, uE read the information of BD;
D9, uE send to message on the network interface from SDRAM according to BD, and discharge BD;
D10, network interface are dealt into message on the network
As specific embodiments of the invention, uE E-Packets process to Core from network, can in the unit of depositing the BD pointer, be provided for identifying the flag bit that has or not the BD pointer, after carrying out described uE the BD pointer of current reception message being write the step c6 of the unit of depositing the BD pointer, this flag bit is provided with, after carrying out described Core and the BD pointer being put back to step c10 in the unit of depositing the BD pointer, this flag bit is removed.
Claims (4)
1, the communication means between kernel and micro engine in a kind of network processing unit, comprising that micro engine (uE) E-Packets from network sends the process of message to the network to the process of kernel (Core) and kernel (Core) by micro engine (uE), it is characterized in that: network processing unit internal storage unit (scratch_pad), be provided for depositing the unit of the pointer (BD) that points to message to the process of kernel for micro engine E-Packets from network, the pointer of the sensing message in this unit is distributed by micro engine and writes, and is inquired about and is read by the kernel initiating task; For kernel sends message also is provided for depositing the pointer (BD) that points to message in network processing unit internal storage unit (scratch_pad) to the process on the network unit by micro engine, this pointer that points to message distributes some when the initialization by micro engine, kernel writes the pointer of this sensings message to the information that sends message, and micro engine reads the unit that again pointer of newly assigned sensing message is write the pointer of depositing the sensing message behind the pointer of this sensing message.
2, the communication means between kernel and micro engine in the network processing unit as claimed in claim 1 is characterized in that: micro engine (uE) from the execution in step that network E-Packets to micro engine side the process of kernel (Core) is:
(1) the network data message enters the network interface of network processing unit;
(2) micro engine receives message from network interface, handles;
(3) micro engine distribute to point to the pointer of message, message is stored in the address in the message memory (SDRAM) of pointer correspondence of this sensing message;
(4) micro engine writes the relevant information of message on the pointer of this sensing message;
(5) micro engine reads the unit of depositing the pointer that points to message, wherein has the pointer that points to message then to discharge the pointer of this sensing message, and the pointer that does not point to message then continues step (6);
(6) micro engine writes the pointer of current reception message the unit of the pointer of depositing this sensing message;
The execution in step of kernel side is:
(7) unit of the pointer that points to message is deposited in the kernel inquiry, then reads if any the pointer that points to message;
(8) kernel reads the message information in the pointer that points to message;
(9) kernel is taken message away according to the information of the pointer that points to message from message memory (SDRAM);
(10) kernel is put back to the pointer that points to message in the unit of the pointer of depositing this sensing message.
3, the communication means between kernel and micro engine in the network processing unit as claimed in claim 2, it is characterized in that: in the unit of depositing the pointer that points to message, be provided for identifying the flag bit that has or not the pointer that points to message, after the execution micro engine writes the step (6) of the unit of depositing the pointer that points to message to the pointer of current reception message, this flag bit is provided with, after carrying out kernel and the pointer that points to message being put back to step (10) in the unit of the pointer of depositing this sensing message, this flag bit is removed.
4, the communication means between kernel and micro engine in the network processing unit as claimed in claim 1, it is characterized in that: at first the pointer of a certain number of sensing message that micro engine is distributed to kernel through initialization step (1) writes in the unit of depositing the pointer that points to message, and the execution in step that sends kernel side in the process of message to the network at kernel by micro engine is;
(2) kernel is got the pointer that points to message from the unit of depositing the pointer that points to message;
(3) kernel writes message in corresponding message memory (SDRAM) address according to the pointer that points to message;
(4) kernel writes the information that sends message in the pointer of this sensing message;
(5) kernel sends a signal to micro engine, and the notice micro engine has message to send;
The execution in step of micro engine side is:
(6) micro engine takes out the pointer that sends message from the unit of depositing the pointer that points to message;
(7) pointer that points to message of micro engine reallocation writes the pointer of this sensing message in the unit of the pointer of depositing this sensing message;
(8) micro engine reads the information of the pointer that points to message;
(9) micro engine according to the pointer that points to message the message memory storage SDRAM of message from correspondence) send on the network interface, and discharge the pointer of this sensing message;
(10) network interface is dealt into message on the network.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 02103659 CN1214541C (en) | 2002-02-04 | 2002-02-04 | Communication method between inner core and microengine inside network processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 02103659 CN1214541C (en) | 2002-02-04 | 2002-02-04 | Communication method between inner core and microengine inside network processor |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1437327A CN1437327A (en) | 2003-08-20 |
CN1214541C true CN1214541C (en) | 2005-08-10 |
Family
ID=27627909
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 02103659 Expired - Lifetime CN1214541C (en) | 2002-02-04 | 2002-02-04 | Communication method between inner core and microengine inside network processor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1214541C (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7590845B2 (en) * | 2003-12-22 | 2009-09-15 | Lenovo Singapore Pte. Ltd. | Key cache management through multiple localities |
CN100440854C (en) * | 2004-06-25 | 2008-12-03 | 中国科学院计算技术研究所 | A data packet receiving interface component of network processor and storage management method thereof |
CN101136852B (en) * | 2007-06-01 | 2010-05-19 | 武汉虹旭信息技术有限责任公司 | Deep pack processing method of microengine |
CN101436989B (en) * | 2008-12-26 | 2010-10-27 | 福建星网锐捷网络有限公司 | Method and device for forwarding message |
-
2002
- 2002-02-04 CN CN 02103659 patent/CN1214541C/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
CN1437327A (en) | 2003-08-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20070073973A1 (en) | Method and apparatus for managing buffers in a data processing system | |
US20040117594A1 (en) | Memory management method | |
CN109783250B (en) | Message forwarding method and network equipment | |
CN1859325A (en) | News transfer method based on chained list process | |
CN110235098B (en) | Storage system access method and device | |
CN1828556A (en) | Method, system and apparatus for data memory | |
CN101046786A (en) | DMA controller and transmission method of implementing high efficient DMA transmission | |
WO2008093961A1 (en) | System and method for processing read request | |
CN1862482A (en) | FIFO memory and method for output empty full marker thereof | |
WO2020199760A1 (en) | Data storage method, memory and server | |
CN1304957C (en) | Method for improving compute system disc synchronous writing property based on movable memory | |
CN1925530A (en) | System and method for recording call list | |
WO2023155531A1 (en) | Data read-write method and apparatus and related device | |
CN1214541C (en) | Communication method between inner core and microengine inside network processor | |
CN1687899A (en) | Method, system and module for dynamic downloading of applied programe to user identification | |
US9319354B2 (en) | Network storage device and method for data transmission via a single serial network link | |
CN1359067A (en) | Method for making data in circular buffer effective | |
CN1308840C (en) | Method for acquisition of data in hard disk | |
CN1714401A (en) | SDRAM address mapping optimized for two-dimensional access | |
CN1889038A (en) | Method for managing long-distance structural components service cycle with class as unit | |
CN1214581C (en) | Large capacity realtime stream processing method for removing dithering in using buffer memory | |
CN109101194A (en) | One kind writing with a brush dipped in Chinese ink performance optimization method and storage system | |
EP3113026B1 (en) | Automatic memory management using a memory management unit | |
WO2009109126A1 (en) | Data caching method and equipment | |
CN1885827A (en) | Message storage forwarding method and message storage forwarding circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
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 | ||
CX01 | Expiry of patent term | ||
CX01 | Expiry of patent term |
Granted publication date: 20050810 |