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 PDFInfo
- 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
- packet
- header
- main memory
- data
- location 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 29
- 230000015654 memory Effects 0.000 claims abstract description 58
- 238000012545 processing Methods 0.000 claims abstract description 35
- 230000009471 action Effects 0.000 claims description 7
- 238000012544 monitoring process Methods 0.000 claims description 7
- 230000001360 synchronised effect Effects 0.000 claims description 4
- 230000003068 static effect Effects 0.000 claims description 3
- 230000036316 preload Effects 0.000 claims description 2
- 230000005540 biological transmission Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 6
- 230000001934 delay Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000003111 delayed effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000002592 echocardiography Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Description
技术领域 technical field
本发明涉及一种包处理,特别涉及一种包报头预载的方法与装置。The invention relates to packet processing, in particular to a method and device for packet header preloading.
背景技术 Background technique
因特网日益普及,各种不同的应用也随之迅速发展,而许多团队也相继投入于提升因特网的数据传输性能的研究。在不同的使用场合中,数据传输时所允许使用的包长度不尽相同,且包含多种包数据运算处理程序,如检查、拆解、组合、搜索、内容比对、转递等程序。随着家用网络、校园网络和企业网络等网络应用的带宽需求急剧上升和大量的包数据传输,包的传输性能以及包的运算处理技术发展也日益受到重视。With the increasing popularity of the Internet, various applications have also developed rapidly, and many teams have also invested in the research of improving the data transmission performance of the Internet. In different usage occasions, the length of packets allowed for data transmission is not the same, and it contains a variety of packet data processing procedures, such as inspection, disassembly, combination, search, content comparison, forwarding and other procedures. With the sharp increase in the bandwidth requirements of network applications such as home networks, campus networks, and enterprise networks and the transmission of a large amount of packet data, the transmission performance of packets and the development of packet computing and processing technologies have also received increasing attention.
在网络包数据应用中,为确保其服务质量,因而对包传输有一些相关的要求。例如,在网络语音服务的应用中,包迟延会造成回音与颤音。当包迟延时,人耳就可以分辨出有回音出现。好的网络传输环境与包数据处理性能需确保包迟延低于150毫秒。人耳能接受的声音迟延大约是150毫秒到400毫秒。超过400毫秒的迟延会造成声音质量恶劣而无法接听。因此,除了加强网络传输质量外,各类型包的传送时机也需加以适当管理。例如,依缓急程度标示所述包的处理优先顺序,使随后的网络设备能够依其服务特性的需求而加以处理。In network packet data applications, in order to ensure its service quality, there are some related requirements for packet transmission. For example, in VoIP applications, packet delays can cause echoes and vibrato. When the packet is delayed, the human ear can tell that there is an echo. A good network transmission environment and packet data processing performance must ensure that the packet delay is less than 150 milliseconds. The sound delay acceptable to the human ear is about 150 milliseconds to 400 milliseconds. Delays of more than 400 milliseconds can result in poor sound quality that cannot be answered. Therefore, in addition to enhancing the quality of network transmission, the transmission timing of various types of packets also needs to be properly managed. For example, the processing priority of the packets is marked according to the urgency, so that subsequent network devices can process them according to the requirements of their service characteristics.
随着网络传输速度不断提高且需要同时处理语音传输以及多媒体传输的包信息,为提升处理的性能,多种技术和方法被提出。例如,系统芯片设计厂商致力于提高中央处理单元的运算时钟、加大高速缓冲存储器空间或在系统中使用专门处理包数据的运算处理器。然而,上述的方式也随之提高了成本和功率损耗。因此产业界需要一种以低成本的方式而能提高包传输速度的方法。With the continuous improvement of network transmission speed and the need to process packet information of voice transmission and multimedia transmission at the same time, in order to improve the performance of processing, various technologies and methods have been proposed. For example, SoC designers are working to increase the operating clock of the central processing unit, increase the cache memory space, or use an arithmetic processor specialized in processing packet data in the system. However, the above method also increases the cost and power consumption. Therefore, the industry needs a method that can increase the packet transmission speed in a low-cost manner.
发明内容 Contents of the invention
本发明的包报头预载方法与装置在中央处理单元执行下载一包报头数据之前,预先将所述包报头数据下载至一包报头寄存器中以加速所述包报头数据的处理速度。The packet header preloading method and device of the present invention download the packet header data into a packet header register in advance before the central processing unit executes downloading of the packet header data, so as to accelerate the processing speed of the packet header data.
本发明的一实施例揭示一种包报头预载装置,所述包报头预载装置包含至少一包检测器、至少一包报头寄存器和至少一数据调度器。所述至少一包检测器用以监测至少一包直接存储器存取控制器将至少一包存储至一主存储器的动作。所述至少一数据调度器用以将所述至少一包的报头数据从所述主存储器读出且寄存于所述至少一包报头寄存器。An embodiment of the present invention discloses a packet header preloading device, the packet header preloading device includes at least one packet detector, at least one packet header register and at least one data scheduler. The at least one packet detector is used for monitoring the action of the at least one packet direct memory access controller storing at least one packet into a main memory. The at least one data scheduler is used for reading the header data of the at least one packet from the main memory and storing it in the at least one packet header register.
本发明的另一实施例揭示一种包报头预载方法。所述方法包含下列步骤:监测至少一包直接存储器存取控制器将至少一包存储至一主存储器的动作;下载所述至少一包的报头数据至一包报头寄存器中;以及如果在一设定时间内,一中央处理单元希望读取所述至少一包的报头数据,那么由所述包报头寄存器提供所述至少一包的报头数据。Another embodiment of the present invention discloses a packet header preloading method. The method comprises the steps of: monitoring at least one packet of direct memory access controller for storing at least one packet into a main memory; downloading header data of said at least one packet into a packet header register; and if in a device If within a certain period of time, a central processing unit wishes to read the header data of the at least one packet, then the packet header register provides the header data of the at least one packet.
本发明的一实施例揭示一种系统,其包含一媒体存取控制、一包直接存储器存取控制器、一中央处理单元、一主存储器以及一包报头预载装置。所述包报头预载装置监测所述包直接存储器存取控制器将至少一包存储至一主存储器的动作,并在所述中央处理单元尚未读取所述至少一包的报头数据之前预先读取。且如果在一设定时间内所述中央处理单元希望读取所述包的报头数据时,那么所述包的报头数据由所述包报头预载装置提供。An embodiment of the present invention discloses a system comprising a MAC, a packet DMA controller, a central processing unit, a main memory, and a packet header preloader. The packet header preloading device monitors the action of the packet direct memory access controller storing at least one packet into a main memory, and reads in advance before the central processing unit has read the header data of the at least one packet Pick. And if the central processing unit wishes to read the header data of the packet within a set time, the header data of the packet is provided by the packet header preloading device.
附图说明 Description of drawings
图1展示本发明的一实施例的包处理系统方框图;FIG. 1 shows a block diagram of a packet processing system according to an embodiment of the present invention;
图2展示本发明的一实施例的包报头预载装置的方框图;FIG. 2 shows a block diagram of a packet header preloading device according to an embodiment of the present invention;
图3展示本发明的另一实施例的包报头预载装置的方框图;以及Fig. 3 shows the block diagram of the packet header preloading device of another embodiment of the present invention; And
图4展示本发明的再一实施例的包报头预载方法的流程图。FIG. 4 shows a flowchart of a packet header preloading method according to yet another embodiment of the present invention.
具体实施方式 Detailed ways
图1展示本发明的一实施例的包处理系统方框图。媒体存取控制(media accesscontrol,MAC)103提供定址及媒体存取的控制方式,使得不同设备或网络上的节点可以在多点的网络上通信。当媒体存取控制103接收到包后,经由包直接存储器存取(directmemory access,DMA)控制器102传送数据至主存储器101。在本发明实施例中,所述主存储器101可为动态随机存取存储器、同步动态随机存取存储器或双通道同步动态随机存取存储器。在中央处理单元106由主存储器101读取一包报头数据至高速缓冲存储器105之前,包报头预载装置104即预先完成所述包读取工作,并存储所述包报头数据至包报头预载装置104中。FIG. 1 shows a block diagram of a packet processing system according to an embodiment of the present invention. Media access control (media access control, MAC) 103 provides addressing and media access control methods, so that different devices or nodes on the network can communicate on a multi-point network. When the MAC 103 receives the packet, it transmits the data to the
图2展示包报头预载装置104的内部方框图。所述包报头预载装置104包含一包检测器201、位置信息队列202、包报头寄存器203、计时器204以及数据调度器205。包检测器201监测所述包直接存储器存取控制器102将包存储至主存储器101的动作。当所述包检测器201检测到一包由直接存储器存取102存储至主存储器101的动作时,即将所述包在主存储器101的存放位置另外存储于位置信息队列202中。位置信息队列202的长度可经由用户设定所述长度的大小。包报头寄存器203则根据位置信息队列202中的包在主存储器101的存放位置,通过数据调度器205下载所述包的报头数据于包报头寄存器203中。在本发明实施例中,所述包报头寄存器203可为静态随机存取存储器。当所述包下载完成后,计时器204随即设定一寄存时间。当中央处理单元106要下载所述包的报头数据时则直接从包报头寄存器203下载,而无须从主存储器101下载。另一方面,经过所述设定的寄存时间后,如果中央处理单元106仍未读取所述包报头数据,那么清除包报头寄存器203和位置信息队列202中所有存储数据。本发明实施例的包检测器201可以软件实现、硬件实现、内嵌单一处理器或多处理器的平台上实现的其中一种方式来实现。FIG. 2 shows an internal block diagram of the packet
图3展示本发明的另一实施例的包报头预载装置的系统方框图。包报头预载装置300包含以太网端口包检测器301、位置信息队列302、无线局域网端口包检测器303、位置信息队列304、以太网端口包报头寄存器305、计时器306、无线局域网端口包报头寄存器307、计时器308以及数据调度器309。FIG. 3 shows a system block diagram of a packet header preloading device according to another embodiment of the present invention. The packet header preloading device 300 includes an Ethernet port packet detector 301, a location information queue 302, a wireless LAN port packet detector 303, a location information queue 304, an Ethernet port packet header register 305, a timer 306, and a wireless LAN port packet header Register 307 , Timer 308 and Data Scheduler 309 .
以太网端口包检测器301和无线局域网端口包检测器303分别监测以太网端口包直接存储器存取控制器310和无线局域网端口包直接存储器存取控制器311将包存储至主存储器101的动作。当以太网端口包检测器301检测到一包由以太网端口包直接存储器存取控制器310存储至主存储器101的动作时,即将所述包在主存储器101的存放位置存储于位置信息队列302中。以太网端口包报头寄存器305则根据位置信息队列302中的包在主存储器101的存放位置,通过数据调度器309下载所述包的报头数据于以太网端口包报头寄存器305中。当所述包下载完成后,计时器306随即设定一寄存时间。当中央处理单元要下载所述包的报头数据时则直接从包报头寄存器305下载,而无须再通过数据调度器309从主存储器101下载。另一方面,经过所述设定的寄存时间后,如果中央处理单元仍未读取所述包报头数据,那么清除以太网端口包报头寄存器305和位置信息队列302中所有存储数据。The Ethernet port packet detector 301 and the WLAN port packet detector 303 respectively monitor the actions of the Ethernet port packet DMA controller 310 and the WLAN port packet DMA controller 311 storing packets in the
相同地,当无线局域网端口包检测器303检测到一包由无线局域网端口包直接存储器存取控制器311存储至主存储器101的动作时,即将所述包在主存储器101的存放位置存储于位置信息队列304中。无线局域网端口包报头寄存器307则根据位置信息队列304中的包在主存储器101的存放位置,通过数据调度器309下载所述包的报头数据于无线局域网端口包报头寄存器307中。当所述包下载完成后,计时器308随即设定一寄存时间。当中央处理单元要下载所述包的报头数据时则直接从无线局域网端口包报头寄存器307下载,而无须再通过数据调度器309从主存储器101下载。另一方面,经过所述设定的寄存时间后,如果中央处理单元仍未读取所述包报头数据,那么清除无线局域网端口包报头寄存器307和位置信息队列304中所有存储数据。本发明实施例中,以太网端口包报头寄存器305和无线局域网端口包报头寄存器307可为静态随机存取存储器。位置信息队列302和位置信息队列304的长度可经由用户设定所述长度的大小。本发明实施例的以太网端口包检测器301和无线局域网端口包检测器303可以软件实现、硬件实现、内嵌单一处理器或多处理器的平台上实现的其中一种方式来实现。Similarly, when the WLAN port packet detector 303 detects that a packet is stored into the
为了使所属领域的技术人员可以通过本实施例的教导实施本发明,以下搭配上述包报头预载装置,另外提出一包报头预载方法的实施例。In order to enable those skilled in the art to implement the present invention through the teaching of this embodiment, an embodiment of a method for preloading a packet header is provided below in combination with the above-mentioned packet header preloading device.
图4展示本发明的再一实施例的包报头预载方法的流程图。在步骤S401中,一包检测器保持监测包存取状态。在步骤S402中,判断是否有由一直接存储器存取存储一包至一主存储器的动作。如果没有,那么回到步骤S401继续保持监测。如果有,那么在步骤S403中将所述包在主存储器的存放位置存储于一位置信息队列中。在步骤S404中,一包报头寄存器则根据位置信息队列中的包在主存储器的存放位置,通过一数据调度器下载所述包的报头数据于包报头寄存器中。下载所述包的报头数据至所述包报头寄存器后,即清除所述位置信息队列中所述包的位置信息。在步骤S405中,设定一寄存时间。在步骤S406中,判断是否已被读取。如果是,那么在步骤S408中清除所述包报头寄存器的存储数据。如果否,那么在步骤S407中判断是否已经超过所述寄存时间。如果否,那么回到步骤S406再次判断是否已被读取。如果是,那么在步骤S409中清除所述包报头寄存器和所述位置信息队列中所有存储的数据。FIG. 4 shows a flowchart of a packet header preloading method according to yet another embodiment of the present invention. In step S401, a packet detector keeps monitoring packet access status. In step S402, it is determined whether there is an action of storing a packet to a main memory by a direct memory access. If not, return to step S401 to continue monitoring. If yes, then in step S403, the storage location of the package in the main memory is stored in a location information queue. In step S404, a packet header register downloads the header data of the packet into the packet header register through a data scheduler according to the storage location of the packet in the location information queue in the main memory. After downloading the header data of the packet to the packet header register, the location information of the packet in the location information queue is cleared. In step S405, a registration time is set. In step S406, it is judged whether it has been read. If yes, clear the data stored in the packet header register in step S408. If not, it is judged in step S407 whether the registration time has expired. If not, go back to step S406 to judge whether it has been read again. If yes, clear all stored data in the packet header register and the location information queue in step S409.
综上所述,本发明的包报头预载方法与装置在中央处理单元执行下载一包报头数据之前,预先将所述包报头数据下载至一包报头寄存器中以加速所述包报头数据的处理速度。此外,本发明并入有设定一寄存时间的机制以提升本发明的包报头预载装置处理包的稳健性。In summary, the packet header preloading method and device of the present invention download the packet header data into a packet header register in advance before the central processing unit executes downloading of a packet header data to speed up the processing of the packet header data speed. In addition, the present invention incorporates a mechanism for setting a registration time to improve the robustness of the packet header preloading device of the present invention in processing packets.
本发明的技术内容和技术特点已揭示如上,然而所属领域的技术人员仍可能基于本发明的教示和揭示而作种种不脱离本发明精神的替换和修饰。因此,本发明的保护范围应不限于实施例所揭示,而应包括各种不脱离本发明的替换和修饰,并由所附的权利要求书所涵盖。The technical content and technical features of the present invention have been disclosed above, but those skilled in the art may still make various replacements and modifications based on the teaching and disclosure of the present invention without departing from the spirit of the present invention. Therefore, the protection scope of the present invention should not be limited to the disclosed embodiments, but should include various replacements and modifications that do not depart from the present invention, and be covered by the appended claims.
Claims (15)
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)
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 |
-
2009
- 2009-02-13 CN CN2009100095015A patent/CN101808029B/en not_active Expired - Fee Related
Patent Citations (3)
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 |
---|---|---|
US7526593B2 (en) | Packet combiner for a packetized bus with dynamic holdoff time | |
US20050172091A1 (en) | Method and an apparatus for interleaving read data return in a packetized interconnect to memory | |
Salim | When NAPI comes to town | |
CN102323888B (en) | Diskless computer startup accelerating method | |
CN102395958A (en) | Concurrent processing method and device for data packet | |
US7761587B2 (en) | Apparatus and method for transmitting packet IP offload | |
TW200832142A (en) | A method for time-stamping messages | |
Wu et al. | Design and implementation of tcp/ip offload engine system over gigabit ethernet | |
CN115334156A (en) | Message processing method, device, equipment and storage medium | |
CN118555162B (en) | Method and device for accelerating network communication | |
CN1855880A (en) | Data read/write device and method | |
CN101808029B (en) | Method and device for preloading packet header and system using method | |
CN107273100B (en) | A real-time data processing and storage device | |
TWI465075B (en) | Apparatus for processing packets and system for using the same | |
CN102984166B (en) | A kind of IP packet filtering | |
CN105207846B (en) | A kind of statistical method of TCP protocol stack delay, apparatus and system | |
CN112702418A (en) | Double-cache data downloading control method and device and vehicle | |
US20060271714A1 (en) | Data retrieving methods | |
CN105264608A (en) | Data storage method, memory controller and central processing unit | |
JP2010004262A (en) | Information reception device and information reception method | |
Tsao et al. | Performance evaluation of inter-processor communication for an embedded heterogeneous multi-core processor | |
US7480739B1 (en) | Segregated caching of linked lists for USB | |
JP2005234794A (en) | File system controller | |
JP2020088517A (en) | Communication apparatus, and control method and program of communication apparatus | |
TWI378688B (en) | Method and apparatus for preloading packet headers and system using the same |
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 |