CN101808029B - Method and device for preloading packet header and system using method - Google Patents

Method and device for preloading packet header and system using method Download PDF

Info

Publication number
CN101808029B
CN101808029B CN2009100095015A CN200910009501A CN101808029B CN 101808029 B CN101808029 B CN 101808029B CN 2009100095015 A CN2009100095015 A CN 2009100095015A CN 200910009501 A CN200910009501 A CN 200910009501A CN 101808029 B CN101808029 B CN 101808029B
Authority
CN
China
Prior art keywords
bag
packet head
main storage
header data
positional information
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
CN2009100095015A
Other languages
Chinese (zh)
Other versions
CN101808029A (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.)
Ralink Technology Corp Taiwan
Original Assignee
Ralink Technology Corp Taiwan
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 Ralink Technology Corp Taiwan filed Critical Ralink Technology Corp Taiwan
Priority to CN2009100095015A priority Critical patent/CN101808029B/en
Publication of CN101808029A publication Critical patent/CN101808029A/en
Application granted granted Critical
Publication of CN101808029B publication Critical patent/CN101808029B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a method and a device for preloading a packet header and a system applying the method. In the method, before a central processing unit executes downloading data of the packet header, packet header data is downloaded from a main memory in advance to a packet header register so as to accelerate the processing speed of the packet header data.

Description

The system of the method and apparatus of packet head preload and the described method of use
Technical field
The present invention relates to a kind of bag and process, particularly a kind of method and apparatus of packet head preload.
Background technology
The internet is day by day universal, and various application also develops rapidly thereupon, and many team also devote the research of the data transmission performance that promotes the internet in succession.In different use occasions, the packet length that allows during transfer of data to use is not quite similar, and comprises multiple bag data operation handling procedure, as check, disassemble, make up, the comparison of search, content, transmission supervisor.Rise and a large amount of bag transfer of data along with the bandwidth demand of the network applications such as home network, campus network and enterprise network is rapid, the calculation process technical development of the transmission performance of bag and bag also comes into one's own day by day.
In the network packet market demand, for guaranteeing its service quality, thereby to bag transmission has some relevant requirements.For example, in the application of voice-over-net service, bag is delayed causing echo and trill.When bag was delayed, people's ear just can have been told echo and occur.Good Internet Transmission environment and bag data processing performance need guarantee that bag delays being lower than 150 milliseconds.It approximately is 150 milliseconds to 400 milliseconds that the receptible sound of people's ear is delayed.Surpass 400 milliseconds delay can cause sound quality abominable and can't answer.Therefore, except the Strengthens network transmission quality, the transmission of all types of bags also needs suitably to manage opportunity.For example, indicate the processing priority of described bag according to the emergency degree, the network equipment subsequently can and be processed according to the demand of its service characteristic.
Along with network transfer speeds improves constantly and need the package informatin of simultaneously processed voice transmission and multimedia transmission, be to promote the performance of processing, multiple technologies and method are suggested.For example, SOC Design manufacturer be devoted to improve CPU the computing clock, strengthen cache memory space or in system, use the arithmetic processor of special disposal bag data.Yet above-mentioned mode has also improved cost and power loss thereupon.Therefore industrial circle needs a kind ofly can improve the method for wrapping transmission speed in mode cheaply.
Summary of the invention
Packet head preload method and apparatus of the present invention was downloaded in the packet head register described packet head data to accelerate the processing speed of described packet head data before CPU is carried out download one packet head data in advance.
One embodiment of the invention disclose a kind of packet head preloading device, and described packet head preloading device comprises at least one bag detector, at least one packet head register and at least one data scheduler.Described at least one bag detector is stored at least one bag in order to monitor at least one bag DMA controller the action of one main storage.Described at least one data scheduler is in order to read and to be deposited at described at least one packet head register with the header data of described at least one bag from described main storage.
Another embodiment of the present invention discloses the pre-support method of a kind of packet head.Described method comprises the following step: monitor the action that at least one bag DMA controller is stored at least one bag one main storage; Download in header data to the packet head register of described at least one bag; And if in a setting-up time, a CPU wishes to read the header data of described at least one bag, provided so the header data of described at least one bag by described packet head register.
One embodiment of the invention disclose a kind of system, and it comprises medium access control, a bag DMA controller, a CPU, a main storage and a packet head preloading device.Described packet head preloading device is monitored described bag DMA controller at least one bag is stored to the action of a main storage, and reads in advance not yet read the header data of described at least one bag in described CPU before.And if when described CPU wished to read the header data of described bag in a setting-up time, the header data of so described bag was provided by described packet head preloading device.
Description of drawings
Fig. 1 shows the bag treatment system block diagram of one embodiment of the invention;
Fig. 2 shows the block diagram of the packet head preloading device of one embodiment of the invention;
Fig. 3 shows the block diagram of the packet head preloading device of another embodiment of the present invention; And
Fig. 4 shows the flow chart of the pre-support method of packet head of an again embodiment of the present invention.
Embodiment
Fig. 1 shows the bag treatment system block diagram of one embodiment of the invention.Medium access control (media accesscontrol, MAC) 103 provide the control mode of addressing and medium access, so that the node on distinct device or the network can be at the network communication of multiple spot.After medium access control 103 receives bag, transmit data to main storage 101 via bag direct memory access (DMA) (directmemory access, DMA) controller 102.In embodiments of the present invention, described main storage 101 can be dynamic random access memory, Synchronous Dynamic Random Access Memory or binary channels Synchronous Dynamic Random Access Memory.Read packet head data by main storage 101 to the high speed buffer storage 105 in CPU 106, packet head preloading device 104 is namely finished described bag read work in advance, and stores described packet head data to packet head preloading device 104.
Fig. 2 shows the interior block diagram of packet head preloading device 104.Described packet head preloading device 104 comprises a bag detector 201, positional information formation 202, packet head register 203, timer 204 and data scheduler 205.The described bag DMA controller 102 of bag detector 201 monitorings is stored to bag the action of main storage 101.When described bag detector 201 detects a bag and is stored to the action of main storage 101 by direct memory access (DMA) 102, be about to the described deposit position that wraps in main storage 101 and be stored in addition in the positional information formation 202.The length of positional information formation 202 can be set via the user size of described length.203 in packet head register is downloaded the header data of described bag according to the deposit position that wraps in main storage 101 in the positional information formation 202 in packet head register 203 by data scheduler 205.In embodiments of the present invention, described packet head register 203 can be static RAM.After described bag download was finished, timer 204 was set immediately one and is deposited the time.When CPU 106 will be downloaded the header data of described bag, then directly download from packet head register 203, and need not download from main storage 101.On the other hand, through described setting deposit the time after, if CPU 106 does not read described packet head data yet, remove so in packet head register 203 and the positional information formation 202 all storage data.Wherein a kind of mode that the bag detector 201 of the embodiment of the invention can software be realized, hardware is realized, realize on the platform of embedded single-processor or multiprocessor realizes.
Fig. 3 shows the system block diagram of the packet head preloading device of another embodiment of the present invention.Packet head preloading device 300 comprises ethernet port bag detector 301, positional information formation 302, wireless lan port bag detector 303, positional information formation 304, ethernet port packet head register 305, timer 306, wireless lan port packet head register 307, timer 308 and data scheduler 309.
Ethernet port bag detector 301 and wireless lan port bag detector 303 are monitored respectively the action that ethernet port bag DMA controller 310 and wireless lan port bag DMA controller 311 are stored to bag main storage 101.When ethernet port bag detector 301 detects a bag and is stored to the action of main storage 101 by ethernet port bag DMA controller 310, be about to the described deposit position that wraps in main storage 101 and be stored in the positional information formation 302.305 in ethernet port packet head register is downloaded the header data of described bag according to the deposit position that wraps in main storage 101 in the positional information formation 302 in ethernet port packet head register 305 by data scheduler 309.After described bag download was finished, timer 306 was set immediately one and is deposited the time.When CPU will be downloaded the header data of described bag, then directly download from packet head register 305, and need not download from main storage 101 by data scheduler 309 again.On the other hand, through described setting deposit the time after, if CPU does not read described packet head data yet, remove so in ethernet port packet head register 305 and the positional information formation 302 all storage data.
In the same manner, when wireless lan port bag detector 303 detects a bag and is stored to the action of main storage 101 by wireless lan port bag DMA controller 311, be about to the described deposit position that wraps in main storage 101 and be stored in the positional information formation 304.307 in wireless lan port packet head register is downloaded the header data of described bag according to the deposit position that wraps in main storage 101 in the positional information formation 304 in wireless lan port packet head register 307 by data scheduler 309.After described bag download was finished, timer 308 was set immediately one and is deposited the time.When CPU will be downloaded the header data of described bag, then directly download from wireless lan port packet head register 307, and need not download from main storage 101 by data scheduler 309 again.On the other hand, through described setting deposit the time after, if CPU does not read described packet head data yet, remove so in wireless lan port packet head register 307 and the positional information formation 304 all storage data.In the embodiment of the invention, ethernet port packet head register 305 and wireless lan port packet head register 307 can be static RAM.The length of positional information formation 302 and positional information formation 304 can be set via the user size of described length.Wherein a kind of mode that the ethernet port bag detector 301 of the embodiment of the invention and wireless lan port bag detector 303 can software be realized, hardware is realized, realize on the platform of embedded single-processor or multiprocessor realizes.
In order to make the those skilled in the art instruction by present embodiment implement the present invention, the following above-mentioned packet head preloading device of collocation proposes the embodiment of the pre-support method of a packet head in addition.
Fig. 4 shows the flow chart of the pre-support method of packet head of an again embodiment of the present invention.In step S401, a bag detector keeps monitoring bag access status.In step S402, judge whether by the action of direct memory access storage one bag to a main storage.Continue to keep monitoring if no, get back to so step S401.If have, in step S403, the described deposit position that wraps in main storage is stored in the positional information formation so.In step S404, a packet head register is downloaded the header data of described bag in the packet head register then according to the deposit position that wraps in main storage in the positional information formation by a data scheduler.Download the header data of described bag to described packet head register, namely remove the positional information of wrapping described in the described positional information formation.In step S405, set one and deposit the time.In step S406, judge whether to be read.If so, in step S408, remove so the storage data of described packet head register.If not, in step S407, judge whether so to surpass described depositing the time.If not, getting back to so step S406 judges whether to be read again.If so, in step S409, remove so the data of all storages in described packet head register and the described positional information formation.
In sum, packet head preload method and apparatus of the present invention was downloaded in the packet head register described packet head data to accelerate the processing speed of described packet head data before CPU is carried out download one packet head data in advance.In addition, the present invention incorporates into has setting one to deposit the mechanism of time to promote the robustness of packet head preloading device pack processing of the present invention.
Technology contents of the present invention and technical characterstic disclose as above, yet the those skilled in the art still may be based on teaching of the present invention and announcement and done all replacement and modifications that does not break away from spirit of the present invention.Therefore, protection scope of the present invention should be not limited to embodiment and disclose, and should comprise various do not break away from replacement of the present invention and modifications, and is contained by appending claims.

Claims (15)

1. the device of a packet head preload is characterized in that it comprises:
At least one bag detector is stored at least one bag in order to monitor at least one bag DMA controller the action of main storage;
At least one packet head register;
At least one positional information formation, described positional information formation are coupled in described bag detector and in order to store described at least one position that wraps in described main storage;
And
At least one data scheduler, before downloading the header data of described at least one bag in the CPU execution, according to the position of at least one bag described in the described positional information formation, in advance described at least one packet head register is read and be deposited to the header data of described at least one bag from described main storage;
Wherein, when described bag detector monitors is stored to the action of main storage at least one bag DMA controller with at least one bag, the described position that wraps in main storage is stored in the described positional information formation.
2. device according to claim 1 is characterized in that it comprises timer in addition, and described timer is coupled in described packet head register and is stored in the time of described packet head register in order to the header data of calculating described bag.
3. device according to claim 1 is characterized in that wherein said at least one bag detector comprises ethernet port bag detector and wireless lan port bag detector.
4. device according to claim 1 is characterized in that wherein said at least one packet head register comprises ethernet port packet head register and wireless lan port packet head register.
5. device according to claim 1 is characterized in that wherein said bag DMA controller is ethernet port bag DMA controller or wireless lan port bag DMA controller.
6. device according to claim 1 is characterized in that wherein said packet head register is static RAM.
7. device according to claim 1 is characterized in that wherein said main storage is dynamic random access memory, Synchronous Dynamic Random Access Memory or binary channels Synchronous Dynamic Random Access Memory.
8. device according to claim 1, it is characterized in that wherein said bag detector be with software realize, hardware is realized, realize on the platform of embedded single-processor or multiprocessor.
9. a right to use requires the method for the packet head preload that the device of 1 described packet head preload realizes, it is characterized in that it comprises:
Monitor at least one action of wrapping to main storage of at least one bag DMA controller storage;
Download the header data of described at least one bag to the packet head register; And
If in setting-up time, CPU will read the header data of described at least one bag, and the header data of described at least one bag is provided by described packet head register so;
The method comprises in addition when monitoring at least one action of wrapping to main storage of at least one bag DMA controller storage, and the described position that wraps in described main storage is stored to step in the positional information formation;
Header data to the step in the described packet head register of wherein downloading described bag is according to the positional information of wrapping described in the described positional information formation.
10. method according to claim 9 is characterized in that it is additionally contained in the step that header data of downloading described bag is removed the positional information of wrapping described in the described positional information formation to the described packet head register.
11. method according to claim 9, the length that it is characterized in that wherein said positional information formation are the settings according to the user.
12. method according to claim 9 is characterized in that it comprises the following step in addition:
The header data of the described bag of removing after the header data of described bag is read by described CPU;
Download the header data of next bag to described packet head register.
13. method according to claim 9 is characterized in that it comprises the following step in addition:
If the header data of described bag surpasses when not read by described CPU yet behind the setting-up time, remove so the header data of described bag and all storage data of described positional information formation.
14. method according to claim 9 is characterized in that wherein said storage action is the burst write activity.
15. bag treatment system, it is characterized in that it comprises medium access control, the bag DMA controller, CPU, main storage and packet head preloading device, wherein said packet head preloading device is monitored described bag DMA controller and is stored the action that at least one bag is accessed to main storage, and before not yet reading the header data of described at least one bag, described CPU reads in advance the header data of described at least one bag, if and when described CPU will read the header data of described at least one bag in setting-up time, provided so the header data of described at least one bag by described packet head preloading device;
Wherein said packet head preloading device comprises:
At least one bag detector is stored to described at least one bag in order to the described at least bag DMA controller of monitoring the action of described main storage;
At least one packet head register; And
At least one data scheduler is in order to read and to be deposited at described at least one packet head register with the header data of described at least one bag from described main storage;
Wherein said packet head preloading device comprises the positional information formation in addition, and described positional information formation is coupled in described bag detector and in order to store the described position that wraps in described main storage;
Wherein, when described bag detector monitors is stored to the action of main storage at least one bag DMA controller with at least one bag, the described position that wraps in main storage is stored in the described positional information formation.
CN2009100095015A 2009-02-13 2009-02-13 Method and device for preloading packet header and system using method Expired - Fee Related CN101808029B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100095015A CN101808029B (en) 2009-02-13 2009-02-13 Method and device for preloading packet header and system using method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100095015A CN101808029B (en) 2009-02-13 2009-02-13 Method and device for preloading packet header and system using method

Publications (2)

Publication Number Publication Date
CN101808029A CN101808029A (en) 2010-08-18
CN101808029B true CN101808029B (en) 2013-03-13

Family

ID=42609651

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100095015A Expired - Fee Related CN101808029B (en) 2009-02-13 2009-02-13 Method and device for preloading packet header and system using method

Country Status (1)

Country Link
CN (1) CN101808029B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1595910A (en) * 2004-06-25 2005-03-16 中国科学院计算技术研究所 A data packet receiving interface component of network processor and storage management method thereof
US7075926B2 (en) * 2000-05-24 2006-07-11 Alcatel Internetworking, Inc. (Pe) Programmable packet processor with flow resolution logic
US7333489B1 (en) * 2000-05-08 2008-02-19 Crossroads Systems, Inc. System and method for storing frame header data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7333489B1 (en) * 2000-05-08 2008-02-19 Crossroads Systems, Inc. System and method for storing frame header data
US7075926B2 (en) * 2000-05-24 2006-07-11 Alcatel Internetworking, Inc. (Pe) Programmable packet processor with flow resolution logic
CN1595910A (en) * 2004-06-25 2005-03-16 中国科学院计算技术研究所 A data packet receiving interface component of network processor and storage management method thereof

Also Published As

Publication number Publication date
CN101808029A (en) 2010-08-18

Similar Documents

Publication Publication Date Title
US6070194A (en) Using an index and count mechanism to coordinate access to a shared resource by interactive devices
CN103200128B (en) The methods, devices and systems that a kind of network packet processes
CN103827842B (en) Message is write to controller storage space
CN106161110B (en) Data processing method and system in a kind of network equipment
JP2005322230A5 (en)
CN101841470A (en) High-speed capturing method of bottom-layer data packet based on Linux
CN101707565B (en) Method and device for transmitting and receiving zero-copy network message
CN106598752B (en) Remote zero-copy method
US20130091509A1 (en) Off-loading of processing from a processor blade to storage blades
CN113992473A (en) Communication method, communication device, electronic equipment and storage medium
CN113518044B (en) EPA equipment
US20200304457A1 (en) Method and apparatus for processing data
CN102750245B (en) Message method of reseptance, message receiver module, Apparatus and system
CN101442548A (en) Solid-state hard disk and operation method thereof
Salim When NAPI comes to town
CN115103036A (en) Efficient TCP/IP datagram processing method and system
CN101808029B (en) Method and device for preloading packet header and system using method
CN109547318B (en) VPN data message processing method and device and electronic equipment
CN103888939B (en) Outbound/inbound message management method of Beidou RDSS system user machine and user machine
CN102984166B (en) A kind of IP packet filtering
CN110737609B (en) Data management method, device, equipment and storage medium based on virtual register
CN102495764A (en) Method and device for realizing data distribution
CN111158936A (en) Method and system for queue exchange information
CN103297474A (en) Batching processing sub-packet method and batching processing sub-packet system
CN110427269A (en) Processor and its data transferring method, computer readable storage medium

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
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130313

Termination date: 20140213