WO2020119202A1 - 拥塞控制方法及装置、网络设备及存储介质 - Google Patents

拥塞控制方法及装置、网络设备及存储介质 Download PDF

Info

Publication number
WO2020119202A1
WO2020119202A1 PCT/CN2019/106060 CN2019106060W WO2020119202A1 WO 2020119202 A1 WO2020119202 A1 WO 2020119202A1 CN 2019106060 W CN2019106060 W CN 2019106060W WO 2020119202 A1 WO2020119202 A1 WO 2020119202A1
Authority
WO
WIPO (PCT)
Prior art keywords
queue
depth
discard
threshold
queues
Prior art date
Application number
PCT/CN2019/106060
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 WO2020119202A1 publication Critical patent/WO2020119202A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9047Buffering arrangements including multiple buffers, e.g. buffer pools
    • H04L49/9052Buffering arrangements including multiple buffers, e.g. buffer pools with buffers of different sizes
    • 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/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • 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/12Avoiding congestion; Recovering from congestion
    • 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
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9084Reactions to storage capacity overflow
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Definitions

  • the network device has enough buffer space to continue to save the queue depth For large queues, and the network device continues to store the queues with large depths, it will not affect the transmission and reception of other queues. Therefore, if the packet is discarded based on the single queue drop threshold, then the Queues with great depth will naturally discard packets, resulting in unnecessary packet discards, which can be avoided.
  • the overall cache depth of multiple queues in the network device that is, the total cache depth
  • the method further includes:
  • the queue is a first-in first-out queue, so the message currently at the exit of the queue is the first message to enter the queue, that is, the oldest message.
  • the target queue in order to prioritize the discarding of old messages, the target queue will preferentially select the packets at the queue exit to discard; in this way, it reduces the long-time accumulation of large data packets in the queue or difficult to successfully send packets The text has occupied the cache space for a long time to increase congestion.
  • the target queue that satisfies the discard condition is: the queue with the largest queue depth among the multiple queues, that is, the queue that currently includes the most packets.
  • multiple queues share a revocation threshold.
  • multiple queues are queue A, queue B, and queue C; the revocation thresholds of queue A, queue B, and queue C are shared, and only A revocation threshold.
  • the network device sets a second register for multiple queues, and the second register stores a revocation threshold shared by multiple queues.
  • the i-th queue will be used as the target queue to discard packets. In this way, if there are multiple queues that are greater than their respective revocation thresholds, these queues are all target queues and all packets will be discarded; in this way, congestion within network devices can be quickly alleviated.
  • Step S122 Select candidate queues with a depth within the depth range from the plurality of queues
  • Step S123 If there is one candidate queue, select the candidate queue as the target queue to discard packets;
  • Step S124 If there are multiple candidate queues, the queue with the lowest queue priority is selected as the target queue to discard packets according to the queue priority of the candidate queue.
  • a depth range of the selected target queue is first determined. If the queue depth of a certain queue is within the depth range, the queue is used as an alternative queue; then Select the target queue according to the number of candidate queues to discard packets.
  • the selection of the target queue for packet loss according to the number of candidate queues includes:
  • the target queue can be selected from the candidate queues according to the queue priority for packet discarding.
  • the target queues are selected according to the queue priority of the candidate queues. If the queue priority of a queue is lower, it means that the urgency of sending and receiving messages in the queue is lower, or the importance of the message is lower, so in this embodiment, if there are multiple candidate queues, then Select the queue with the lowest queue priority as the destination queue to discard packets.
  • Step S125 If the queue priorities of multiple candidate queues are the same, then select the candidate queue with the largest queue depth as the target queue to discard packets.
  • the candidate queue with the largest queue depth is preferentially selected as the target queue. In this way, the queues with the greatest impact on congestion are discarded.
  • the step S121 may include:
  • one or more third registers may be set in the network device, and the third register may be set to store the selection parameter value.
  • the selection parameter may be a weighting parameter and/or a weighting factor.
  • Multiple queues have queue depths, and these queue depths may be the same or different, but through logical operations such as comparison, the maximum queue depth can be obtained.
  • the maximum depth of the queue can be directly used as the upper limit of the depth range, or it can be a known amount as the upper limit of the calculated depth. For example, taking A times the maximum queue depth as the upper limit of the depth, A may be a positive integer greater than or equal to 1.
  • the difference between the maximum queue depth and the weighting parameter can be directly solved to obtain the lower limit.
  • the lower limit may be H-h.
  • the depth range may be H to H-h.
  • the selection parameter value is a proportional value
  • the lower limit may be H*h
  • the depth range may be: H to H*h
  • the value range of h is a positive number between 0 and 1.
  • the step S120 may include:
  • the type of the message determine the total queue depth of the jth message in the queue where the jth message is located; j is a positive integer less than J; J is the total number of message types;
  • the queue for selecting the jth message to be cached is The target queue discards packets; and/or, if the total queue depth of the j-th packet reaches the second discarding threshold of the j-th packet, and there is more than one queue in which the j-th packet resides, One or more queues are selected as the target queue to discard packets according to the queue depth of the queue in which the jth message is located.
  • the types of packets are distinguished to select the target queue and discard the packets.
  • the packets may be classified according to type: unicast packets, multicast packets, and/or broadcast packets.
  • the j-th message may be any one of a unicast message, a multicast message, and a broadcast message.
  • the second discarding threshold is smaller than the first discarding threshold.
  • the current network device caches unicast and multicast packets
  • the total cache depth is greater than the first discard threshold
  • the second discarding thresholds of different types of packets can be shared, and in some embodiments, the second discarding thresholds of different types of packets can be set separately.
  • a queue discards packets, including at least one of the following:
  • one or more queues of type j packets will be selected according to the queue priority and queue depth for packet discarding.
  • this embodiment provides a congestion processing apparatus, including:
  • the obtaining module 110 is set to obtain the total cache depth of multiple queues
  • the discarding module 120 is configured to, if the total cache depth reaches the first discarding threshold, select a target queue from the multiple queues whose queue depth meets the discarding condition to discard the packet.
  • the acquiring module 110 and the discarding module 120 may be program modules. After being executed by the processor, the program module can determine the total cache depth and select a target queue and discard packets.
  • the acquiring module 110 and the discarding module 120 may be soft and hard combined modules, and the soft and hard combined modules may be various programmable arrays; the programmable arrays may include: complex programmable arrays And/or field programmable array.
  • the acquiring module 110 and the discarding module 120 may be pure hardware modules, and the pure hardware modules may be application specific integrated circuits.
  • the device includes:
  • the stopping module is configured to stop the packet discarding of the target queue if the queue depth after the target queue discards the packet reaches the revocation threshold.
  • the queue is a first-in first-out queue
  • the discarding module 120 is configured to, if the total cache depth reaches the first discarding threshold, select a target queue from the plurality of queues whose queue depth meets the discarding condition to discard the message at the queue exit.
  • the discarding module 120 is configured to select the queue with the largest queue depth from the plurality of queues as the target queue to discard packets if the total cache depth reaches the first discard threshold.
  • the discarding module 120 is set to determine the revocation threshold of each queue; if the queue depth of the i-th queue is greater than the revocation threshold, the i-th queue is selected to discard packets, where i is A positive integer less than I, where I is the total number of queues.
  • the discarding module 120 is configured to determine a depth range for selecting the target queue; select an alternative queue having a depth within the depth range from the plurality of queues; if There is one candidate queue, and the candidate queue is selected as the target queue to discard packets; and/or, if there are multiple candidate queues, the queue priority is selected according to the queue priority of the candidate queue The lowest queue is the target queue discarding packets.
  • the discarding module 120 is configured to select the candidate queue with the largest queue depth as the target queue to discard packets if the queue priorities of multiple candidate queues are the same.
  • the discarding module 120 is configured to determine the selection parameter value of the depth range; determine the upper limit of the depth range according to the maximum queue depth in the multiple queues; according to the maximum queue depth With the selected parameter value, the lower limit of the depth range is determined.
  • the discarding module 120 is configured to obtain the type of packets buffered by multiple queues if the total cache depth reaches the first discarding threshold; according to the type of the packet, determine the jth category The total queue depth of the jth message in the queue where the message is located; j is a positive integer less than J; J is the total number of message types; if the total queue depth of the jth message reaches the value of the jth message A second drop threshold, and there is one queue for the jth message, and the queue for selecting the jth message to be cached is the target queue; and/or if the jth message is discarded The total queue depth reaches the second discard threshold of the j-th message, and there is more than one queue where the j-th message is located, and one or more queues are selected as the queue depth of the queue where the j-th message is located The target queue discards the message.
  • the discarding module 120 is configured to perform at least one of the following:
  • the overall cache depth of multiple queues is referred to as a whole, and only when the total cache depth reaches the first discard threshold, the one satisfying the discard condition is selected according to the queue depth of the queue Queue to discard packets, so, compared to the queue depth based on each queue and the drop threshold of a single queue for packet discarding, reducing the overall network equipment has a relatively large buffer space, only a certain queue Unnecessary packet dropping when the queue depth is relatively large; at the same time, when selecting the target queue for packet discarding, the target queue for discarding packets is selected based on whether the current queue depth of each queue satisfies the dropping condition In this way, it is possible to implement targeted packet discarding on the queue of packets that need to be discarded, thereby reducing the phenomenon of discarding packets that should not be discarded.
  • This example provides an improved method and device for dynamic congestion control, which aims to increase the buffer utilization, reduce the interaction between queues, and achieve the best possible congestion control effect.
  • the total buffer depth is used as the criterion for judging the discarding of packets.
  • the discarding condition is met, the queue with the highest queue depth or the largest queue depth with the highest priority and discarding the packets is selected. That is, the queue with the most severe congestion status is used. The head of the queue is discarded.
  • Header discarding refers to discarding and address collection in the queue at the exit of the queue.
  • Figure 5 shows a backpressure packet discard, including:
  • the comparator compares the received queue depth with the discard threshold found in the discard threshold table or the back pressure threshold found in the back pressure threshold table. Then, if it is greater than the drop threshold, it will be marked with a discard. If the back pressure threshold is reached, Marked with back pressure;
  • the backpressure of the queue marked with the backpressure is performed on the queue.
  • the backpressure of the message here may be: stop or reduce the buffering of the message in the backpressure marked queue.
  • the structure shown in FIG. 5 will be used to summarize the received packet depths of the N+1 queues from queue 0 to queue N, and then the total cache depth is obtained, based on the total cache depth and the first discard Comparison of thresholds determines whether packets need to be discarded. If packets need to be discarded, an appropriate target queue is selected for discarding.
  • one or more target queues with increased queue depth are selected for message backpressure.
  • the congestion control method provided in this example may include:
  • step S602 judging whether the discarding threshold of the total cache depth is significantly greater (that is, the aforementioned first discarding threshold), if not, return to step S601; if yes, go to step S603;
  • step S604 it is determined that the queue depth discards the cancellation threshold, if not, perform step S605, and if so, perform step S606;
  • the device structure includes a queue management module 701, an output scheduling module 702, and a congestion monitoring module 703.
  • the message enters the storage system through the queue management module 701 and is sent out through the output scheduling module 702.
  • the congestion monitoring module 703 receives each queue depth and total buffer depth information from the queue management module 702, makes a judgment on whether to discard the header, and feeds back to the output scheduling module 702 to perform corresponding operations.
  • the queue depth information in FIG. 7 is used to indicate the queue depth; the header discard indication is used to indicate that the corresponding queue discards the message at the exit; the queue information is used to indicate the corresponding queue.
  • a RAM Random Access Memory, random access memory
  • the number of queues at the same time uses a RAM with a depth of N+1 to count the number of dequeuing of each queue.
  • the number of dequeuing and dequeuing is the depth of the queue.
  • Two registers are used to set the discarding threshold and the revocation threshold of the head discard, which are respectively defined as: the first discarding threshold of the header (based on the total cache depth), and the discarding threshold of the queue head discard (using the single queue depth as Judgments based).
  • each queue depth is 0, and the total cache depth is 0.
  • each queue begins to have packets entering. Assuming that the nth queue bursts with large traffic at this time, the queue depth increases.
  • Partial discard operation select the one with the largest depth among all the queues, such as the nth queue, perform head discarding, until the depth of queue n is less than the set queue head discarding cancellation threshold, and stop the head discarding operation. Monitor again whether the cache depth reaches the first discarding threshold of the header, and determine whether to perform a new round of discarding the header.
  • the drop threshold is reached, the head drop operation is started, the queue with the highest queue depth q2 is selected for discarding, until the q2 depth is as low as 0x10, the discard is stopped, and the cache depth monitoring status is re-entered.
  • a look-up table entry is used to set the discarding threshold for header discarding and the single queue revocation threshold.
  • the discard threshold is reached, and the queue to be discarded is selected, the corresponding discard discard threshold of the queue is found and used according to the queue number table. In this way, according to the characteristics of the traffic corresponding to the actual use queues, each queue has an independent cancellation threshold.
  • a block of RAM with a depth of N+1 (total number of available queues in the system) is used to set the discard revocation threshold according to the actual application status.
  • Each address corresponds to a queue number, and the discard revocation threshold actually used by each queue is saved.
  • the queue number to be discarded is selected as i, and then the independent discard cancellation threshold corresponding to the queue is found in the i address of the RAM of the cancellation threshold table RAM. Determine whether the queue depth is lower than the revocation threshold. When the depth is lower than the threshold, stop the operation of discarding packets and enter the discard monitoring process again.
  • the first discard threshold of the header can be set to 0x2800.
  • the first discard threshold to start the discard operation, select the queue with the highest depth q0 to discard, until the depth of q0 is as low as 0x30, that is, the entry corresponding to the threshold table address a0 is revoked and the discard is stopped.
  • the queue discard revocation threshold table in FIG. 9 stores the revocation threshold of the previous queue.
  • the selection criteria for discarding queues can be set, that is, instead of a single selection of the queue with the highest depth for discarding, it can select the lowest priority within a certain depth range [a, b] The queue is discarded.
  • add a depth selection range register x which is used to set the range for selecting the discard queue.
  • the queue depth is taken as y, then in the range of [yx, y], that is, the queue with the queue depth satisfying greater than (yx) and less than or equal to y, select the queue with the lowest priority to start throw away. If there are multiple queues with the same priority, the one with the highest queue depth is selected and discarded.
  • the system After the discard operation is cancelled by the queue, the system enters the monitoring process of discard judgment again.
  • the single-queue discard threshold is 0x10.
  • the highest depth queue q0 0x1000, select the queue depth range [0x1000, 0x1000-0x800], select the queue q0 ⁇ q2, where the low priority queue is q1, q2, and q1>q2, then choose to discard the packets in q1 until The depth of q1 is as low as 0x10, and it is discarded.
  • the data types of head discard monitoring can also be divided according to the actual situation.
  • Unicast and multicast can be handled separately, that is, in addition to the total cache first discard threshold, independent unicast first discard threshold and multicast first discard threshold can be set.
  • the multicast channel is congested downstream.
  • the output scheduling module 702 receives the queue information from the queue management module 701, selects the queue in combination with the scheduling scheme configured by the system, and at the same time accepts the head discard instruction of the congestion monitoring module 703, and determines the scheduling instruction of the queue—output or head discard.
  • the congestion monitoring module 703 performs total buffer depth calculation and deepest queue screening based on all the queue depth information sent by the queue management module 701, triggers head drop monitoring, and issues an instruction to the output scheduling module 702 whether a queue is head dropped according to the process .
  • the device can be used to refine and adjust on the basis of the above method, and combine various conditions to select the queue to be discarded. For example, queue selection and discarding can be combined with data type or queue priority, and even a certain set of queues can be selected for discarding. Based on this solution and device, it is possible to expand the scope of the selection method of the discard queue according to the actual situation and use it in more scenarios that need to be adjusted.
  • this embodiment provides a network device, including:
  • the memory 1102 is configured to store messages and computer executable instructions
  • the processor 1103 is respectively connected to the network interface and the memory, and is configured to control the sending and receiving of the network interface by executing the computer to store executable instructions, and can implement the congestion control method provided by any of the foregoing embodiments For example, the congestion control method provided by one or more embodiments shown in FIGS. 1 to 3 and 5 to 7 may be performed.
  • This embodiment also provides a computer storage medium that stores computer-executable instructions; after the computer-executable instructions are executed, the congestion control method provided in any of the foregoing embodiments can be implemented, for example, executable The congestion control method provided by one or more embodiments shown in FIGS. 1 to 3 and 5 to 7.
  • the computer storage medium provided in this embodiment may be a non-transitory storage medium.
  • the disclosed device and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the units is only a division of logical functions.
  • the coupling or direct coupling or communication connection between the displayed or discussed components may be through some interfaces, and the indirect coupling or communication connection of the device or unit may be electrical, mechanical, or other forms of.
  • the above-mentioned units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual conditions to achieve the objectives of the solution of this embodiment.
  • the functional units in the embodiments of the present invention may all be integrated into one processing module, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above integration
  • the unit can be implemented in the form of hardware, or in the form of hardware plus software functional units.
  • computer storage media includes both volatile and nonvolatile implemented in any method or technology for storing information such as computer readable instructions, data structures, program modules, or other data Sexual, removable and non-removable media.
  • Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, magnetic tape, magnetic disk storage or other magnetic storage devices, or may Any other medium for storing desired information and accessible by a computer.
  • the communication medium generally contains computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium .

Landscapes

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

Abstract

一种拥塞控制方法及装置、网络设备及存储介质。所述拥塞控制方法,包括:获取多条队列的总缓存深度;若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度满足丢弃条件的目标队列丢弃报文。

Description

拥塞控制方法及装置、网络设备及存储介质 技术领域
本文涉及通信技术领域但不限于通信技术领域,尤其涉及一种拥塞控制方法及装置、网络设备及存储介质。
背景技术
拥塞是通信过程中尽可能避免的现象。例如,使用交换接入(Switching Access,SA)芯片收到来自交换网的大量报文。按照一定的方式把这些报文缓存在不同的队列中,并以一定的调度规则将不同队列内的报文调度输出。当下级接收模块产生流控反压信号或者数据流整形时,即导致队列的输入速率大于队列的调度输出速率时,会造成队列深度的累积,形成缓存拥塞。这时使用拥塞处理策略对进入该队列的报文进行反压或者丢弃处理,以免造成系统的资源的过分占用,最终影响相关的数据流处理功能。一些通过报文丢弃的方式进行拥塞缓解的方案,有时候对于整个设备而言缓存空间还很充足无需丢弃报文的情况下,也丢弃了报文。
发明概述
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
有鉴于此,本发明实施例期望提供一种拥塞控制方法及装置、网络设备及存储介质。
一种拥塞处理方法,包括:
获取多条队列的总缓存深度;若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度满足丢弃条件的目标队列丢弃报文。
一种拥塞处理装置,包括:
获取模块,设置为获取多条队列的总缓存深度;
丢弃模块,设置为若所述总缓存深度达到第一丢弃门限,从所述多条队 列中选择队列深度满足丢弃条件的目标队列丢弃报文。
一种网络设备,包括:
网络接口,设置为收发报文;
存储器,设置为存储报文和计算机存储可执行指令;
处理器,分别与所述网络接口及所述存储器连接,设置为通过执行所述计算机存储可执行指令,控制所述网络接口的收发报文并执行前述任意实施例提供的拥塞控制方法。
一种计算机存储介质,所述计算机存储介质存储有计算机可执行指令;所述计算机可执行指令被执行后,能够实现前述拥塞控制方法。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1为本发明实施例提供的第一种拥塞控制方法的流程示意图;
图2为本发明实施例提供的第二种拥塞控制方法的流程示意图;
图3为本发明实施例提供的第三种拥塞控制方法的流程示意图;
图4为本发明实施例提供的一种拥塞控制装置的结构示意图;
图5为本发明实施例提供的一种报文丢弃的示意图;
图6为本发明实施例提供的第四种拥塞控制方法的流程示意图;
图7为本发明实施例提供的第五种拥塞控制方法的流程示意图;
图8为本实施例提供的一种报文的队列深度示意图;
图9为本实施例提供的队列和队列丢弃撤销门限表的对应示意图;
图10为本实施例提供的一种深度范围筛选的示意图;
图11为本发明实施例提供的一种网络设备。
详述
以下结合说明书附图及实施例进行阐述。
如图1所示,本实施例提供一种拥塞处理方法,包括:
步骤S110:获取多条队列的总缓存深度;
步骤S120:若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度满足丢弃条件的目标队列丢弃报文。
在本实施例中,所述拥塞处理方法可以应用于多种具有报文收发功能的网络设备中,例如,交换机的交换芯片或者路由器的路由芯片中。
在本实施例中,判断是否出现拥塞是根据多条队列的总缓存深度来的确定的。例如,在网络设备中配置有M条队列,所述总缓存深度为M条队列的队列深度之和。所述队列深度取决于队列所缓存的报文数目;报文数目越大则队列深度越大。
如此,若一个网络设备中多条队列的总缓存深度过大,例如,总缓存深度大于第一丢弃门限,才会使得整个网络设备的报文收发出现拥堵状况,故在本实施例中,只有在总缓存深度大于第一丢弃门限,再根据每条队列的队列深度来选择满足丢弃条件的队列作为目标队列,并丢弃目标队列的报文。如此,本实施例提供的方法,相对于每条队列分别设置丢弃门限,若某一条队列的队列深度很大,而剩余队列的队列深度很小时,网络设备是有足够的缓存空间继续保存队列深度很大的队列的报文的,且网络设备继续保存该深度很大的队列的报文,并不会影响其他队列的报文收发,故若基于单队列的丢弃门限进行报文丢弃,则该深度很大的队列自然会丢弃报文,导致了不必要的报文丢弃,这种丢弃是可以避免的。而在本实施例中,考虑的是网络设备内多条队列的整体缓存深度(即所述总缓存深度),若该总缓存深度大于第一丢弃报文,才确认该网络设备整体上出现了拥塞,则根据每条队列的队列深度选择合适的队列(即选择满足丢弃条件的队列)有针对性的丢弃报文,如此,一方面减少了不必要报文的丢弃,另一方面实现了有针对性的丢弃报文。
在一些实施例中,如图2所示,所述方法还包括:
步骤S130:若目标队列丢弃报文之后的队列深度达到撤销门限,则停止所述目标队列的报文丢弃。
在本实施例中,不仅设置了第一丢弃门限,还设置了撤销门限,该撤销门限是用于撤销报文丢弃的。若选择一条或多条队列作为目标队列进行报文丢弃,在丢弃报文时不是一次性将该条队列的所有报文丢弃,而是会根据撤销门限来确定,若目标队列丢弃一个或多个报文之后,队列深度低于或小于撤销门限,则说明拥塞得到缓解,目标队列可停止丢弃报文,以减少不必要的报文丢弃。
在本发明实施例中,被选择作为丢弃报文的目标队列的队列均是当前时刻报文队列大于撤销门限的队列。
在本实施例中,所述队列为先进先出队列;所述步骤S120可包括:
若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度满足丢弃条件的目标队列丢弃队列出口处的报文。
在本实施例中,队列为先进先出队列,如此,当前位于队列出口处的报文为最先进入到队列中的报文,也就是最旧的报文。在本实施例中,为了优先老旧报文的丢弃,目标队列会优先选择队列出口处的报文进行丢弃;如此,减少了长时间堆积在队列中大数据量报文或者难以成功发送的报文长期占据缓存空间加剧拥塞的现象。
在还有一些实施例中,一个队列中的报文可能有不同的报文优先级,目标队列在丢弃报文时,可以选择当前时刻报文优先级最低的报文优先丢弃;依次类推,直到目标队列的队列深度达到撤销门限。
在一些实施例中,所述步骤S120可包括:若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度最大的队列为所述目标队列丢弃报文。
在本实施例中,满足丢弃条件的目标队列为:多条队列中队列深度最大的队列,即当前包括报文最多的队列。
在一些实施例中,所述步骤S120可包括:
确定每条队列的撤销门限;
若第i条队列的队列深度大于所述撤销门限,则选择第i条队列丢弃报文,其中,i为小于I的正整数,I为队列的总条数。
在一些实施例中,在网络设备中为每一条队列配置了一个第一寄存器,该第一寄存器设置为分别记录每一条队列的撤销门限,如此,不同的队列的撤销门限可相同或不同,但是不同队列的撤销门限是不共享的。
在还有一些实施例中,多条队列共享一个撤销门限,例如,多条队列分别是队列A、队列B及队列C;队列A和队列B及队列C的撤销门限是共享的,且仅有一个撤销门限。例如,所述网络设备为多个队列设置了第二寄存器,该第二寄存器存储有被多条队列共享的撤销门限。
若第i条队列的队列深度大于撤销门限,则第i条队列将作为需要丢弃报文的目标队列。如此,若有多个队列均大于了各自的撤销门限,则这些队列都为目标队列,均会丢弃报文;如此,可以快速的缓解网络设备内的拥塞。
在一些实施例中,如图3所示,所述步骤S120可包括:
步骤S121:确定用于选择所述目标队列的深度范围;
步骤S122:从所述多条队列中选择出深度位于所述深度范围内的备选队列;
步骤S123:若存在一条所述备选队列,选择所述备选队列为目标队列丢弃报文;
和/或,
步骤S124:若存在多条所述备选队列,根据所述备选队列的队列优先级,选择队列优先级最低的队列为所述目标队列丢弃报文。
在本实施例中,在选择满足丢弃条件的目标队列时,首先会确定一个选择目标队列的深度范围,若某一个队列的队列深度位于该深度范围内,则将该队列作为备选队列;然后根据备选队列的数目选择目标队列进行报文丢弃。
所述根据备选队列的数目选择目标队列进行报文丢,包括:
若仅存在一条备选队列,则说明该备选队列的队列深度实在过大,直接利用该备选队列作为目标队列进行报文丢弃。
若存在多条备选队列,则可以根据队列优先级从备选队列选择目标队列进行报文丢弃。
在本实施例中,若存在多条备选队列,并非所有的备选队列都作为目标队列,而是会根据备选队列的队列优先级来选择目标队列。若一个队列的队列优先级越低,则说明该队列中报文收发的紧急程度越低,或者,报文的重要性越低,故在本实施例中,若存在多个备选队列,则选择队列优先级最低的队列作为目标队列丢弃报文。
在一实施方式中,所述步骤S120还可包括:
步骤S125:若多条所述备选队列的队列优先级相同,则选择所述队列深度最大的所述备选队列为所述目标队列丢弃报文。
若多个备选队列的队列优先级相同,则说明备选队列中的报文重要性或收发紧急程度相同,此时,优先选择队列深度最大的备选队列作为目标队列,如此,相当于选择了对拥塞影响程度最大的队列进行报文丢弃。
在一些实施例中,所述步骤S121可包括:
确定所述深度范围的选择参数值;
根据所述多条队列中的最大队列深度,确定所述深度范围的上限;
根据所述最大队列深度与所述选择参数值,确定深度范围的下限。
在本实施例中,所述网络设备中可以设置一个或多个第三寄存器,该第三寄存器可以设置为存储所述选择参数值。该选择参数可为加权参数和/或加权因子。
多条队列都有队列深度,这些队列深度可能相同也可能不同,但是通过比较等逻辑运算,可以得到最大队列深度。该队列最大深度可以直接作为深度范围的上限,也可以是作为计算深度上限的已知量。例如,以A倍所述最大队列深度作为所述深度上限,A可为大于或等于1的正整数。
在确定深度范围的下限时,可以直接求解所述最大队列深度与加权参数的差值,得到所述下限。例如,最大队列深度为H,所述鉴权参数为h,则所述下限可为H-h,如此,深度范围可为:H至H-h。
若所述选择参数值为比例值,则所述下限可为H*h,则深度范围可为:H至H*h,则此时h的取值范围为0到1之间的正数。
在一些实施例中,所述步骤S120可包括:
若所述总缓存深度达到第一丢弃门限,获取多条队列缓存的报文的类型;
根据所述报文的类型,确定出第j类报文所在队列的第j类报文总队列深度;j为小于J的正整数;J为报文的类型总数;
若所述第j类报文总队列深度达到所述第j类报文的第二丢弃门限,且所述第j类报文所在队列为一条,选择缓存所述第j类报文的队列为所述目标队列丢弃报文;和/或,若所述第j类报文总队列深度达到所述第j类报文的第二丢弃门限,且所述第j类报文所在队列不止一条,根据所述第j类报文所在队列的队列深度选择一个或多条队列作为所述目标队列丢弃报文。
在本实施例中会区分报文类型进行目标队列的选择和报文丢弃。
所述报文按照类型区分可包括:单播报文、组播报文和/或广播报文。
在本实施例中,所述第j类报文可为单播报文、组播报文和广播报文中的任意一种。
若所有队列的总缓存深度大于第一丢弃门限,则会看每类型报文的总队列深度,若总队列深度大于第二丢弃门限,则会自动从该类型报文的队列中选择一个或多个作为丢弃报文的目标队列。其中,所述第二丢弃门限小于所述第一丢弃门限。
例如,当前网络设备中缓存单播报文和组播报文,若总缓存深度大于所述第一丢弃门限,分别查看单播报文和组播报文所在队列的总队列深度,若单播报文所在队列的总队列深度达到第二丢弃门限,但组播报文所在队列的总队列深度未达到第二丢弃报文,则从缓存单播报文的队列中选择一个或多个目标队列进行报文丢弃。
在一些实施例中,不同类型的报文的第二丢弃门限可共享,在还有一些实施例中不同类型报文的第二丢弃门限可分别设置。
在一实施方式中,所述若所述第j类报文总队列深度达到所述第j类报文的第二丢弃门限,根据所述第j类报文所在队列的队列深度选择一个或多条队列作为所述目标队列丢弃报文,包括以下至少之一:
若所述第j类报文总队列深度达到所述第j类报文的第二丢弃门限,从 所述第j类报文所在队列中选择队列深度最大的队列为目标队列丢弃报文;
若所述第j类报文总队列深度达到所述第j类报文的第二丢弃门限,从所述第j类报文所在队列中选择队列深度大于撤销门限且队列优先级最低的一个或多条队列作为所述目标队列丢弃报文。
如此,若第j类报文所在队列不止一条时,会根据队列优先级及队列深度来选择一个或多个第j类报文所在队列进行报文丢弃。
如图4所示,本实施例提供一种拥塞处理装置,包括:
获取模块110,设置为获取多条队列的总缓存深度;
丢弃模块120,设置为若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度满足丢弃条件的目标队列丢弃报文。
在一些实施例中,所述获取模块110及丢弃模块120可为程序模块,所述程序模块被处理器执行后,能够实现所述总缓存深度的确定及选择出目标队列并丢弃报文。
在还有一些实施例中,所述获取模块110及丢弃模块120可为软硬结合模块,所述软硬结合模块可为多种可编程阵列;所述可编程阵列可包括:复杂可编程阵列和/或现场可编程阵列。
在另外一些实施例中,所述获取模块110及丢弃模块120可为纯硬件模块,所述纯硬件模块可为专用集成电路。
在一些实施例中,所述装置包括:
停止模块,设置为若目标队列丢弃报文之后的队列深度达到撤销门限,则停止所述目标队列的报文丢弃。
在一些实施例中,所述队列为先进先出队列;
所述丢弃模块120,设置为若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度满足丢弃条件的目标队列丢弃队列出口处的报文。
在一些实施例中,所述丢弃模块120,设置为若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度最大的队列为所述目标队列丢弃报文。
在一些实施例中,所述丢弃模块120,设置为确定每条队列的撤销门限;若第i条队列的队列深度大于所述撤销门限,则选择第i条队列丢弃报文,其中,i为小于I的正整数,I为队列的总条数。
在还有一些实施例中,所述丢弃模块120,设置为确定用于选择所述目标队列的深度范围;从所述多条队列中选择出深度位于所述深度范围内的备选队列;若存在一条所述备选队列,选择所述备选队列为目标队列丢弃报文;和/或,若存在多条所述备选队列,根据所述备选队列的队列优先级,选择队列优先级最低的队列为所述目标队列丢弃报文。
在一实施方式中,所述丢弃模块120,设置为若多条所述备选队列的队列优先级相同,则选择所述队列深度最大的所述备选队列为所述目标队列丢弃报文。
在一些实施例中,所述丢弃模块120,设置为确定所述深度范围的选择参数值;根据所述多条队列中的最大队列深度,确定所述深度范围的上限;根据所述最大队列深度与所述选择参数值,确定深度范围的下限。
在一些实施例中,所述丢弃模块120,设置为若所述总缓存深度达到第一丢弃门限,获取多条队列缓存的报文的类型;根据所述报文的类型,确定出第j类报文所在队列的第j类报文总队列深度;j为小于J的正整数;J为报文的类型总数;若所述第j类报文总队列深度达到所述第j类报文的第二丢弃门限,且所述第j类报文所在队列为一条,选择缓存所述第j类报文的队列为所述目标队列丢弃报文;和/或,若所述第j类报文总队列深度达到所述第j类报文的第二丢弃门限,且所述第j类报文所在队列不止一条,根据所述第j类报文所在队列的队列深度选择一个或多条队列作为所述目标队列丢弃报文。
在另一些实施例中,所述丢弃模块120,设置为执行以下至少之一:
若所述第j类报文总队列深度达到所述第j类报文的第二丢弃门限,从所述第j类报文所在队列中选择队列深度最大的队列为目标队列丢弃报文;
若所述第j类报文总队列深度达到所述第j类报文的第二丢弃门限,从所述第j类报文所在队列中选择队列深度大于撤销门限且队列优先级最低的 一个或多条队列作为所述目标队列丢弃报文。
通过本发明实施例,在进行报文的拥塞控制时,会整体参看多条队列的总缓存深度,在总缓存深度达到第一丢弃门限的情况下,才根据队列的队列深度选择满足丢弃条件的队列来丢弃报文,如此,相对于基于每一个队列的队列深度和单一队列的丢弃门限进行报文丢弃,减少了在网络设备整体而言还有比较大的缓存空间,仅是某个队列的队列深度比较大的情况下不必要的报文丢弃现象;与此同时,在选择报文丢弃的目标队列时,再根据每条队列当前的队列深度是否满足丢弃条件来选择丢弃报文的目标队列,如此可以实现针对性对有需要丢弃的报文的队列进行报文丢弃,从而减少丢弃了不该丢弃的报文的现象。
以下结合上述任意实施例提供几个示例:
示例1:
本示例提供了一种改进的动态拥塞控制方法和装置,旨在提高缓存利用率,减少队列间的相互影响,尽可能达成最佳的拥塞控制效果。
本实施例提供的拥塞控制方法可包括:
以总缓存深度作为报文丢弃的判断标准,在达到丢弃条件的情况下,挑选队列深度最大或队列深度最够大且优先级交底的队列进行报文丢弃,即拥塞状况最严峻的队列,进行队列头部丢弃。
头部丢弃是指在队列的出口处,对队列中的报文进行丢弃和地址回收。
设定队列的丢弃撤销门限,即该处于头部丢弃的队列深度低于撤销门限的时候,停止对该队列的丢弃操作。重新进入之前的总缓存深度判断,如此循环直至不再达到报文丢弃的标准。
如图5所示为一种反压方式的报文丢弃,包括:
队列0至队列N分别将自身的队列深度上报给比较器,
比较器将接收到的队列深度与丢弃门限表中查到的丢弃门限或反压门限表中查到的反压门限进行比较,然后大于丢弃门限的就打上丢弃标记,若达 到反压门限的就打上反压标记;
丢弃打上丢弃标记队列中的报文;
对打上了反压标记的队列进行该队列的报文反压,此处的报文反压可为:停止或减小报文缓存到反压标记的队列中。
在本实例中,会利用图5所示的结构,将接收到的队列0至队列N这N+1个队列的报文深度汇总之后,求取出总缓存深度,基于总缓存深度与第一丢弃门限的比较,确定是否需要丢弃报文,若需要丢弃报文则选择合适的目标队列进行丢弃。
在还有一些实施例中,若缓存深度大于总的反压门限,则选择出一个或多个队列深度加大的目标队列进行报文反压。
如图6所示,本示例提供的拥塞控制方法,可包括:
S601,开始检测总缓存深度;
S602,判断是否大大总缓存深度的丢弃门限(即前述的第一丢弃门限),若否返回步骤S601;若是进入步骤S603;
S603,找出深度最大队列;
S604,判断是队列深度丢弃撤销门限,若否执行步骤S605,若是执行步骤S606;
S605,进行头部丢弃(即将队列出口处的报文丢弃)。
S606,停止丢弃报文。
如图7所示,本示例提出一种动态拥塞避免的装置,该装置结构包括:队列管理模块701,输出调度模块702,拥塞监控模块703。报文通过队列管理模块701进入存储系统,经由输出调度模块702送出。拥塞监控模块703,接收来自队列管理模块702的每条队列深度和总缓存深度信息,做出是否进行头部丢弃的判断,反馈给输出调度模块702进行相应操作。图7中的队列深度信息用于指示队列深度;头部丢弃指示,用于指示对应的队列丢弃出口处的报文;队列信息用于指示对应的队列。
示例2:
以图5队列拥塞管理工作示意图为例,假设该系统中队列的数量为N+1,则采用一块深度为N+1的RAM(Random Access Memory,随机存取存储器)统计每条队列的入队个数,同时采用一块深度为N+1的RAM统计每条队列的出队个数,入队个数与出队个数相减即为该队列的深度。
方式一:
用两个寄存器用于设定头部丢弃的丢弃门限以及撤销门限,分别定义为:头部第一丢弃门限(以总缓存深度为判断依据),队列头部丢弃撤销门限(以单队列深度为判断依据)。
在系统初始化完成后,每个队列深度都为0,总缓存深度为0。
系统开始工作后,每个队列开始有报文进入,假设此时第n个队列突发大流量,队列深度增大。
当总缓存较空闲,即使该队列达到队列第一丢弃门限,也不会影响其他队列数据流的处理。如果总缓存使用率较高,即多条队列产生拥塞深度较大或者第n个队列的队列第一丢弃门限设置过大,使得总缓存深度达到设定的头部第一丢弃门限,则触发头部丢弃操作:选择所有队列中深度最大的一条,比如第n个队列,进行头部丢弃,直至队列n的深度小于设定的队列头部丢弃撤销门限,停止头部丢弃操作。再次监控缓存深度是否达到头部第一丢弃门限,判断是否进行新一轮的头部丢弃操作。
如总缓存地址深度为0x3000,可设置头部丢弃触发的当前缓存深度门限n_th=0x2800,丢弃撤销门限0x10。如图8,当前存在三条数据队列q0、q1、q2,由于下行通路拥塞,三条队列深度不断增加直至q0=0x800,q1=0xc00,q2=0x1400,q0+q1+q2=n_th,达到总缓存第一丢弃门限,开始头部丢弃操作,选择队列深度最高队列q2进行丢弃,直至q2深度低至0x10,停止丢弃,重新进入缓存深度的监控状况。
方式二:
用查找表项的方式实现头部丢弃的丢弃门限以及单队列撤销门限值设定。当达到丢弃门限,并选出需要丢弃的队列后,根据队列号查表找出该队列对应的丢弃撤销门限并使用。该方式针对实际使用队列对应流量不同的特点, 设置了每条队列独立的撤销门限。
用一块深度为N+1(系统中的可用队列总数)的RAM,根据实际应用状况设定丢弃撤销门限,每个地址对应一个队列号,保存了每个队列实际使用的丢弃撤销门限。当触发头部丢弃后,选出待丢弃队列号为i,则在撤销门限表RAM的i地址,找到该队列对应的独立丢弃撤销门限。判断队列深度是否低于该撤销门限,直至深度低于该门限时,停止丢弃报文的操作,再次进入丢弃监控流程。
如总缓存地址深度0x3000,可设置头部第一丢弃门限0x2800。如图9,配置队列丢弃撤销门限表中地址a0~a2(对应队列q0~q2)的表项,a0=0x30,a1=0x20,a3=0x10。假设有三条数据流分别进入q0~q2三条队列,当下行通路拥塞,q0~q2的深度不断增加,直至q0=0x1800,q1=0x800,q2=0x800,q0+q1+q2=0x2800,达到头部第一丢弃门限,启动丢弃操作,则选择深度最高的队列q0进行丢弃,直至q0的深度低至0x30即撤销门限表地址a0对应的表项,停止丢弃。图9中的队列丢弃撤销门限表存储了前队列的撤销门限。
方式三:
结合方式一或二,针对丢弃队列的挑选准则可设定,即:不再是单一选择深度最高的队列进行丢弃,而是可在一定的深度范围[a,b]内,挑选优先级最低的队列进行丢弃。
如:增加一个深度选择范围寄存器x,用于设定挑选丢弃队列的范围。当找到深度最高队列后,取其队列深度为y,则在[y-x,y]这个范围内,即在队列深度满足大于等(y-x),小于等于y的队列中,挑选优先级最低的队列开始丢弃。若存在多个同优先级的队列,则挑选其中队列深度最高的进行丢弃。
在直至该队列撤销丢弃操作后,系统再次进入丢弃判断的监控流程中。
假设结合方式一中的场景缓存地址深度0x3000,第一丢弃门限n_th=0x2800。如图10,数据流q0~q3四条队列,单队列丢弃的撤销门限0x10。设置四条队列的优先级q0>q1=q2=q3,深度范围选择器x=0x800。当下行通路拥塞,四条队列缓存深度不断增加,直至q0=0x1000,q1=0xc00,q2=0x800,q3=0x400,q0+q1+q2+q3=0x2800,达到头部第一丢弃门限n_th,进入丢弃队 列选择。深度最高队列q0=0x1000,选择队列深度范围[0x1000,0x1000-0x800],入选队列q0~q2,其中低优先级队列为q1、q2,又q1>q2,则选择丢弃q1中的报文,直至q1的深度低至0x10,撤销丢弃。
还可以剔除掉高优先级队列,仅在低优先级队列范围挑选和丢弃。图10中所示的优先级为队列优先级。
方式四:
结合上述的方式,还可以根据实际情况进行头部丢弃监测的数据类型进行划分。可以把单播,组播分开处理,即除了总缓存第一丢弃门限外,设定独立的单播第一丢弃门限和组播第一丢弃门限。
如结合方式一的撤销方式:如总缓存n=0x3000的地址深度,可设定总缓存第一丢弃门限n_th=0x2800,单播第一丢弃门限u_th=0x1800,组播第一丢弃门限m_th=0x1800,丢弃撤销门限设为0x10。
假设当前有单播u0和组播m0两条数据流混发,根据不同的出向拥塞情形,不同的门限发挥作用:
单播通路下行拥塞。当近单播通路拥塞的时候,单播占用的缓存地址深度不断提高直至达到第一丢弃门限,组播占用的地址深度正常,如u0深度0x1800,m0深度0x100,则总缓存深度u0+m0=0x1900。此情形下组播数据流正常,仅触发单播头部丢弃,开始丢弃单播队列中的报文,直至单播队列地址占用深度降低到u0=0x10,撤销丢弃操作,重新进入头部丢弃的监控状态。
组播通路下行拥塞。情形与单播类似,如组播m0深度达到0x1800,单播u0队列深度0x100,则总缓存深度u0+m0=0x1900。此时对组播进行头部丢弃,直至深度低至m0=0x10,撤销丢弃操作。
整体通路下行拥塞。如单播和组播的流量接近时,由于整体下行通路拥塞,单组播都在堆积,直至单播u0=0x1300,m0=0x1500,u0+m0=0x2800,则触发总缓存头部丢弃,选择当前缓存中深度最高的队列,即组播队列m0开始丢弃,直至m0深度降至0x10,撤销组播报文丢弃。
其他方式:
以上仅列出几则使用范例,针对门限设置,队列挑选等节点的边界设定和判断,存在很多可行方法,可根据实际情况进行调整,在此无法一一列举完全。
队列管理模块701对输入的报文进行分队列存储,统计出每条队列深度传递给拥塞监控模块703,同时将调度相关的队列信息传递给输出调度模块702并接受其调度指令输出或者头部丢弃相应队列的报文。
输出调度模块702接收来自队列管理模块701的队列信息,结合系统配置的调度方案进行队列选择,同时接受拥塞监控模块703的头部丢弃指示,决定该队列的调度指令——输出或头部丢弃。
拥塞监控模块703根据队列管理模块701送来的全部队列深度信息,进行总缓存深度计算和最深队列筛选,触发头部丢弃监控,根据流程向输出调度模块702发出某队列是否进行头部丢弃的指示。
可以利用该装置在上述方法的基础上细化及调整,结合多种条件挑选出所需丢弃的队列。比如,结合数据类型或者结合队列优先级进行队列选择和丢弃,甚至可以选择某个设定的队列进行丢弃等等。以此方案和装置为基础,可根据实际情况,扩大丢弃队列的选择方式的范围,用于更多需要调整的场景。
如图11所示,本实施例提供一种网络设备,包括:
网络接口1101,设置为收发报文;
存储器1102,设置为存储报文和计算机存储可执行指令;
处理器1103,分别与所述网络接口及所述存储器连接,设置为通过执行所述计算机存储可执行指令,控制所述网络接口的收发报文并能够实现前述任意一个实施例提供的拥塞控制方法,例如,可执行如图1至图3及图5至图7所示的一个或多个实施例提供的拥塞控制方法。
本实施例还提供一种计算机存储介质,所述计算机存储介质存储有计算机可执行指令;所述计算机可执行指令被执行后,能够实现前述任意一个实施例提供的拥塞控制方法,例如,可执行如图1至图3及图5至图7所示的一个或多个实施例提供的拥塞控制方法。
本实施例提供的计算机存储介质可为非瞬间存储介质。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的情况选择其中的部分或全部单元来实现本实施例方案的目的。
另外,在本发明各实施例中的各功能单元可以全部集成在一个处理模块中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、 磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。

Claims (13)

  1. 一种拥塞处理方法,包括:
    获取多条队列的总缓存深度;
    若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度满足丢弃条件的目标队列丢弃报文。
  2. 根据权利要求1所述的方法,其中,所述方法还包括:
    若目标队列丢弃报文之后的队列深度达到撤销门限,则停止所述目标队列的报文丢弃。
  3. 根据权利要求1所述的方法,其中,所述队列为先进先出队列;
    所述若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度满足丢弃条件的目标队列丢弃报文,包括:
    若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度满足丢弃条件的目标队列丢弃队列出口处的报文。
  4. 根据权利要求1至3任一项所述的方法,其中,
    所述若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度满足丢弃条件的目标队列丢弃报文,包括:
    若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度最大的队列为所述目标队列丢弃报文。
  5. 根据权利要求1至3任一项所述的方法,其中,所述若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度满足丢弃条件的目标队列丢弃报文,包括:
    确定每条队列的撤销门限;
    若第i条队列的队列深度大于所述撤销门限,则选择第i条队列丢弃报文,其中,i为小于I的正整数,I为队列的总条数。
  6. 根据权利要求1至3任一项所述的方法,其中,所述若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度满足丢弃条件的目标队列丢弃报文,包括:
    确定用于选择所述目标队列的深度范围;
    从所述多条队列中选择出深度位于所述深度范围内的备选队列;
    若存在一条所述备选队列,选择所述备选队列为目标队列丢弃报文;若存在多条所述备选队列,根据所述备选队列的队列优先级,选择队列优先级最低的队列为所述目标队列丢弃报文。
  7. 根据权利要求6所述的方法,其中,所述若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度满足丢弃条件的目标队列丢弃报文,还包括:
    若多条所述备选队列的队列优先级相同,则选择所述队列深度最大的所述备选队列为所述目标队列丢弃报文。
  8. 根据权利要求6所述的方法,其中,所述确定用于选择所述目标队列的深度范围,包括:
    确定所述深度范围的选择参数值;
    根据所述多条队列中的最大队列深度,确定所述深度范围的上限;
    根据所述最大队列深度与所述选择参数值,确定深度范围的下限。
  9. 根据权利要求1至3任一项所述的方法,其中,所述若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度满足丢弃条件的目标队列丢弃报文,包括:
    若所述总缓存深度达到第一丢弃门限,获取多条队列缓存的报文的类型;
    根据所述报文的类型,确定出第j类报文所在队列的第j类报文总队列深度;j为小于J的正整数;J为报文的类型总数;
    若所述第j类报文总队列深度达到所述第j类报文的第二丢弃门限,且所述第j类报文所在队列为一条,选择缓存所述第j类报文的队列为所述目标队列丢弃报文;若所述第j类报文总队列深度达到所述第j类报文的第二丢弃门限,且所述第j类报文所在队列不止一条,根据所述第j类报文所在队列的队列深度选择一个或多条队列作为所述目标队列丢弃报文。
  10. 根据权利要求9所述的方法,其中,所述若所述第j类报文总队列 深度达到所述第j类报文的第二丢弃门限,且所述第j类报文所在队列不止一条,根据所述第j类报文所在队列的队列深度选择一个或多条队列作为所述目标队列丢弃报文,包括以下至少之一:
    若所述第j类报文总队列深度达到所述第j类报文的第二丢弃门限,从所述第j类报文所在队列中选择队列深度最大的队列为目标队列丢弃报文;
    若所述第j类报文总队列深度达到所述第j类报文的第二丢弃门限,从所述第j类报文所在队列中选择队列深度大于撤销门限且队列优先级最低的一个或多条队列作为所述目标队列丢弃报文。
  11. 一种拥塞处理装置,包括:
    获取模块,设置为获取多条队列的总缓存深度;
    丢弃模块,设置为若所述总缓存深度达到第一丢弃门限,从所述多条队列中选择队列深度满足丢弃条件的目标队列丢弃报文。
  12. 一种网络设备,包括:
    网络接口,设置为收发报文;
    存储器,设置为存储报文和计算机存储可执行指令;
    处理器,分别与所述网络接口及所述存储器连接,设置为通过执行所述计算机存储可执行指令,控制所述网络接口的收发报文并执行权利要求1至10任一项提供的方法。
  13. 一种计算机存储介质,所述计算机存储介质存储有计算机可执行指令;所述计算机可执行指令被执行后,能够实现权利要求1至10任一项提供的方法。
PCT/CN2019/106060 2018-12-12 2019-09-17 拥塞控制方法及装置、网络设备及存储介质 WO2020119202A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811519766.5A CN111314240B (zh) 2018-12-12 2018-12-12 拥塞控制方法及装置、网络设备及存储介质
CN201811519766.5 2018-12-12

Publications (1)

Publication Number Publication Date
WO2020119202A1 true WO2020119202A1 (zh) 2020-06-18

Family

ID=71076780

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/106060 WO2020119202A1 (zh) 2018-12-12 2019-09-17 拥塞控制方法及装置、网络设备及存储介质

Country Status (2)

Country Link
CN (2) CN111314240B (zh)
WO (1) WO2020119202A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111865716A (zh) * 2020-06-30 2020-10-30 新华三信息技术有限公司 一种端口拥塞检测方法、装置、设备及机器可读存储介质
CN113973085A (zh) * 2020-07-22 2022-01-25 华为技术有限公司 一种拥塞控制方法和装置
CN116055420A (zh) * 2022-12-07 2023-05-02 蔚来汽车科技(安徽)有限公司 整合办公网络与工业网络后的信息传输方法及控制装置

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113923169A (zh) * 2021-10-11 2022-01-11 浙江大华技术股份有限公司 报文的过滤方法及装置、存储介质、电子装置
CN117499314B (zh) * 2024-01-03 2024-03-19 南京信息工程大学 基于平均队列长度变化趋势的网络自适应拥塞控制方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1819577A (zh) * 2005-01-24 2006-08-16 阿尔卡特公司 通信业务管理系统和方法
CN101056261A (zh) * 2007-05-21 2007-10-17 中南大学 多速率无线局域网中接入节点的主动拥塞处理方法
WO2014155043A1 (en) * 2013-03-28 2014-10-02 British Telecommunications Public Limited Company Re-marking of packets for queue control
CN105721332A (zh) * 2014-12-03 2016-06-29 深圳市中兴微电子技术有限公司 一种基于改进的wred的拥塞控制方法和装置
CN106330770A (zh) * 2015-06-29 2017-01-11 深圳市中兴微电子技术有限公司 一种共享缓存分配方法及装置
CN106685848A (zh) * 2015-11-10 2017-05-17 中兴通讯股份有限公司 报文丢弃方法及装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101800699A (zh) * 2010-02-09 2010-08-11 上海华为技术有限公司 一种丢弃报文的方法及装置
CN102223300B (zh) * 2011-06-09 2014-02-05 武汉烽火网络有限责任公司 一种网络设备中多媒体数据的传输控制方法
CN103248583B (zh) * 2012-02-09 2016-04-13 迈普通信技术股份有限公司 一种基于有限深度的先进先出报文队列管理方法及装置
CN102594691B (zh) * 2012-02-23 2019-02-15 中兴通讯股份有限公司 一种处理报文的方法及装置
CN104426796A (zh) * 2013-08-21 2015-03-18 中兴通讯股份有限公司 一种路由器的拥塞避免方法及装置
CN105812285A (zh) * 2016-04-29 2016-07-27 华为技术有限公司 一种端口拥塞管理方法及装置
CN107454014A (zh) * 2016-05-30 2017-12-08 中兴通讯股份有限公司 一种优先级队列调度的方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1819577A (zh) * 2005-01-24 2006-08-16 阿尔卡特公司 通信业务管理系统和方法
CN101056261A (zh) * 2007-05-21 2007-10-17 中南大学 多速率无线局域网中接入节点的主动拥塞处理方法
WO2014155043A1 (en) * 2013-03-28 2014-10-02 British Telecommunications Public Limited Company Re-marking of packets for queue control
CN105721332A (zh) * 2014-12-03 2016-06-29 深圳市中兴微电子技术有限公司 一种基于改进的wred的拥塞控制方法和装置
CN106330770A (zh) * 2015-06-29 2017-01-11 深圳市中兴微电子技术有限公司 一种共享缓存分配方法及装置
CN106685848A (zh) * 2015-11-10 2017-05-17 中兴通讯股份有限公司 报文丢弃方法及装置

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111865716A (zh) * 2020-06-30 2020-10-30 新华三信息技术有限公司 一种端口拥塞检测方法、装置、设备及机器可读存储介质
CN111865716B (zh) * 2020-06-30 2023-07-18 新华三信息技术有限公司 一种端口拥塞检测方法、装置、设备及机器可读存储介质
CN113973085A (zh) * 2020-07-22 2022-01-25 华为技术有限公司 一种拥塞控制方法和装置
CN113973085B (zh) * 2020-07-22 2023-10-20 华为技术有限公司 一种拥塞控制方法和装置
CN116055420A (zh) * 2022-12-07 2023-05-02 蔚来汽车科技(安徽)有限公司 整合办公网络与工业网络后的信息传输方法及控制装置

Also Published As

Publication number Publication date
CN111314240B (zh) 2023-04-14
CN116418757A (zh) 2023-07-11
CN111314240A (zh) 2020-06-19

Similar Documents

Publication Publication Date Title
WO2020119202A1 (zh) 拥塞控制方法及装置、网络设备及存储介质
WO2022016889A1 (zh) 一种拥塞控制方法和装置
US8929363B1 (en) Apparatus and method for allocating buffers of a memory including tracking a number of buffers used to store a received frame
US8189463B2 (en) Method for realizing backpressure of masses of ports and device thereof
US8705355B1 (en) Network switch and method for asserting flow control of frames transmitted to the network switch
US8411574B2 (en) Starvation free flow control in a shared memory switching device
US8174987B2 (en) Method and apparatus for implementing output queue-based flow control
US9083655B2 (en) Internal cut-through for distributed switches
US20190190849A1 (en) Distributed switch architecture
EP3229425B1 (en) Packet forwarding method and device
US10050896B2 (en) Management of an over-subscribed shared buffer
US9197570B2 (en) Congestion control in packet switches
US20080304503A1 (en) Traffic manager and method for performing active queue management of discard-eligible traffic
JP2009239634A (ja) 到着パケット廃棄決定を行うパケットバッファ管理装置及びその廃棄決定方法
US9100313B1 (en) Shared egress buffer in a multi-stage switch
WO2020134425A1 (zh) 一种数据处理方法、装置、设备及存储介质
US7756028B2 (en) Pulsed backpressure mechanism for reduced FIFO utilization
US7408876B1 (en) Method and apparatus for providing quality of service across a switched backplane between egress queue managers
CN110809012B (zh) 列车网络通信数据调度控制方法
US8879578B2 (en) Reducing store and forward delay in distributed systems
WO2021143913A1 (zh) 拥塞控制方法、装置及系统、存储介质
CN114531488A (zh) 一种面向以太网交换器的高效缓存管理系统
WO2023123104A1 (zh) 一种报文传输方法及网络设备
CN114221916A (zh) 一种交换芯片的转发队列冲刷方法及系统
CN117395207A (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: 19896700

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: 19896700

Country of ref document: EP

Kind code of ref document: A1