CN1165141C - Method for Router Interface Driving Data Forwarding Process - Google Patents
Method for Router Interface Driving Data Forwarding Process Download PDFInfo
- Publication number
- CN1165141C CN1165141C CNB01112525XA CN01112525A CN1165141C CN 1165141 C CN1165141 C CN 1165141C CN B01112525X A CNB01112525X A CN B01112525XA CN 01112525 A CN01112525 A CN 01112525A CN 1165141 C CN1165141 C CN 1165141C
- Authority
- CN
- China
- Prior art keywords
- data
- router
- busy
- interface
- buffer queue
- 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
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明公开了一种路由器接口驱动数据转发过程的控制方法,包括以下步骤:(1)在路由器接口处分别设立存储待处理数据的发送和接收缓冲队列;(2)当有待处理数据需要转发时,判断路由器硬件是否忙;(3)若判断为忙时,则将所述待处理数据存入所述缓冲队列,等路由器硬件转为闲时,由驱动程序将上述缓冲队列中的数据转发,若判断为闲时,通过缓冲队列直接发送所述数据。本发明的方法可使路由器的转发效率提高20%。
The invention discloses a method for controlling the data forwarding process driven by a router interface, which comprises the following steps: (1) respectively setting up sending and receiving buffer queues for storing data to be processed at the router interface; (2) when the data to be processed needs to be forwarded , judging whether the router hardware is busy; (3) if it is judged to be busy, then the data to be processed is stored in the buffer queue, and when the router hardware turns idle, the driver program forwards the data in the above buffer queue, If it is judged to be idle, the data is directly sent through the buffer queue. The method of the invention can increase the forwarding efficiency of the router by 20%.
Description
技术领域technical field
本发明涉及路由器数据转发过程的驱动方法,具体地说,涉及一种提高路由器接口驱动数据发送和接收过程中转发效率的方法。The invention relates to a driving method in the data forwarding process of a router, in particular to a method for improving forwarding efficiency in the process of sending and receiving data driven by a router interface.
背景技术Background technique
路由器作为网络互联过程的重要设备负责相关联的网络之间的数据交换动作,即在相关网络之间实现数据的接收和发送。这当中,路由器对。数据的一般处理过程包括:路由器自一个网络的端口接收该网络传送的数据,具体地说,路由器内作为接口单板的物理层接收并处理所述数据后,被处理的数据作为数据包被送至路由器内的数据链路层;数据链路层处理该数据包,然后将处理后的数据包传送至网络协议层,进行对所述数据包进行路由协议处理,找到该数据包的目的地址,重新将经过如上多级处理的数据包再回送至所述数据链路层;数据链路层重新处理被会送的数据包,并重新处理后再回送至其述物理层,物理层作为网络间的传送接口,将上述处理的数据自其端口发送至另一相关网络,从而实现数据在网络间的传送。As an important device in the network interconnection process, a router is responsible for data exchange between associated networks, that is, to realize data reception and transmission between related networks. Among them, the router is right. The general processing process of data includes: the router receives the data transmitted by the network from the port of the network, specifically, after the physical layer of the interface board in the router receives and processes the data, the processed data is sent as a data packet To the data link layer in the router; the data link layer processes the data packet, then transmits the processed data packet to the network protocol layer, performs routing protocol processing on the data packet, and finds the destination address of the data packet, Re-send the data packet processed by the above multi-levels to the data link layer; the data link layer reprocesses the sent data packet, and reprocesses it and then sends it back to the physical layer. The physical layer acts as an inter-network The transmission interface of the above-mentioned processing data is sent from its port to another related network, so as to realize the transmission of data between networks.
上述过程可如图1所示,图中虚线内的部分表示路由器的接口部分。The above-mentioned process can be shown in FIG. 1 , and the part inside the dotted line in the figure represents the interface part of the router.
从图1可知,路由器接口单板负责数据的发送和接收。接口驱动转发的效率直接关系路由器转发的效率。在一般接口驱动的发送和接收过程中,若遇到硬件忙(例如:一般路由器上普通串口模块),则认为转发失败,终止本次数据包的处理,终止物理过程为:在发送情况下,若遇到硬件忙,则给上层调用函数返回失败,接口发送函数不再做其他处理,终止本次发送。在接收情况下,若遇到硬件忙,则丢弃本次接收数据,接收函数不再做其他处理,终止本次接收。若在发送过程中遇到硬件忙,则由上层软件以后重新发送;若在接收过程中遇到硬件忙,则丢弃本次接收的数据包。例如,一般路由器的普通串口模块一般就是按照上述过程来处理转发过程中的硬件忙的。这种现有技术的处理方法虽然具有简单、可靠等优点,但其明显缺点在于这种路由器接口的转发效率不高。It can be seen from Figure 1 that the router interface board is responsible for sending and receiving data. The efficiency of interface-driven forwarding is directly related to the efficiency of router forwarding. During the sending and receiving process of the general interface driver, if the hardware is busy (for example: a common serial port module on a general router), it is considered that the forwarding fails, and the processing of this data packet is terminated. The physical process of terminating is: in the case of sending, If the hardware is busy, it will return a failure to the upper layer calling function, and the interface sending function will not do other processing, and terminate this sending. In the case of receiving, if the hardware is busy, the data received this time will be discarded, and the receiving function will not do other processing, and this receiving will be terminated. If the hardware is busy during the sending process, the upper layer software will resend it later; if the hardware is busy during the receiving process, the received data packet will be discarded. For example, the ordinary serial port module of a general router generally handles the hardware busy in the forwarding process according to the above process. Although this processing method in the prior art has advantages such as simplicity and reliability, its obvious disadvantage is that the forwarding efficiency of the router interface is not high.
发明内容Contents of the invention
本发明的目的是针对一般处理方法的缺点作出的改进,提供一种控制路由器接口驱动数据转发过程的方法,可提高所示接口转发的效率。The purpose of the present invention is to improve the shortcomings of the general processing method, and provide a method for controlling the data forwarding process driven by the router interface, which can improve the efficiency of the interface forwarding.
为实现上述目的,本发明提出一种路由器接口驱动数据转发过程的方法,包括以下步骤:In order to achieve the above object, the present invention proposes a method for router interface-driven data forwarding process, comprising the following steps:
(1)在路由器接口处分别设立存储待处理数据的发送和接收缓冲队列;(1) Set up the sending and receiving buffer queues for storing the data to be processed respectively at the router interface;
(2)当有待处理数据需要转发时,判断路由器硬件是否忙;(2) When the data to be processed needs to be forwarded, it is judged whether the router hardware is busy;
(3)若判断为忙时,则将所述待处理数据存入所述缓冲队列,等路由器硬件转为闲时,由驱动程序将上述缓冲队列中的数据转发,若判断为闲时,通过缓冲队列直接发送所述数据。(3) If it is judged to be busy, then the data to be processed is stored in the buffer queue, and when the router hardware turns idle, the driver program forwards the data in the above buffer queue, if it is judged to be idle, pass The buffer queue sends the data directly.
其中,具有多个所述接口的模块构成高密度接口模块,所述的发送和接收缓冲队列支持该高密度接口模块。Wherein, a module with multiple interfaces constitutes a high-density interface module, and the sending and receiving buffer queues support the high-density interface module.
采用本发明的路由器接口驱动数据转发过程的方法,可借助接收缓冲队列或发送缓冲队列存储数据,而不使待转发处理的数据被终止或丢弃,从而提高网络间的数据转发效率。与现有技术路由器的数据转发过程相比,采用本发明控制方法的路由器的数据转发效率可提高20%左右。The method for driving the data forwarding process by the router interface of the present invention can store data by means of the receiving buffer queue or the sending buffer queue without causing the data to be forwarded to be terminated or discarded, thereby improving the data forwarding efficiency between networks. Compared with the data forwarding process of routers in the prior art, the data forwarding efficiency of the router adopting the control method of the invention can be increased by about 20%.
附图说明Description of drawings
以下结合附图通过具体实施例进一步详细描述本发明路由器接口驱动转发过程的方法,其中:The method for driving the forwarding process of the router interface of the present invention is further described in detail through specific embodiments below in conjunction with the accompanying drawings, wherein:
图1是现有技术路由器数据接/发送的转发流程图;Fig. 1 is the forwarding flowchart of prior art router data receiving/sending;
图2是说明本发明路由器接口驱动转发过程控制方法一种实施例的转发流程图。Fig. 2 is a forwarding flowchart illustrating an embodiment of a router interface-driven forwarding process control method of the present invention.
具体实施方式Detailed ways
图2是本发明路由器接口驱动转发过程方法的一个实施例的转发流程图,包括以下步骤:Fig. 2 is the forwarding flowchart of an embodiment of the router interface-driven forwarding process method of the present invention, comprising the following steps:
接收缓冲队列处理待转发数据包并维护数据包标志(S1),同时,判断路由器硬件是否“忙”(S2),并且当判断为“忙”时,则将该待转发数据包存入所述接收缓冲队列(S3),而如果判断硬件“不忙”,则启动硬件转发功能(S4),实现由驱动程序使数据经接收缓冲队列送至路由器的物理层,并依次经过路由器中的数据链路层和网络协议层,以及相反路径,经与路由器发送接口相连的发送缓冲队列转发数据,即图2中所示的步骤S5,从而结束转发过程。The receiving buffer queue processes the data packet to be forwarded and maintains the data packet flag (S1). At the same time, it is judged whether the router hardware is "busy" (S2), and when it is judged to be "busy", the data packet to be forwarded is stored in the Receive the buffer queue (S3), and if it is judged that the hardware is "not busy", then start the hardware forwarding function (S4), and realize that the data is sent to the physical layer of the router through the receiving buffer queue by the driver program, and then pass through the data link in the router successively The road layer and the network protocol layer, as well as the reverse path, forward data through the sending buffer queue connected to the sending interface of the router, that is, step S5 shown in FIG. 2 , thus ending the forwarding process.
本实施例中所述的接收缓冲队列和发送收缓冲队列可为“先进先出优先权缓冲队列”。发送和接收缓冲队列为优先权队列。对于高密度接口模块(即一个接口模块上有多个接口),不同接口的优先权可以不一样(比如有些接口连接重要客户)。不同通道的优先权可以由路由器配置管理人员设定。当转发过程中遇到硬件忙时,将对应转发通道的通道号以及该通道的优先权作为一个记录存入队列。当硬件闲时,检查先进先出优先权队列,首先处理优先权级别高的通道;当优先权相同时,按先进先出的原则处理具有相同优先权的各个通道。某个通道处理完毕后,该通道号对应的记录删除。The receiving buffer queue and the sending receiving buffer queue described in this embodiment may be "first in first out priority buffer queues". The send and receive buffer queues are priority queues. For high-density interface modules (that is, there are multiple interfaces on one interface module), the priorities of different interfaces may be different (for example, some interfaces are connected to important customers). The priority of different channels can be set by router configuration managers. When the hardware is busy during the forwarding process, the channel number of the corresponding forwarding channel and the priority of the channel will be stored in the queue as a record. When the hardware is idle, check the first-in-first-out priority queue, and process the channel with higher priority first; when the priority is the same, process each channel with the same priority according to the principle of first-in first-out. After a channel is processed, the record corresponding to the channel number is deleted.
通道硬件是否“忙”的检测是通过读取接口模块上通信控制器相应寄存器状态的方式来实现的。在每次转发前,都必须首先读取对应通信控制器的寄存器状态,若状态为“闲”,则直接启动转发:若状态为“忙”,则按照本专利描述的方法将对应通道存入先进先出优先权队列,等待处理。The detection of whether the channel hardware is "busy" is realized by reading the state of the corresponding register of the communication controller on the interface module. Before each forwarding, the register status of the corresponding communication controller must be read first. If the status is "idle", the forwarding will be started directly; if the status is "busy", the corresponding channel will be stored in the First in first out priority queue, waiting to be processed.
由上可见,本发明的方法与现有技术处理方法的区别在于:现有技术的处理方法是遇到硬件忙时终止本次发送或接收处理,判断为该次发送或接收失败,而本发明的处理方法是遇到硬件“忙”时,并不终止该次发送或接收处理,而是将待发送或待接收处理的数据放入分别设置的队列中,在硬件“闲”时,再由接口驱动软件将数据发送或接收过程处理完毕。As can be seen from the above, the difference between the method of the present invention and the processing method of the prior art is that the processing method of the prior art terminates this sending or receiving process when the hardware is busy, and judges that the sending or receiving fails, while the processing method of the present invention The processing method is that when the hardware is "busy", it does not terminate the sending or receiving processing, but puts the data to be sent or received into the respectively set queue, and when the hardware is "idle", the The interface driver software completes the data sending or receiving process.
考虑到硬件忙只是一个暂时的现象,在发送和接收过程中,若遇到硬件忙,并不等于发送和接收失败。若将待处理的数据放入分别设立的接收缓冲队列和发送缓冲队列,由驱动程序在硬件闲时再转发所述缓冲队列中的数据。以如此的方式可以将转发过程中遇到硬件忙的数据正确地转发,避免了在发送过程中上层软件的重发和在接收过程中的丢弃数据包。Considering that the hardware is busy is only a temporary phenomenon, if the hardware is busy during the sending and receiving process, it does not mean that the sending and receiving failed. If the data to be processed is put into the receiving buffer queue and the sending buffer queue respectively set up, the driver program will forward the data in the buffer queue when the hardware is idle. In this way, the data that encounters hardware busy during the forwarding process can be forwarded correctly, avoiding the retransmission of the upper layer software during the sending process and the discarding of data packets during the receiving process.
Claims (7)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB01112525XA CN1165141C (en) | 2001-03-27 | 2001-03-27 | Method for Router Interface Driving Data Forwarding Process |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB01112525XA CN1165141C (en) | 2001-03-27 | 2001-03-27 | Method for Router Interface Driving Data Forwarding Process |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1377194A CN1377194A (en) | 2002-10-30 |
| CN1165141C true CN1165141C (en) | 2004-09-01 |
Family
ID=4659307
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB01112525XA Expired - Fee Related CN1165141C (en) | 2001-03-27 | 2001-03-27 | Method for Router Interface Driving Data Forwarding Process |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN1165141C (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100343812C (en) * | 2005-03-25 | 2007-10-17 | 上海高智软件系统有限公司 | Method for raising processing speed of interface system of attaching position register |
Families Citing this family (24)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6760772B2 (en) | 2000-12-15 | 2004-07-06 | Qualcomm, Inc. | Generating and implementing a communication protocol and interface for high data rate signal transfer |
| US8812706B1 (en) | 2001-09-06 | 2014-08-19 | Qualcomm Incorporated | Method and apparatus for compensating for mismatched delays in signals of a mobile display interface (MDDI) system |
| DE602004030236D1 (en) | 2003-06-02 | 2011-01-05 | Qualcomm Inc | GENERATE AND IMPLEMENT A SIGNAL PROTOCOL AND INTERFACE FOR HIGHER DATA RATES |
| EP2363991A1 (en) | 2003-08-13 | 2011-09-07 | Qualcomm Incorporated | A signal interface for higher data rates |
| KR100973103B1 (en) | 2003-09-10 | 2010-08-02 | 콸콤 인코포레이티드 | High-speed data interface |
| CN102801615A (en) | 2003-10-15 | 2012-11-28 | 高通股份有限公司 | High data rate interface |
| CN101827074B (en) | 2003-10-29 | 2013-07-31 | 高通股份有限公司 | High data rate interface |
| CN101729205A (en) | 2003-11-12 | 2010-06-09 | 高通股份有限公司 | High data rate interface with improved link control |
| CA2546971A1 (en) | 2003-11-25 | 2005-06-09 | Qualcomm Incorporated | High data rate interface with improved link synchronization |
| CA2731265A1 (en) | 2003-12-08 | 2005-06-23 | Qualcomm Incorporated | High data rate interface with improved link synchronization |
| CA2775734C (en) | 2004-03-10 | 2014-01-07 | Qualcomm Incorporated | High data rate interface apparatus and method |
| US8705521B2 (en) | 2004-03-17 | 2014-04-22 | Qualcomm Incorporated | High data rate interface apparatus and method |
| MXPA06010873A (en) | 2004-03-24 | 2007-04-02 | Qualcomm Inc | High data rate interface apparatus and method. |
| JP4664360B2 (en) | 2004-06-04 | 2011-04-06 | クゥアルコム・インコーポレイテッド | High speed data rate interface apparatus and method |
| US8650304B2 (en) | 2004-06-04 | 2014-02-11 | Qualcomm Incorporated | Determining a pre skew and post skew calibration data rate in a mobile display digital interface (MDDI) communication system |
| US8692838B2 (en) | 2004-11-24 | 2014-04-08 | Qualcomm Incorporated | Methods and systems for updating a buffer |
| US8539119B2 (en) | 2004-11-24 | 2013-09-17 | Qualcomm Incorporated | Methods and apparatus for exchanging messages having a digital data interface device message format |
| US8873584B2 (en) | 2004-11-24 | 2014-10-28 | Qualcomm Incorporated | Digital data interface device |
| US8667363B2 (en) | 2004-11-24 | 2014-03-04 | Qualcomm Incorporated | Systems and methods for implementing cyclic redundancy checks |
| US8723705B2 (en) | 2004-11-24 | 2014-05-13 | Qualcomm Incorporated | Low output skew double data rate serial encoder |
| US8699330B2 (en) | 2004-11-24 | 2014-04-15 | Qualcomm Incorporated | Systems and methods for digital data transmission rate control |
| CN1960324B (en) * | 2005-11-02 | 2010-07-21 | 盛科网络(苏州)有限公司 | Network switch and method for completing tunnel encapsulation and decapsulation processing with loop |
| US8730069B2 (en) | 2005-11-23 | 2014-05-20 | Qualcomm Incorporated | Double data rate serial encoder |
| US8692839B2 (en) | 2005-11-23 | 2014-04-08 | Qualcomm Incorporated | Methods and systems for updating a buffer |
-
2001
- 2001-03-27 CN CNB01112525XA patent/CN1165141C/en not_active Expired - Fee Related
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100343812C (en) * | 2005-03-25 | 2007-10-17 | 上海高智软件系统有限公司 | Method for raising processing speed of interface system of attaching position register |
Also Published As
| Publication number | Publication date |
|---|---|
| CN1377194A (en) | 2002-10-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN1165141C (en) | Method for Router Interface Driving Data Forwarding Process | |
| US20240106736A1 (en) | System and method for facilitating efficient packet forwarding using a message state table in a network interface controller (nic) | |
| US6577596B1 (en) | Method and apparatus for packet delay reduction using scheduling and header compression | |
| US7221647B2 (en) | Packet communication apparatus and controlling method thereof | |
| US20250133026A1 (en) | Remote Direct Memory Access (RDMA) over Converged Ethernet with congestion reduction for Prevention of Loss of Data | |
| CN1443413A (en) | Switching system | |
| CN1093210A (en) | Information Flow Control System of Packet Switch | |
| CN1099788C (en) | LAN switch architecture | |
| CN104243346A (en) | Flow control with reduced buffer usage for network devices | |
| CN1267419A (en) | Flow control in telecommunications network | |
| CN1742469A (en) | Methods and devices for transmitting data between storage area networks | |
| US8751881B1 (en) | Transmission buffer under-run protection | |
| US8331232B2 (en) | Method and apparatus for improving data transmission in router fabric cards through pseudo-synchronous data switching | |
| JPH0766838A (en) | Congestion control frame relay device | |
| CN120729810B (en) | Data transmission system, method and switch for improving PCIe retransmission efficiency | |
| US20060087964A1 (en) | Method and apparatus for switching among different network paths while suppressing ghost packets | |
| JP2001223707A (en) | Crosspoint switch control device | |
| CN1222803A (en) | Information flow control system and method for packet switch |
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 | ||
| C17 | Cessation of patent right | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20040901 Termination date: 20110327 |