[go: up one dir, main page]

CN1215679C - Method for controlling flow of data transmisison - Google Patents

Method for controlling flow of data transmisison Download PDF

Info

Publication number
CN1215679C
CN1215679C CNB031095585A CN03109558A CN1215679C CN 1215679 C CN1215679 C CN 1215679C CN B031095585 A CNB031095585 A CN B031095585A CN 03109558 A CN03109558 A CN 03109558A CN 1215679 C CN1215679 C CN 1215679C
Authority
CN
China
Prior art keywords
data
flow
random access
current limiting
data packets
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
CNB031095585A
Other languages
Chinese (zh)
Other versions
CN1449156A (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
Harbour Networks Holdings 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 Harbour Networks Holdings Ltd filed Critical Harbour Networks Holdings Ltd
Priority to CNB031095585A priority Critical patent/CN1215679C/en
Publication of CN1449156A publication Critical patent/CN1449156A/en
Application granted granted Critical
Publication of CN1215679C publication Critical patent/CN1215679C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention relates to a method for controlling the flow of data transmission, wherein data packets are sent to FIFO or RAM processed by downstream receiving equipment to be slowly stored by upstream transmission equipment; the input transmission rate is controlled on an interface of FIFO/RAM; the input end is provided with a time scale; the flow of statistic data is calculated according to the time scale. When the flow of the data reaches or exceeds the preset flow limit rate, the redundant data packets are discarded. Meanwhile, the output transmission rate is controlled by FIFO/RAM so as to conform to the requirements of the downstream receiving equipment. The flow control is realized, the resources of slow storage are simultaneously saved, and thereby, the design cost is reduced. The present invention can be widely applied to the fields of data transmission and communication.

Description

数据传输的流量控制方法Flow Control Method for Data Transmission

技术领域:Technical field:

本发明涉及一种在流量控制的方法,更具体来说,涉及一种在可编程逻辑设计中的流量控制方法。The present invention relates to a flow control method, more specifically, to a flow control method in programmable logic design.

背景技术:Background technique:

目前,一种比较常用的流量控制技术是一种类似于存储转发形式的流控技术如图1所示,也就是说先将不确定速率的数据包由入口输入到已定大小的先进先出存储器(FIFO)中,再根据用户的处理能力由FIFO的出口以设定好的固定速率传输到下行的设备中。在这种设计中FIFO应作到尽可能的大,用以减少突发时数据包的丢失。当输入数据包的数量由于突发超过了FIFO的容纳程度时,多余的数据包将会被丢弃掉。故此FIFO的容纳程度就直接影响到了数据包传输的可靠性能。At present, a commonly used flow control technology is a flow control technology similar to the store-and-forward form shown in Figure 1, that is to say, the data packets with an uncertain rate are input from the ingress to the FIFO with a predetermined size. In the memory (FIFO), according to the processing capability of the user, the output of the FIFO is transmitted to the downstream device at a set fixed rate. In this design, FIFO should be made as large as possible to reduce the loss of data packets during bursts. When the number of incoming data packets exceeds the capacity of the FIFO due to a burst, the excess data packets will be discarded. Therefore, the capacity of the FIFO directly affects the reliability of data packet transmission.

本领域的普通技术人员都知道FIFO的大小从另一个方面也直接影响到了资源的利用率。FIFO越大,其资源的消耗也越大。从节约资源的角度考虑,FIFO越小越好;而从传输数据报文的可靠性角度考虑,FIFO则是越大越好。这两方面的矛盾使得流量控制中的FIFO的设计和使用难于把握和控制。而实际上,数据传送过程中的下行设备往往自身都具有缓存的功能,可以直接被加以利用。基于这个现状,本发明考虑取消数据传输过程中的FIFO,而利用下行设备自身的存储功能。这样的做法在满足了实现流量控制的前提下,又可以在最大程度上实现节省资源的目的。Those of ordinary skill in the art know that the size of the FIFO directly affects resource utilization from another aspect. The larger the FIFO, the greater its resource consumption. From the perspective of saving resources, the smaller the FIFO, the better; and from the perspective of reliability of transmitting data packets, the larger the FIFO, the better. The contradiction between these two aspects makes the design and use of FIFO in flow control difficult to grasp and control. In fact, the downlink device in the process of data transmission often has a cache function, which can be directly used. Based on this current situation, the present invention considers canceling the FIFO in the process of data transmission, and utilizing the storage function of the downlink device itself. Such an approach can achieve the purpose of saving resources to the greatest extent on the premise of satisfying the realization of flow control.

发明内容:Invention content:

为了克服现在常用的流量控制方法耗费资源较多的不足,本发明提供了一种流量控制方法,该方法在绝大多数情况下(最好是下行处理设备自身带有一定规模的缓存性能),采用时标统计的流控方法。实施该方法不仅能较好的实现流量控制的目的,而且可以节省大量用于缓存的存储资源,从而达到了降低设计成本的效果。In order to overcome the deficiency that the commonly used flow control method consumes more resources, the present invention provides a flow control method. In most cases (preferably, the downlink processing device itself has a cache performance of a certain scale), A flow control method using time-scale statistics. Implementing this method can not only better achieve the purpose of flow control, but also save a large amount of storage resources used for caching, thereby achieving the effect of reducing design costs.

本流量控制方法易于实施和操作,只需在一个接口上对输入或输出的传输率进行控制。当数据流量达到或超过某个预先设定的限流率时,多余的数据包将被丢弃,其中限流率可以根据传输中总的数据包通讯量设定。限流机制是可以串行控制的,数据包可以被连续的执行不同的限流率,在一个接口上可以构造超过20种不同的限流率。本方法适用范围广泛,可以运用在网络交换机上,也可以用在网络服务器上进行流量控制,还可以用在输入输出的接口以及路由器的接口上。The flow control method is easy to implement and operate, and only needs to control the input or output transmission rate on one interface. When the data flow reaches or exceeds a certain preset flow rate, redundant data packets will be discarded, wherein the flow limit rate can be set according to the total data packet traffic in transmission. The current limiting mechanism can be controlled serially, data packets can be continuously executed with different current limiting rates, and more than 20 different current limiting rates can be constructed on one interface. The method has a wide range of applications, and can be used on a network switch, can also be used on a network server for flow control, and can also be used on input and output interfaces and router interfaces.

为了达到上述目的,设计了一种数据传输的流量控制方法,所述方法包括如下步骤:In order to achieve the above object, a flow control method for data transmission is designed, the method includes the following steps:

上行数据传输设备将数据包发送到一FIFO或随机存储器(RAM)中缓存;The uplink data transmission device sends the data packet to a FIFO or random access memory (RAM) for buffering;

所述FIFO/RAM在一个接口上控制输入的传输率,当数据流量达到或超过某个预先设定的限流率时,多余的数据包将会被丢弃;The FIFO/RAM controls the input transmission rate on an interface, and when the data flow reaches or exceeds a certain preset current limiting rate, redundant data packets will be discarded;

同时,所述FIFO/RAM控制其输出传输率,以符合下行接收设备的需要;At the same time, the FIFO/RAM controls its output transmission rate to meet the needs of the downlink receiving device;

其中,所述FIFO/RAM中设有一时间标尺,参照该标尺统计数据流量,当数据流量大于某个预先设定的数值时,在此时间段后进入的数据包将会被丢弃,通过所述统计、丢弃的方法以实现流量控制。Wherein, a time scale is set in the FIFO/RAM, and the data flow is counted with reference to the scale. When the data flow is greater than a certain preset value, the data packets entering after this time period will be discarded. Through the Statistical and discarding methods to achieve flow control.

所述FIFO/RAM是下行接收设备自身具备的FIFO/RAM,而并非额外的硬件资源。The FIFO/RAM is the FIFO/RAM of the downlink receiving device itself, rather than additional hardware resources.

考虑到在系统中大部分设备自身带有缓冲存储器,所以本发明在实现流控时,首先设计一个时间标尺,该标尺长度可以根据下行设备的缓存能力来确定,参照所述标尺统计数据流量。当然,这种流量统计可以根据数据类型进行分类统计,这样就可以实现分类流控。数据流量大于预先设定的数值也包括多种情况,一是数据包数大于预先设定的数值,另一种是数据包的有效字节数大于预先设定的字节数。在此时间段后进入的数据包将会被丢弃掉。Considering that most of the devices in the system have their own buffer memories, the present invention first designs a time scale when implementing flow control. The length of the scale can be determined according to the buffer capacity of the downlink device, and the data flow is counted with reference to the scale. Of course, this kind of traffic statistics can be classified and counted according to the data type, so that classified traffic control can be realized. The fact that the data flow rate is greater than the preset value also includes many situations. One is that the number of data packets is greater than the preset value, and the other is that the effective number of bytes of the data packet is greater than the preset number of bytes. Incoming packets after this time period will be dropped.

实施本发明,在通过时标统计的方法实现了流量控制的同时,节省了用于缓存的资源,从而降低了设计成本。The implementation of the present invention realizes flow control through the method of time scale statistics and saves resources for buffering, thereby reducing design cost.

附图说明:Description of drawings:

图1是现有技术中采用FIFO控制流量方法的示意图。FIG. 1 is a schematic diagram of a flow control method using FIFO in the prior art.

图2是采用本发明所述方法的时标数据包限流的图示。Fig. 2 is an illustration of time-stamped data packet current limiting using the method of the present invention.

图3是采用本发明所述方法的时标数据字节数限流的图示。Fig. 3 is an illustration of time-stamped data byte count current limiting using the method of the present invention.

具体实施方式:Detailed ways:

通过下面的详细描述和相应的本发明实施例的附图,将更加全面充分地理解本发明。当然,附图不应该被用来将本发明限定在特定的实例中,它只是起到解释和帮助理解的作用。A more complete understanding of the present invention will be obtained from the following detailed description and accompanying drawings of embodiments of the present invention. Of course, the accompanying drawings should not be used to limit the present invention to specific examples, but are only used to explain and help understanding.

在图2、3中T为时标长度,这个参数可以根据下行设备的缓存、处理能力进行任意设置。如果下行设备的吞吐能力比较强,则可以将T值设置的稍微大一些,否则设置的需要稍小一些。1、2、3、4、5为设备输入的数据包标志,1代表第一个数据包,2代表第二个数据包,3代表第三个数据包,由此依次类推,n1、n2、n3、n4、n5...为每个数据包的有效字节长度。In Figures 2 and 3, T is the time scale length, and this parameter can be set arbitrarily according to the cache and processing capabilities of the downlink device. If the throughput capability of the downlink device is relatively strong, you can set the value of T slightly larger, otherwise it needs to be set slightly smaller. 1, 2, 3, 4, 5 are the data packet signs input by the device, 1 represents the first data packet, 2 represents the second data packet, 3 represents the third data packet, and so on, n1, n2, n3, n4, n5... are the effective byte length of each data packet.

本发明是由FPGA(Field Programable Gate Array现场可编程门阵列)逻辑来实现的。可以根据需要,对数据包进行分类处理,即对不同类型的数据报文采用不同的优先级,分别进行统计、分析、处理。对其中的每一类数据报文,可以分别采用下面的一种方法来处理。The present invention is realized by FPGA (Field Programable Gate Array Field Programmable Gate Array) logic. Data packets can be classified and processed according to needs, that is, different types of data packets are assigned different priorities, and statistics, analysis, and processing are performed separately. For each type of data message, one of the following methods can be used to process it.

在图2中,当时间标尺计数器为零时,对输入数据和输出数据统计计数器进行清零,同时开始新的统计。因为设定了在时间T内输出3个数据包——该值是预先设定的,可以根据下行设备的处理能力,设定不同的数值——所以,在这个时标内输入的第4之后的数据包时会被丢弃掉,从而实现了限流、流控的目的。In Fig. 2, when the time scale counter is zero, the input data and output data statistics counters are cleared, and new statistics are started at the same time. Because it is set to output 3 data packets within the time T-this value is preset, and different values can be set according to the processing capacity of the downlink device-so, after the fourth input in this time scale The data packets will be discarded, so as to achieve the purpose of current limiting and flow control.

在图3所示的另一个实施例中,对数据的统计不是以数据包的个数为参考,而是统计数据的字节数。因为设定了在时间T内输出n个字节的数据——该值是预先设定的,可以根据下行设备的处理能力,设定不同的数值,在此假设n1+n2<n<n1+n2+n3——因此,当第3个数据包输出结束时,输出字节已经超出了设定的数值n,而在这个时标内输入的第4之后的数据包将被丢弃掉。同时,在逻辑中还设定了最后通过的数据包的最大值,当最后通过的一个数据包的长度大于这个设定值时,将这个数据包中止输出,同时置错误标志,这样就防止了因为最后一个数据包的超长对下行设备的影响。In another embodiment shown in FIG. 3 , the counting of data does not take the number of data packets as a reference, but counts the number of bytes of data. Because it is set to output n bytes of data within the time T—this value is preset, and different values can be set according to the processing capacity of the downlink device. Here, it is assumed that n1+n2<n<n1+ n2+n3 - Therefore, when the output of the third data packet ends, the output byte has exceeded the set value n, and the data packets after the fourth input within this time scale will be discarded. At the same time, the maximum value of the last data packet passed is also set in the logic. When the length of the last passed data packet is greater than the set value, the output of this data packet will be suspended and the error flag will be set at the same time, thus preventing Because of the impact of the last data packet's overlength on the downlink device.

以上的两种限流方法都避免了使用大容量的FIFO的机制,从而节省了资源,降低了成本。Both of the above two current limiting methods avoid the mechanism of using a large-capacity FIFO, thereby saving resources and reducing costs.

根据以上的描述,本领域的普通技术人员已经可以容易的实施本发明所述的方法。当然,上述发明可以在其它的特殊形式中得到具体实施,且并不背离所揭示的精髓或根本特征。因此可以理解,本发明不应被前面说明性的细节所限定。According to the above description, those skilled in the art can easily implement the method of the present invention. The above-described invention may, of course, be embodied in other specific forms without departing from the spirit or essential characteristics as disclosed. It is therefore to be understood that the invention is not to be limited by the foregoing illustrative details.

在说明书中的任何参考符号并不限制本发明的保护范围。“包括”一词不排除本发明所列之外的其它组件的出现。在组件或单元之前的“一个”不排除多个这种组件或单元的存在。Any reference signs in the description do not limit the protection scope of the present invention. The word "comprising" does not exclude the presence of other components than those listed in the present invention. "A" preceding a component or unit does not exclude the presence of a plurality of such components or units.

Claims (5)

1、一种数据传输的流量控制方法,所述方法包括如下步骤:1. A flow control method for data transmission, said method comprising the steps of: 上行数据传输设备将数据包发送到一先进先出存储器或随机存储器中缓存;The uplink data transmission device sends the data packet to a first-in-first-out memory or random access memory for buffering; 所述先进先出存储器或随机存储器在一个接口上控制输入的传输率,当数据流量达到或超过预先设定的限流率时,多余的数据包将会被丢弃;The first-in-first-out memory or random access memory controls the input transmission rate on an interface, and when the data flow reaches or exceeds a preset current limiting rate, redundant data packets will be discarded; 同时,所述先进先出存储器或随机存储器控制其输出传输率,以符合下行接收设备的需要;At the same time, the first-in-first-out memory or random access memory controls its output transmission rate to meet the needs of the downlink receiving device; 其中,所述先进先出存储器或随机存储器的输入端设有一时间标尺,所述时间标尺的长度可以根据下行设备的缓存能力来确定,参照该标尺统计数据流量,当数据流量大于预先设定的数值时,在此时间段后进入的数据包将会被丢弃,通过所述统计、丢弃的方法以实现流量控制;Wherein, the input end of the first-in-first-out memory or random access memory is provided with a time scale, the length of the time scale can be determined according to the caching capacity of the downlink device, and the data flow is counted with reference to the scale, when the data flow is greater than the preset When the value is set, the data packets entering after this time period will be discarded, and the flow control will be realized through the methods of counting and discarding; 所述先进先出存储器或随机存储器是下行接收设备自身具备的先进先出存储器或随机存储器,而并非额外的硬件资源。The first-in-first-out memory or random access memory is the first-in-first-out memory or random access memory of the downlink receiving device itself, rather than additional hardware resources. 2、如权利要求1所述的方法,其特征在于,统计数据流量时可以根据数据类型进行分类统计,以实现分类流控。2. The method according to claim 1, wherein when counting data traffic, classification and statistics can be performed according to data types, so as to realize classification traffic control. 3、如权利要求1-2中任一项所述的方法,其特征在于,所述当数据流量大于预先设定的数值是指数据包数大于预先设定的数值。3. The method according to any one of claims 1-2, wherein said when the data flow rate is greater than a preset value means that the number of data packets is greater than a preset value. 4、如权利要求1-2中任一项所述的方法,其特征在于,所述当数据流量大于预先设定的数值是指数据包的有效字节数大于预先设定的字节数。4. The method according to any one of claims 1-2, wherein when the data flow is greater than a preset value, it means that the number of effective bytes of the data packet is greater than the preset number of bytes. 5、如权利要求1所述的方法,其特征在于,所述限流方法是串行控制的,数据包可以被连续的执行不同的限流率,并可以在一个接口上构造数种不同的限流率。5. The method according to claim 1, characterized in that the current limiting method is serially controlled, data packets can be continuously executed with different current limiting rates, and several different current limiting rates can be constructed on one interface Current limiting rate.
CNB031095585A 2003-04-14 2003-04-14 Method for controlling flow of data transmisison Expired - Fee Related CN1215679C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB031095585A CN1215679C (en) 2003-04-14 2003-04-14 Method for controlling flow of data transmisison

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB031095585A CN1215679C (en) 2003-04-14 2003-04-14 Method for controlling flow of data transmisison

Publications (2)

Publication Number Publication Date
CN1449156A CN1449156A (en) 2003-10-15
CN1215679C true CN1215679C (en) 2005-08-17

Family

ID=28683933

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB031095585A Expired - Fee Related CN1215679C (en) 2003-04-14 2003-04-14 Method for controlling flow of data transmisison

Country Status (1)

Country Link
CN (1) CN1215679C (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100370771C (en) * 2004-04-21 2008-02-20 华为技术有限公司 Method of flow control in communication system
JP2006189937A (en) * 2004-12-28 2006-07-20 Toshiba Corp Reception device, transmission/reception device, reception method, and transmission/reception method
CN100411484C (en) * 2005-09-08 2008-08-13 华为技术有限公司 Method for realizing news flow control in communication device
CN101047615B (en) * 2006-05-14 2010-05-12 华为技术有限公司 Control method for Ethernet data flow
CN101155132B (en) * 2006-09-27 2012-07-04 中兴通讯股份有限公司 Indirect real-time flux control system and its method
WO2008104100A1 (en) * 2007-02-28 2008-09-04 Zte Corporation An apparatus and a method for realizing flow control based on rate restrict for mstp device
CN101286937B (en) * 2008-05-16 2011-01-05 成都市华为赛门铁克科技有限公司 Network flow control method, device and system
CN102075418B (en) * 2010-12-31 2014-05-07 北京神州绿盟信息安全科技股份有限公司 Network data flow control equipment and method
CN102970246B (en) * 2012-11-23 2017-12-22 上海寰创通信科技股份有限公司 A kind of Ethernet message flux control method
CN103095519A (en) * 2012-12-07 2013-05-08 大连奥林匹克电子城咨信商行 Network traffic monitoring method of monitoring communication window outgoing data
CN105718384A (en) * 2014-12-05 2016-06-29 中兴通讯股份有限公司 Cache configuration method and device
CN112383484A (en) * 2020-10-19 2021-02-19 深圳市源拓光电技术有限公司 Ethernet port flow rate limiting system and method based on FPGA

Also Published As

Publication number Publication date
CN1449156A (en) 2003-10-15

Similar Documents

Publication Publication Date Title
CN109479032B (en) Congestion avoidance in network devices
US12101260B1 (en) Multi-destination traffic handling optimizations in a network device
CN1215679C (en) Method for controlling flow of data transmisison
US9864633B2 (en) Network processor having multicasting protocol
CN101567855B (en) Distributed packet switching system and distributed packet switching method
CN109714267B (en) Transmission control method and system for managing reverse queues
Siemon Queueing in the Linux network stack
WO2020134425A1 (en) Data processing method, apparatus, and device, and storage medium
CN101834790A (en) A flow control method based on multi-core processor and multi-core processor
CN105391567A (en) Traffic management implementation method and device, and network equipment
CN113542148A (en) Message aggregation method and device, network card and readable storage medium
CN111917664A (en) A queue management method and system
CN113783785A (en) Method, device and network device for configuring ECN watermark value
CN107332785A (en) A kind of effective discharge control method based on dynamic duty threshold value
CN100466603C (en) Method and apparatus for shaping transmission service stream in network
CN117527722A (en) Traffic management method, system, equipment and readable storage device
WO2022057462A1 (en) Congestion control method and apparatus
CN113285914B (en) Communication transmission method for TCP (transmission control protocol) efficient data confirmation based on FPGA (field programmable Gate array)
WO2023155815A1 (en) Packet processing method, apparatus, terminal device, and storage medium
CN107426111A (en) Hardware achievable jamming control method and device based on wred algorithm
CN116170377A (en) A data processing method and related equipment
CN110300069B (en) Data transmission method, optimization device and system
CN111274195A (en) RDMA (remote direct memory Access) network flow control method and device and computer readable storage medium
JP2008193310A (en) Router buffer management method and router using the management method
CN115967686B (en) A data center-oriented network switching device cache management method and device

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
ASS Succession or assignment of patent right

Owner name: HUAWEI TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: GANGWAN NETWORK CO., LTD.

Effective date: 20060922

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20060922

Address after: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee after: Huawei Technologies Co., Ltd.

Address before: 100089, No. 21 West Third Ring Road, Beijing, Haidian District, Long Ling Building, 13 floor

Patentee before: Harbour Networks Holdings Limited

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

Granted publication date: 20050817

Termination date: 20110414