WO2012139496A1 - 一种流控方法和装置 - Google Patents

一种流控方法和装置 Download PDF

Info

Publication number
WO2012139496A1
WO2012139496A1 PCT/CN2012/073801 CN2012073801W WO2012139496A1 WO 2012139496 A1 WO2012139496 A1 WO 2012139496A1 CN 2012073801 W CN2012073801 W CN 2012073801W WO 2012139496 A1 WO2012139496 A1 WO 2012139496A1
Authority
WO
WIPO (PCT)
Prior art keywords
flow control
queue length
threshold range
average queue
len
Prior art date
Application number
PCT/CN2012/073801
Other languages
English (en)
French (fr)
Inventor
王庆东
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012139496A1 publication Critical patent/WO2012139496A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/26Flow control; Congestion control using explicit feedback to the source, e.g. choke packets
    • H04L47/266Stopping or restarting the source, e.g. X-on or X-off
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/30Flow control; Congestion control in combination with information about buffer occupancy at either end or at transit nodes

Definitions

  • the present invention relates to communication technologies, and in particular, to a flow control method and apparatus. Background technique
  • the flow control frame is a PAUSE frame. Set the thresholds XON and XOFF. When one of the first input first output (FIFO) reaches the high threshold XOFF, the PAUSE frame is sent to the opposite end.
  • the PAUSE frame carries a time parameter, indicating that the time when the party receiving the PAUSE frame pauses to send data, that is, the flow control time; if the time parameter is not 0, the party that receives the PAUSE frame stops transmitting the data message; The time parameter is equal to 0, indicating that the party receiving the PAUSE frame can send data immediately (wake-up function).
  • Depletion type After the flow control frame is received by the sender, if the flow control time is 0, the flow control is canceled and the data frame is allowed to be sent. Otherwise, the data packet is prohibited according to the flow control time. After the flow control time is over, the transmission starts. Data packets without waiting for a flow control frame with a flow control time of zero.
  • the MAC Control Parameters field in Table 1 carries the flow control time.
  • the pause time occupies a 2-byte integer, which is used to indicate the length of time that the sender is prohibited from transmitting data frames.
  • Each unit ( pause quanta ) represents 512bits of time, and the pause time range is 0-65535 pause- quanta.
  • the traditional flow control implementation method includes: a MAC receiving FIFO, setting two thresholds of XON and XOFF.
  • the packet processing speed does not match the receiving speed, the current water line of the FIFO moves to the left or right;
  • the received message speed exceeds the packet processing speed, the watermark of the FIFO moves to XOFF.
  • a flow control frame with a pause time other than 0 is generated, which means that the opposite end starts to flow control, and the transmission flow is suspended.
  • the pause time is determined by the pause time carried by the pause frame.
  • the watermark moves to XON.
  • a flow control frame with a pause time of 0 is generated, meaning The peer end is notified to end the flow control, and the traffic can continue to be sent.
  • the purpose of setting the high and low threshold is to prevent the water line from oscillating near the threshold, resulting in continuous flow control start and end signals, and the system is in an unstable state.
  • the technical problem to be solved by the present invention is to provide a flow control method and device to improve flow control efficiency.
  • the present invention provides a flow control method, including:
  • the current average queue length is calculated, where the current average queue length is obtained according to the length of the current flow control queue and the average queue length calculated in the previous calculation;
  • the flow control frame is sent, and the flow control time carries the flow control time, where the flow control time is the flow control time corresponding to the threshold range in which the current average queue length is located.
  • the method may further include the following feature, the method further includes: when the current average queue length falls within a minimum threshold range, and the previous average queue length is higher than the lowest threshold range, the flow control frame is sent, and the flow control is carried The time is 0.
  • the above method may also have the following feature, the current average queue length avg_q_len is calculated as follows:
  • Avg_q_len q_len ⁇ wq + avg_q_len' ⁇ (1— wq)
  • q_len is the length of the current flow control queue
  • avg_q_len' is the average queue length calculated in the previous calculation
  • wq is the weight value, which is (0, 1 ].
  • the above method may further have the following features, wherein each threshold range is continuous.
  • the threshold range includes:
  • the invention also provides a flow control device, comprising a setting unit, a queue length obtaining unit and a flow control unit, wherein:
  • the setting unit is configured to: set at least three thresholds that do not intersect each other, and a flow control time corresponding to the threshold range, and a threshold range with a large threshold value, where a flow control time is greater than a threshold range with a small threshold value Flow control time;
  • the queue length obtaining unit is configured to: when the packet enters the flow control queue, calculate a current average queue length, where the current average queue length is obtained according to the length of the current flow control queue and the average queue length calculated in the previous calculation;
  • the flow control unit is configured to: when the current average queue length is higher than the lowest threshold range, send a flow control frame, where the flow control frame carries a flow control time, where the flow control time is a threshold range where the current average queue length is located Corresponding flow control time.
  • the foregoing apparatus may further have the following feature, the flow control unit is further configured to: when the current average queue length falls within a minimum threshold range, and the previous average queue length is higher than a minimum threshold range When the flow control frame is sent, and the flow control time is 0.
  • the queue length obtaining unit is configured to: calculate a current average queue length avg_q_len according to the following manner:
  • Avg_q_len q_len ⁇ wq + avg_q_len' ⁇ (1— wq)
  • q_len is the length of the current flow control queue
  • avg_q_len' is the average queue length calculated in the previous calculation
  • wq is the weight value, which is (0, 1 ].
  • the above device may further have the following features, wherein the setting unit sets the threshold range to be continuous.
  • the device may further have the following features: the threshold range set by the setting unit includes:
  • the flow control strength is gradually increased to avoid excessive flow control and flow fluctuations
  • Figure 1 is a conventional flow control implementation method
  • FIG. 3 is a schematic diagram of a flow control threshold according to an embodiment of the present invention.
  • Figure 4 is a block diagram of the flow control device of the present invention.
  • the core idea of the present invention is: setting a plurality of thresholds, dynamically adjusting the pause time, enabling the system to intelligently adjust the flow control strength, performing slight flow control in the initial stage of congestion; and increasing flow control when serious congestion occurs .
  • the flow control method provided by the present invention is as shown in FIG. 2, and includes:
  • Step 301 Set, according to the flow control FIFO depth, at least three mutually disjoint threshold ranges, and a flow control time corresponding to the threshold range;
  • threshold range can be continuous, for example, the preset threshold range [ ⁇ , ⁇ ), [XON, XOFF), [XOFF, + ⁇ ), or, [ ⁇ , ⁇ ), [XON, MIDDLE), [MIDDLE, XOFF), [XOFF, + ⁇ ).
  • the threshold range can also be discontinuous, for example, [ ⁇ , ⁇ ), [MIDDLE, XOFF), [XOFF, + ⁇ ]).
  • Step 302 setting different pause times for different threshold ranges, and the threshold range with a large threshold value is a pause time corresponding to a threshold range corresponding to a threshold range with a small threshold value;
  • Step 303 When the packet enters the flow control queue, the current average queue length is calculated in real time.
  • the current average queue length is obtained according to the length of the current flow control queue and the average queue length calculated in the previous calculation.
  • the flow control queue is implemented based on FIFO
  • Step 304 The average queue length is higher than the lowest threshold range, and the flow control is started. When the average queue length falls within a specific threshold, the flow control frame is sent by using the pause time corresponding to the threshold range. Step 305: When the current average queue length falls When the minimum threshold is reached, the flow control ends.
  • the flow control frame may not be sent when the current average queue length falls within the minimum threshold.
  • the flow control time is 0, the flow control is canceled and the data frame is allowed to be sent. Otherwise, the data packet is forbidden according to the flow control time. After the flow control time is over, the data packet is sent. Instead of waiting for a flow control frame with a flow control time of zero.
  • Step 1 Based on the flow control FIFO depth, preset multiple threshold ranges.
  • the traditional flow control method only divides two thresholds: XON and XOFF.
  • the present invention will divide multiple threshold ranges on the FIFO as needed: XON-->LOW-->MIDDLE-->HIGH-->XOFF, where [ ⁇ , ⁇ ), is the minimum threshold range, and XOFF is the highest threshold range.
  • the number of the threshold ranges is only an example, which is not limited by the present invention.
  • Step 2 Set the pause time for the specified threshold range.
  • the current average queue length is assumed to be Qlen. As shown in Figure 3, this embodiment is set as follows:
  • pause time 26214(pause quanta)
  • the pause time value is only an example, and the present invention is not limited to the second.
  • Step 3 After the message enters the FIFO, the average queue length is calculated in real time.
  • the average queue length is calculated based on the last average queue length and the length of the current FIFO queue.
  • the calculation of queue length and average queue length is a dynamic update process.
  • the recursive formula for the average queue length is as follows:
  • Avg_q_len q_len ⁇ wq + avg_q_len' ⁇ (1— wq)
  • Avg_q_len' - is the last calculated average queue length.
  • Wq - is the weight of the average queue length, which is (0, 1).
  • the size of wq determines the extent to which the average queue length reflects the length of the real queue.
  • the average queue length is the length of the data in the current FIFO. Step 4: When the average queue length is greater than XON, the flow control frame is started to be sent, and the flow control parameter is 13107;
  • Step 5 If the flow control effect is not obvious, the message continues to accumulate in the FIFO, and will reach the threshold range 3), 4), 5) and 6) listed in the second step, according to the current average queue length. Enter the threshold range, and select the pause time set for the corresponding threshold range to send the flow control frame.
  • Step 6 If the flow control occurs, the average queue length will gradually decrease. If it is less than XON, then the flow control frame with pause time 0 will be sent.
  • the present invention further provides a flow control device, as shown in FIG. 4, comprising a setting unit, a queue length obtaining unit, and a flow control unit, wherein:
  • the setting unit is configured to: set at least three mutually exclusive threshold ranges, and a flow control time corresponding to the threshold range, and a threshold range with a large threshold value, where a flow control time is greater than a threshold range with a small threshold value Flow control time;
  • the queue length obtaining unit is configured to: when the packet enters the flow control queue, calculate a current average queue length, where the current average queue length is obtained according to the length of the current flow control queue and the average queue length calculated in the previous calculation;
  • the flow control unit is configured to: when the current average queue length is higher than the minimum threshold range, send a flow control frame, where the flow control frame carries a flow control time, where the flow control time is a threshold range where the current average queue length is located Corresponding flow control time.
  • the flow control unit is further configured to: when the current average queue length falls within a minimum threshold range, and the previous average queue length is higher than the lowest threshold range, the flow control frame is sent, and the flow control time is 0.
  • the queue length obtaining unit is configured to: calculate a current average queue length vg_q_len according to the following manner:
  • Avg_q_len q_len ⁇ wq + avg_q_len' ⁇ (1— wq)
  • q_len is the length of the current flow control queue
  • avg_q_len' is the average queue length calculated in the previous calculation
  • wq is the weight value, which is (0, 1 ].
  • the threshold ranges set by the setting unit are continuous.
  • the threshold range set by the setting unit includes:
  • the flow control strength is gradually increased to avoid excessive flow control and flow fluctuations

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

流控方法,包括:设置至少三个互不相交的门限范围,以及所述门限范围对应的流控时间,且门限值大的门限范围其流控时间大于门限值小的门限范围对应的流控时间;报文进入流控队列时,计算当前平均队列长度,其中,所述当前平均队列长度根据当前流控队列的长度和前一次计算得到的平均队列长度得到;当当前平均队列长度高于最低门限范围时,发送流控帧,所述流控帧中携带流控时间,所述流控时间为当前平均队列长度所在的门限范围对应的流控时间。本发明还提供一种流控装置。本发明能够提前感知端口拥塞,及时做出反压操作,发送流控帧。流控力度逐渐增大,避免流控过度以及流量震荡问题。

Description

一种流控方法和装置
技术领域
本发明涉及通信技术, 尤其涉及一种流控方法和装置。 背景技术
按照 IEEE 802.3x协议, 流控有两种方式: XON/XOFF和耗尽型。
XON/XOFF (发送器开启 /关闭)机制: 利用流控帧唤醒功能进行工作的 机制。 流控帧为 PAUSE (暂停) 帧。 设定门限 XON和 XOFF, 当一方的接 收先入先出 ( First Input First Output, FIFO )达到高门限 XOFF时, 向对端发 送 PAUSE帧。 PAUSE帧中携带一个时间参数,表示收到 PAUSE帧的一方要 暂停发送数据的时长, 即流控时间; 如果该时间参数不为 0, 则收到 PAUSE 帧的一方停止发送数据报文; 如果该时间参数等于 0, 表示收到 PAUSE帧的 一方可以马上发送数据(唤醒功能) 。
耗尽型: 发送端接收到流控帧之后, 如果流控时间为 0, 则取消流控, 允许发送数据帧, 否则, 按照流控时间禁止数据报文发送, 流控时间结束后, 开始发送数据报文, 而不必等待流控时间为 0的流控帧。
如表 1所示为 Pause帧的结构图, 表 1中的 MAC Control Parameters (媒 体接入控制控制参数)字段携带流控时间。 流控时间 (pause time ) 占用 2字 节整数, 用于表示禁止发送端发送数据帧的时长。 每一单位( pause quanta ) 代表 512bits的时间 , pause time范围是 0-65535个 pause— quanta。
Figure imgf000003_0001
(01-80-C2 ) = (00
= PAUSE to
00-00-01) (00-01) FF-FF)
or unique
DA
表 1
如图 1所示, 传统流控实现方法包括: MAC接收 FIFO, 设定 XON和 XOFF两个门限, 当报文处理速度与接收速度不匹配, FIFO的当前水线会向 左或者向右移动; 当接收报文速度超过报文处理速度, FIFO的水线向 XOFF 移动, 当水线超过 XOFF, 则产生 pause time不为 0的流控帧, 意味着通知对 端开始流控,要暂停发送流量,暂停时间由 pause帧携带的 pause time所决定; 当报文处理速度超过报文接收速度, 水线向 XON移动, 当水线低于 XON, 则产生 pause time为 0的流控帧, 意味着通知对端结束流控, 可以继续发送 流量。
设立高低门限(XON/XOFF ) 的作用是, 避免水线在门限附近震荡, 导 致不断产生流控开始和结束信号, 系统处于不稳定状态。
但是这样的处理方式存在一定的弊端, 那就是流控时间 pause time的选 择。 pause time是事先设定好的,如果 pause time设定的过大, 则会流控过度; 如果 pause time设定的过小, 流控的效果可能也不会很好。 发明内容
本发明要解决的技术问题是提供一种流控方法和装置, 提高流控效率。 为了解决上述问题, 本发明提供了一种流控方法, 包括:
设置至少三个互不相交的门限范围,以及所述门限范围对应的流控时间, 且门限值大的门限范围其流控时间大于门限值 d、的门限范围对应的流控时 间;
报文进入流控队列时, 计算当前平均队列长度, 其中, 所述当前平均队 列长度根据当前流控队列的长度和前一次计算得到的平均队列长度得到; 当当前平均队列长度高于最低门限范围时, 发送流控帧, 所述流控帧中 携带流控时间, 所述流控时间为当前平均队列长度所在的门限范围对应的流 控时间。
优选地, 上述方法还可具有以下特点, 所述方法还包括, 当当前平均队 列长度落入最低门限范围, 且前一次平均队列长度高于最低门限范围时, 发 送流控帧, 并携带流控时间为 0。
优选地, 上述方法还可具有以下特点, 所述当前平均队列长度 avg— q_len 根据如下方式计算:
avg_q_len = q_len χ wq + avg_q_len' χ (1— wq)
其中, q_len为当前流控队列的长度, avg— q_len'为前一次计算得到的平 均队列长度, wq为权重值, 其取值为 (0, 1 ]。
优选地, 上述方法还可具有以下特点, 所述各门限范围之间连续。
优选地, 上述方法还可具有以下特点, 所述门限范围包括:
[Ο,ΧΟΝ) , [XON,LOW) , [LOW,MIDDLE) , [MIDDELE,HIGH) , [HIGH,XOFF)以及 [XOFF,+∞ )。
本发明还提供一种流控装置, 包括设置单元、 队列长度获取单元和流控 单元, 其中:
所述设置单元设置为: 设置至少三个互不相交的门限范围, 以及所述门 限范围对应的流控时间, 且门限值大的门限范围其流控时间大于门限值小的 门限范围对应的流控时间;
所述队列长度获取单元设置为: 当报文进入流控队列时, 计算当前平均 队列长度, 其中, 所述当前平均队列长度根据当前流控队列的长度和前一次 计算得到的平均队列长度得到;
所述流控单元设置为: 当当前平均队列长度高于最低门限范围时, 发送 流控帧, 所述流控帧中携带流控时间, 所述流控时间为当前平均队列长度所 在的门限范围对应的流控时间。
优选地, 上述装置还可具有以下特点, 所述流控单元还设置为: 当当前 平均队列长度落入最低门限范围, 且前一次平均队列长度高于最低门限范围 时, 发送流控帧, 并携带流控时间为 0。
优选地, 上述装置还可具有以下特点, 所述队列长度获取单元设置为: 根据如下方式计算当前平均队列长度 avg— q_len:
avg_q_len = q_len χ wq + avg_q_len' χ (1— wq)
其中, q_len为当前流控队列的长度, avg— q_len'为前一次计算得到的平 均队列长度, wq为权重值, 其取值为 (0, 1 ]。
优选地, 上述装置还可具有以下特点, 所述设置单元设置的门限范围之 间连续。
优选地, 上述装置还可具有以下特点, 所述设置单元设置的所述门限范 围包括:
[Ο,ΧΟΝ) , [XON,LOW) , [LOW,MIDDLE) , [MIDDELE,HIGH) , [HIGH,XOFF)以及 [XOFF,+∞ )。
釆用本发明所述方法, 与现有技术相比, 具有以下有点:
1、 提前感知端口拥塞, 及时做出反压操作, 发送流控帧;
2、 流控力度逐渐增大, 避免流控过度以及流量震荡问题;
3、 实现简单, 结合 WRED的平均队列算法以及流控帧的格式要求, 很 容易实现。 附图概述
图 1是传统流控实现方法;
图 2是本发明流控方法流程图;
图 3是本发明实施例流控门限示意图;
图 4是本发明流控装置框图。 本发明的较佳实施方式 本发明的核心思想是: 设定多个门限, 动态调整 pause time, 使得系统能 够智能调整流控力度, 在发生拥塞的初期, 进行轻微流控; 在发生严重拥塞 的时候, 加大流控力度。
本发明提供的流控方法如图 2所示, 包括:
步骤 301 : 基于流控 FIFO深度, 设置至少三个互不相交的门限范围, 以 及所述门限范围对应的流控时间;
其中, 门限范围可以连续, 比如, 预设如下门限范围 [Ο,ΧΟΝ), [XON,XOFF),[XOFF,+∞ ) ,或者, [Ο,ΧΟΝ), [XON,MIDDLE), [MIDDLE,XOFF), [XOFF,+∞)。当然,门限范围也可以不连续,比如, [Ο,ΧΟΝ), [MIDDLE,XOFF), [XOFF,+∞])。
步骤 302: 给不同的门限范围设定不同的 pause time, 且门限值大的门限 范围其 pause time大于门限值小的门限范围对应的 pause time;
步骤 303: 报文进入流控队列时, 实时计算当前平均队列长度; 其中, 当前平均队列长度根据当前流控队列的长度和前一次计算得到的平均队列长 度得到;
其中, 流控队列基于 FIFO实现;
步骤 304: 平均队列长度高于最低门限范围, 开始流控; 当平均队列长 度落在特定门限范围内, 使用该门限范围所对应的 pause time发送流控帧; 步骤 305: 当当前平均队列长度落入最低门限范围时, 流控结束。
其中, 当当前平均队列长度落入最低门限范围, 且前一次平均队列长度 高于最低门限范围时, 发送流控帧, 并携带流控时间为 0。
当然, 基于耗尽型方式进行流控时, 在当前平均队列长度落入最低门限 范围时, 也可以不发送流控帧。 发送端接收到流控帧之后, 如果流控时间为 0, 则取消流控, 允许发送数据帧, 否则, 按照流控时间禁止数据报文发送, 流控时间结束后, 开始发送数据报文, 而不必等待流控时间为 0的流控帧。
下面通过具体实施例进一步说明本发明。 本发明的处理步骤如下:
第一步: 基于流控 FIFO深度, 预先设定多个门限范围。 传统的流控方法 只划分了两个门限: XON和 XOFF, 本发明将要在 FIFO上根据需要划分多 个门限范围: XON-->LOW-->MIDDLE-->HIGH-->XOFF , 其中 [Ο,ΧΟΝ),为最 低门限范围, 大于等于 XOFF为最高门限范围。
此次门限范围的个数仅为示例, 本发明对此不作限定。
第二步: 为划定的门限范围设定 pause time, 当前平均队列长度假定为 Qlen, 如图 3所示, 本实施例按照如下方式设定:
当 Qlen < XON时, pause time = 0;
当 XON <=Qlen<LOW时, pause time = 13107(pause quanta)
当 LOW<=Qlen<MIDDLE时, pause time = 26214(pause quanta) 当 MIDDLE<=Qlen<HIGH时, pause time = 39321 (pause quanta) 当 HIGH<=Qlen<XOFF时, pause time = 52428(pause quanta)
当 Qlen>=XOFF时, ause time = 65535(pause quanta)
此处 pause time值仅为示例, 本发明对次不作限定。
第三步: 报文进入到 FIFO后, 实时计算平均队列长度。
一种计算平均队列长度的方式如下: 本次队列平均长度根据上次平均队列长度和本次 FIFO 队列的长度来计 算, 队列长度和平均队列长度的计算是一个动态更新的过程。 平均队列长度 的递推计算公式如下:
avg_q_len = q_len χ wq + avg_q_len' χ (1— wq)
avg_q_len' ——为上次计算的平均队列长度。
wq—— 为平均队列长度的权重, 其取值为(0, 1 ] , wq的大小决定了 平均队列长度反映真实队列长度的程度。
q_len —— 本次入队队列长度。
首次计算时, 平均队列长度为当前 FIFO中数据长度。 第四步: 当平均队列长度大于 XON时, 开始发送流控帧, 其流控参数为 13107;
第五步: 如果流控效果不明显, 报文在 FIFO里面继续累积, 将会依次到 达第二步所列举的门限范围 3 ) 、 4 ) 、 5 )和 6 ) , 依据当前平均队列长度所 落入的门限范围, 选择为相应门限范围所设定的 pause time进行发送流控帧。
第六步: 如果流控发生作用, 平均队列长度将会逐渐减小, 最后小于 XON , 那么将会发送 pause time为 0的流控帧。
本发明还提供一种流控装置, 如图 4所示, 包括设置单元、 队列长度获 取单元和流控单元, 其中:
所述设置单元用于: 设置至少三个互不相交的门限范围, 以及所述门限 范围对应的流控时间, 且门限值大的门限范围其流控时间大于门限值小的门 限范围对应的流控时间;
所述队列长度获取单元用于: 当报文进入流控队列时, 计算当前平均队 列长度, 其中, 所述当前平均队列长度根据当前流控队列的长度和前一次计 算得到的平均队列长度得到;
所述流控单元用于: 当当前平均队列长度高于最低门限范围时, 发送流 控帧, 所述流控帧中携带流控时间, 所述流控时间为当前平均队列长度所在 的门限范围对应的流控时间。
其中, 所述流控单元还用于: 当当前平均队列长度落入最低门限范围, 且前一次平均队列长度高于最低门限范围时, 发送流控帧, 并携带流控时间 为 0。
其中, 所述队列长度获取单元用于: 根据如下方式计算当前平均队列长 度 vg_q_len:
avg_q_len = q_len χ wq + avg_q_len' χ (1— wq)
其中, q_len为当前流控队列的长度, avg— q_len'为前一次计算得到的平 均队列长度, wq为权重值, 其取值为 (0, 1 ]。
其中, 所述设置单元设置的门限范围之间连续。 其中, 所述设置单元设置的所述门限范围包括:
[Ο,ΧΟΝ) , [XON,LOW) , [LOW,MIDDLE) , [MIDDELE,HIGH) , [HIGH,XOFF)以及 [XOFF,+∞ )。
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现。 相应地, 上述实施例中的各模块 /单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本发明不限制于任 何特定形式的硬件和软件的结合。
当然, 本发明还可有其他多种实施例, 在不背离本发明精神及其实质的 但这些相应的改变和变形都应属于本发明所附的权利要求的保护范围。
工业实用性
釆用本发明所述方法, 与现有技术相比:
1、 提前感知端口拥塞, 及时做出反压操作, 发送流控帧;
2、 流控力度逐渐增大, 避免流控过度以及流量震荡问题;
3、 实现简单, 结合 WRED的平均队列算法以及流控帧的格式要求, 很 容易实现。

Claims

权 利 要 求 书
1、 一种流控方法, 包括:
设置至少三个互不相交的门限范围,以及所述门限范围对应的流控时间, 且门限值大的门限范围其流控时间大于门限值 d、的门限范围对应的流控时 间;
报文进入流控队列时, 计算当前平均队列长度, 其中, 所述当前平均队 列长度根据当前流控队列的长度和前一次计算得到的平均队列长度得到; 当当前平均队列长度高于最低门限范围时, 发送流控帧, 所述流控帧中 携带流控时间, 所述流控时间为当前平均队列长度所在的门限范围对应的流 控时间。
2、 如权利要求 1所述的方法, 其中, 所述方法还包括, 当当前平均队列 长度落入最低门限范围, 且前一次平均队列长度高于最低门限范围时, 发送 流控帧, 并携带流控时间为 0。
3、 如权利要求 1所述的方法, 其中, 所述当前平均队列长度 avg— q_len 根据如下方式计算:
avg_q_len = q_len χ wq + avg_q_len' χ (1— wq)
其中, q_len为当前流控队列的长度, avg— q_len'为前一次计算得到的平 均队列长度, wq为权重值, 其取值为 (0, 1 ]。
4、如权利要求 1至 3任一所述的方法,其中,所述各门限范围之间连续。
5、 如权利要求 1至 3任一所述的方法, 其中, 所述门限范围包括:
[Ο,ΧΟΝ) , [XON,LOW) , [LOW,MIDDLE) , [MIDDELE,HIGH) , [HIGH,XOFF)以及 [XOFF,+∞ )。
6、 一种流控装置, 包括设置单元、 队列长度获取单元和流控单元,其中: 所述设置单元设置为: 设置至少三个互不相交的门限范围, 以及所述门 限范围对应的流控时间, 且门限值大的门限范围其流控时间大于门限值小的 门限范围对应的流控时间;
所述队列长度获取单元设置为: 当报文进入流控队列时, 计算当前平均 队列长度, 其中, 所述当前平均队列长度根据当前流控队列的长度和前一次 计算得到的平均队列长度得到;
所述流控单元设置为: 当当前平均队列长度高于最低门限范围时, 发送 流控帧, 所述流控帧中携带流控时间, 所述流控时间为当前平均队列长度所 在的门限范围对应的流控时间。
7、 如权利要求 6所述的装置, 其中, 所述流控单元还设置为: 当当前平 均队列长度落入最低门限范围,且前一次平均队列长度高于最低门限范围时, 发送流控帧, 并携带流控时间为 0。
8、 如权利要求 6所述的装置, 其中, 所述队列长度获取单元设置为: 根 据如下方式计算当前平均队列长度 avg— q_len:
avg_q_len = q_len χ wq + avg_q_len' χ (1— wq)
其中, q_len为当前流控队列的长度, avg— q_len'为前一次计算得到的平 均队列长度, wq为权重值, 其取值为 (0, 1 ]。
9、 如权利要求 6至 8任一所述的装置, 其中, 所述设置单元设置的门限 范围之间连续。
10、 如权利要求 6至 8任一所述的装置, 其中, 所述设置单元设置的所 述门限范围包括:
[Ο,ΧΟΝ) , [XON,LOW) , [LOW,MIDDLE) , [MIDDELE,HIGH) , [HIGH,XOFF)以及 [XOFF,+∞ )。
PCT/CN2012/073801 2011-04-15 2012-04-11 一种流控方法和装置 WO2012139496A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110095469.4 2011-04-15
CN201110095469.4A CN102739510B (zh) 2011-04-15 2011-04-15 一种流控方法和装置

Publications (1)

Publication Number Publication Date
WO2012139496A1 true WO2012139496A1 (zh) 2012-10-18

Family

ID=46994328

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/073801 WO2012139496A1 (zh) 2011-04-15 2012-04-11 一种流控方法和装置

Country Status (2)

Country Link
CN (1) CN102739510B (zh)
WO (1) WO2012139496A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018000820A1 (zh) * 2016-06-28 2018-01-04 华为技术有限公司 一种队列管理方法和装置
CN113472492A (zh) * 2020-03-30 2021-10-01 维沃移动通信有限公司 流控消息的传输方法和设备

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103763204B (zh) * 2013-12-31 2017-03-08 华为技术有限公司 一种流量控制方法及装置
CN105704097A (zh) * 2014-11-26 2016-06-22 华为数字技术(苏州)有限公司 一种防御攻击的方法及装置
CN104618265B (zh) * 2014-12-30 2018-03-13 华为技术有限公司 一种报文转发方法和装置
CN106992939B (zh) * 2017-05-16 2023-10-10 新疆安迪星通信息科技有限公司 一种卫星IP网络QoS流控门限动态学习系统及方法
CN111417145B (zh) * 2019-01-04 2021-11-30 大唐移动通信设备有限公司 一种信息处理的方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2361139A (en) * 2000-04-04 2001-10-10 3Com Corp Flow control system for ethernet network devices
CN1787487A (zh) * 2004-12-07 2006-06-14 国际商业机器公司 在交换全双工以太网络中进行数据包流控制的方法和系统
CN101047615A (zh) * 2006-05-14 2007-10-03 华为技术有限公司 一种以太网数据流量控制方法
CN101536413A (zh) * 2005-05-16 2009-09-16 思科技术公司 队列感知的流控制

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8516101B2 (en) * 2009-06-15 2013-08-20 Qualcomm Incorporated Resource management for a wireless device
CN101854297B (zh) * 2010-05-21 2013-01-02 南京邮电大学 一种卫星网络中传输控制协议跨层的设计方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2361139A (en) * 2000-04-04 2001-10-10 3Com Corp Flow control system for ethernet network devices
CN1787487A (zh) * 2004-12-07 2006-06-14 国际商业机器公司 在交换全双工以太网络中进行数据包流控制的方法和系统
CN101536413A (zh) * 2005-05-16 2009-09-16 思科技术公司 队列感知的流控制
CN101047615A (zh) * 2006-05-14 2007-10-03 华为技术有限公司 一种以太网数据流量控制方法

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018000820A1 (zh) * 2016-06-28 2018-01-04 华为技术有限公司 一种队列管理方法和装置
US10951551B2 (en) 2016-06-28 2021-03-16 Huawei Technologies Co., Ltd. Queue management method and apparatus
CN113472492A (zh) * 2020-03-30 2021-10-01 维沃移动通信有限公司 流控消息的传输方法和设备

Also Published As

Publication number Publication date
CN102739510B (zh) 2016-07-27
CN102739510A (zh) 2012-10-17

Similar Documents

Publication Publication Date Title
WO2012139496A1 (zh) 一种流控方法和装置
US8804529B2 (en) Backward congestion notification
CN102244773B (zh) 一种基于窄变带宽网络的实时视频流传输方法
US8477615B2 (en) Method and system to manage network traffic congestion
WO2018218957A1 (zh) 一种流量控制方法、设备及系统
US20120188885A1 (en) Method and system for self-adapting dynamic power reduction mechanism for physical layer devices in packet data networks
JP2011151601A (ja) パケット中継装置及びパケットを中継する方法
RU2510981C1 (ru) Система высокоскоростной связи и способ высокоскоростной связи
WO2020253488A1 (zh) 拥塞控制方法及装置、通信网络、计算机存储介质
WO2014047771A1 (zh) 一种流量控制方法、装置及网络
JP2014131275A (ja) ネットワークの輻輳に適応するためのシステムと方法
CN106936730B (zh) 一种报文发送方法、tcp代理以及tcp客户端
WO2021047404A1 (zh) 一种网络参数配置方法及装置
WO2014026554A1 (zh) 报文拥塞处理方法及装置
WO2015024400A1 (zh) 一种路由器的拥塞避免方法及装置
CN106656809B (zh) 流表聚合方法、控制器、网元和系统
WO2012041041A1 (zh) 一种数据卡温度控制方法及装置
JP2016510537A (ja) 物理層送信特性の調節
JP5177004B2 (ja) 動作モード変更装置および通信装置
CN116156019A (zh) 一种用于卫星网络的tcp流量控制方法、系统、设备及介质
CN111385219B (zh) 借用硬件中断实现高性能高精度软件tcp限速的方法
WO2010115367A1 (zh) 数据传输方法及数据处理装置
JP2009147569A (ja) フレーム送信装置およびフレーム受信装置
US9537778B2 (en) Traffic shaping drive method and driver
WO2016197810A1 (zh) 报文发送的方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12771761

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12771761

Country of ref document: EP

Kind code of ref document: A1