CN107872403B - Five-stage queue scheduling device and method for realizing hierarchical QoS - Google Patents

Five-stage queue scheduling device and method for realizing hierarchical QoS Download PDF

Info

Publication number
CN107872403B
CN107872403B CN201711102124.0A CN201711102124A CN107872403B CN 107872403 B CN107872403 B CN 107872403B CN 201711102124 A CN201711102124 A CN 201711102124A CN 107872403 B CN107872403 B CN 107872403B
Authority
CN
China
Prior art keywords
module
scheduling
queue
data packet
level scheduling
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.)
Active
Application number
CN201711102124.0A
Other languages
Chinese (zh)
Other versions
CN107872403A (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.)
Xian University of Electronic Science and Technology
Original Assignee
Xian University of Electronic Science and Technology
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 Xian University of Electronic Science and Technology filed Critical Xian University of Electronic Science and Technology
Priority to CN201711102124.0A priority Critical patent/CN107872403B/en
Publication of CN107872403A publication Critical patent/CN107872403A/en
Application granted granted Critical
Publication of CN107872403B publication Critical patent/CN107872403B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/60Queue scheduling implementing hierarchical scheduling
    • 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/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2408Traffic characterised by specific attributes, e.g. priority or QoS for supporting different services, e.g. a differentiated services [DiffServ] type of service
    • 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/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2441Traffic characterised by specific attributes, e.g. priority or QoS relying on flow classification, e.g. using integrated services [IntServ]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/52Queue scheduling by attributing bandwidth to queues
    • H04L47/527Quantum based scheduling, e.g. credit or deficit based scheduling or token bank
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/58Changing or combining different scheduling modes, e.g. multimode scheduling

Landscapes

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

Abstract

The invention discloses a five-stage queue scheduling device and method for realizing hierarchical QoS, wherein the device comprises a flow classification module, an enqueue stage scheduling module, a shared cache module, a service flow stage scheduling module, a user stage scheduling module, a subnet stage scheduling module, an output port stage scheduling module, a scheduling algorithm configuration module, a flow control module and a CPU interface module. The method comprises the following steps: and carrying out flow classification on the data packets, and judging whether the data packets can be enqueued or not by calculating an enqueue threshold of the queue. And configuring scheduling algorithms at all levels by using a scheduling algorithm configuration module according to the weight attribute of the queue to be scheduled, and simultaneously completing the dequeuing scheduling process of the data packets by combining a flow control algorithm. The invention can more flexibly allocate the bandwidth by selecting a proper scheduling algorithm and a flow control algorithm and combining a five-stage queue scheduling device.

Description

Five-stage queue scheduling device and method for realizing hierarchical QoS
Technical Field
The invention belongs to the technical field of communication, and further relates to a five-level queue scheduling device and method for realizing hierarchical quality of service (QoS) in the technical field of data transmission. The invention can realize the management of the bandwidth of the switch or the router by setting the queue weight value in each level of scheduling algorithm and controlling the flow.
Background
The queue scheduling and QoS technology is widely applied to routers and switches, and carries out flow classification, scheduling and flow control on input messages of a switching node according to a certain service rule, so that all data packets can share the output link bandwidth of the switching node in a preset mode.
The queue-based scheduling method is most frequently used in congestion management, and the traditional queue-based scheduling method uses single-stage queues, namely queues with fixed number below an output port, maps the flow on the output port into different queues according to a flow classification strategy set by an interface, and then performs scheduling according to a set queue scheduling algorithm, thereby realizing the differentiated scheduling of different service flows; the current queue-based scheduling algorithm mainly comprises strict priority scheduling SP, weighted round robin WRR, score weighted round robin DWRR, weighted fair scheduling WFQ and the like. The scheduling algorithms have advantages and disadvantages, and when a single-stage queue scheduling method is used, the selection of the scheduling algorithm is limited; the traditional QoS is scheduled based on port bandwidth, and port-level bandwidth allocation is performed in combination with the classification result of the single-level queue, so that bandwidth management between a user and a subnet cannot be realized.
With the rapid development of the current network equipment, the capacity of a single port is increased, the number of access users is increased, the service types are various, and bandwidth scheduling based on a single queue and a single port brings many problems, so that researches on hierarchical quality of service scheduling methods are increasingly on the way.
The patent document "a hierarchical QoS scheduling method and apparatus" (application No. 201310031861.1, application date 2013.01.28, published date 2013.06.12) filed by zhongxing communications corporation, provides a scheduling method and apparatus for implementing hierarchical QoS in the uplink direction. The device disclosed in the patent document includes a data exchange channel, an uplink queue scheduling module, an uplink data exchange module, a receiving module, and a transmitting module. The receiving module is used for receiving the data packet transmitted in the uplink, analyzing the data packet, packaging the data packet message and then sending the data packet message to the uplink data exchange module; the sending module is used for sending the data packet; the uplink data exchange module is used for storing the data packet into an uplink queue according to the uplink queue information in the package and sending an uplink scheduling request to the uplink queue scheduling module; and the uplink queue scheduling module is used for replying corresponding information to the uplink data exchange module according to the uplink scheduling request sent by the uplink data exchange module. The device has the following defects: the packaging of the uplink queue information is only carried out on the receiving module, the attributes of the subnet number and the user number of the uplink queue information are not transmitted, and the queue has only one stage and cannot realize the bandwidth configuration of each subnet and user. The main steps of the method disclosed in this patent document are: (1) analyzing the data packet received in the uplink, and packaging the combined data packet message, wherein the packaged information comprises the queue information in the uplink direction; (2) storing the data packet into an uplink queue according to the uplink queue information, and sending an uplink scheduling request to an uplink queue scheduling module; (3) and if the uplink queue scheduling module replies uplink authorization information, transmitting the data packet. The method has the following defects: the method can only ensure the service quality of the user and can not further serve different service flows of the user; only port level scheduling can not guarantee bandwidth allocation of different subnets.
The beacon communication technology corporation has proposed a bandwidth management method based on two-stage traffic shaping in its patent document "method of multilevel hierarchical bandwidth management" (application No. 2011110120369.2, application date 2011.05.11, published date 2011.09.14). The main steps of the method disclosed in this patent document are: (1) configuring CIR and PIR or CIR and EIR of each level of scheduling nodes according to a service model; setting the CIR of each node in the first-level dispatching according to the bandwidth purchased by a user; the second-level scheduling is started, and the bandwidth allocation principle of each node meets a self-defined criterion; (2) at each node of the first-level scheduling, marking the message as green, yellow or red by using an MEF (Measure for health), RFC2697 or RFC2698 algorithm; and starting from each node of the second-level scheduling, configuring each node into a color-sensitive mode and a coupling mode, and carrying out traffic shaping according to an MEF algorithm. The method has the following defects: the bandwidth management algorithm based on the flow shaping is too complex, the hardware realization cost is high, the scheme can only be applied to the switching chip supporting the MEF Traffic shaping algorithm, and the utilization range is not wide enough.
Disclosure of Invention
The invention aims to overcome the defects of the port-level queue scheduling technology, provides a five-level queue scheduling device and method for realizing hierarchical QoS, and more flexibly allocates bandwidth by selecting a proper scheduling algorithm and a proper flow control algorithm and combining the five-level queue scheduling device.
In order to achieve the purpose, the idea of the method is as follows: firstly, classifying the arrived data packets, dividing the data packets into different service flows by a flow classification module through extracting the service type ToS of the data packets, and inquiring to obtain the queue numbers of the data packets through extracting the source IP and the target IP of the data packets; then an enqueue level scheduling module inquires enqueue threshold information of data packets to be enqueued and capacity of a shared cache, and enqueues the packets under the condition that the maximum threshold requirement is met and the capacity of the shared cache is sufficient; and finally, completing service flow level scheduling, user level scheduling, subnet level scheduling and output port level scheduling in sequence through the configuration of each level of the scheduling algorithm configuration module and the flow control module.
In order to achieve the purpose, the device comprises a flow classification module, an enqueue level scheduling module, a shared cache module, a service flow level scheduling module, a user level scheduling module, a subnet level scheduling module, an output port level scheduling module, a scheduling algorithm configuration module, a flow control module and a CPU interface module; the flow classification module is connected with the enqueue level scheduling module; the enqueue level scheduling module is connected with the flow classification module, the shared cache module and the service flow level scheduling module; the service flow level scheduling module is connected with the enqueue level scheduling module, the user level scheduling module and the scheduling algorithm configuration module; the user-level scheduling module is connected with the service flow-level scheduling module, the subnet-level scheduling module and the scheduling algorithm configuration module; the subnet-level scheduling module is connected with the user-level scheduling module, the output-end-level scheduling module and the scheduling algorithm configuration module; the output port level scheduling module is connected with the subnet level scheduling module and the flow control module; the scheduling algorithm configuration module is connected with the service flow level scheduling module, the user level scheduling module, the subnet level scheduling module and the CPU interface module; the CPU interface module is connected with the scheduling algorithm configuration module; wherein the content of the first and second substances,
the flow classification module is used for extracting the service type ToS of the data packet to be queued and classifying the data packet into one of four service flows according to the service type ToS; extracting a source IP and a target IP of a data packet to be enqueued, inquiring a user queue number to which the source IP belongs, and inquiring a sub-network queue number to which the target IP belongs; obtaining the queue number of the data packet to be enqueued according to the service flow type, the user number and the subnet number of the data packet to be enqueued, and transmitting the queue number of the data packet to be enqueued to an enqueue-level scheduling module;
the enqueue level scheduling module is used for judging whether the data packets to be enqueued meet enqueue conditions or not, enqueuing the data packets meeting the enqueue conditions, and updating the queue capacity after enqueue and the storage capacity of the cache module; discarding data packets that do not satisfy the enqueue condition;
the shared cache module is used for storing all data packets;
the service flow level scheduling module is used for dequeuing the data packets in the queue to be scheduled by utilizing the service flow level scheduling algorithm selected by the scheduling algorithm configuration module according to the weight attribute of the queue to be scheduled; judging whether the selected service flow level scheduling algorithm finishes dequeuing the data packet, and transmitting the data packet to a user level scheduling module after finishing dequeuing the data packet;
the user-level scheduling module is used for the user-level scheduling module to dequeue the data packets in the queue to be scheduled by using the user-level scheduling algorithm selected by the scheduling algorithm configuration module according to the weight attribute of the queue to be scheduled; judging whether the selected user-level scheduling algorithm finishes dequeuing the data packet, and transmitting the data packet to the subnet-level scheduling module after the dequeuing of the data packet is finished;
the subnet-level scheduling module is used for dequeuing the data packets in the queue to be scheduled by utilizing the subnet-level scheduling algorithm selected by the scheduling algorithm configuration module according to the weight attribute of the queue to be scheduled; judging whether the selected subnet-level scheduling algorithm finishes dequeuing the data packet or not, and transmitting the data packet to an output port-level scheduling module after the dequeuing is finished;
the output port level scheduling module is used for sequentially dequeuing the data packets queued at the output port when tokens exist in the token bucket in the flow control module, and simultaneously sequentially decreasing the number of the tokens until the number of the tokens is zero or all the data packets are dequeued;
the scheduling algorithm configuration module is used for configuring scheduling algorithms required by the user-level scheduling module, the subnet-level scheduling module and the output port-level scheduling module;
the flow control module is used for receiving the number of tokens set by the CPU interface module and controlling the dequeuing of the data packets of the output port level scheduling module;
the CPU interface module is used for setting the number of tokens in the flow control module and writing the number of data packets, the length of the data packets and the virtual completion time of the data packets required by each stage of scheduling into the weight information of the corresponding queue.
The scheduling method of the invention uses a five-stage queue scheduling device for realizing the hierarchical QoS, realizes the multilevel bandwidth allocation when the switching equipment carries out data transmission, and comprises the following steps:
(1) classifying the data packets:
(1a) the flow classification module extracts the service type ToS of the data packet to be queued, and divides the data packet into one of four service flows according to the service type ToS;
(1b) the flow classification module extracts a source IP and a target IP of a data packet to be queued, inquires a user queue number to which the source IP belongs, and inquires a subnet queue number to which the target IP belongs;
(2) acquiring a queue number of a data packet:
the flow classification module obtains the queue number of the data packet to be enqueued according to the service flow type, the user number and the subnet number of the data packet to be enqueued, and transmits the queue number of the data packet to be enqueued to the enqueue level scheduling module;
(3) the enqueue level scheduling module judges whether the data packet to be enqueued meets enqueue conditions, if so, the step (5) is executed, otherwise, the step (4) is executed;
(4) if the data packet is failed to be enqueued, discarding the data packet to be enqueued;
(5) data packet enqueuing:
the enqueue scheduling module enqueues the data packets meeting the enqueue condition, updates the enqueued queue capacity and the storage capacity of the cache module and then executes the step (6);
(6) initializing a scheduling algorithm configuration module and a flow control module:
(6a) the central processing unit CPU interface module writes the number of data packets, the length of the data packets and the virtual completion time of the data packets required by each level of scheduling into the weight information of the corresponding queue;
(6b) the CPU interface module of the central processing unit sets the number of tokens in the flow control module;
(7) starting the dequeue scheduling period;
(8) and (3) service flow level scheduling:
the service flow level scheduling module utilizes the service flow level scheduling algorithm selected by the scheduling algorithm configuration module according to the weight attribute of the queue to be scheduled to dequeue the data packets in the queue to be scheduled;
(9) judging whether the selected service flow level scheduling algorithm finishes dequeuing the data packet, if so, executing the step (10), otherwise, executing the step (15);
(10) user-level scheduling:
the user-level scheduling module utilizes the user-level scheduling algorithm selected by the scheduling algorithm configuration module according to the weight attribute of the queue to be scheduled to dequeue the data packets in the queue to be scheduled;
(11) judging whether the selected user-level scheduling algorithm finishes dequeuing the data packet, if so, executing the step (12), otherwise, executing the step (15);
(12) and (3) subnet-level scheduling:
the sub-network level scheduling module utilizes the sub-network level scheduling algorithm selected by the scheduling algorithm configuration module according to the weight attribute of the queue to be scheduled to dequeue the data packets in the queue to be scheduled;
(13) judging whether the selected subnet-level scheduling algorithm finishes dequeuing the data packet, if so, executing the step (14), otherwise, executing the step (15);
(14) output port level scheduling:
when tokens exist in a token bucket in the flow control module, the output port level scheduling module enables data packets queued at the output port to be sequentially dequeued, and meanwhile, the number of the tokens is sequentially decreased until the number of the tokens is zero or all the data packets are dequeued;
(15) and finishing the dequeue scheduling cycle and finishing the dequeue scheduling processing.
Compared with the prior art, the invention has the following advantages:
firstly, the flow classification module in the device of the invention is used for extracting the service type ToS of the data packet to be enqueued and dividing the data packet into one of four service flows according to the service type ToS; extracting a source IP and a target IP of a data packet to be enqueued, inquiring a user queue number to which the source IP belongs, and inquiring a sub-network queue number to which the target IP belongs; the queue number of the data packet to be enqueued is obtained according to the service flow type, the user number and the subnet number of the data packet to be enqueued, and the problems that the prior art only encapsulates the queue information in the uplink direction on a receiving module and cannot realize the bandwidth configuration of each subnet and user are solved, so that the device has the advantage of configurable multi-level bandwidth allocation.
Secondly, the method initializes the scheduling algorithm configuration module and the flow control module, realizes the modularization realization of the weighted round-robin scheduling algorithm WRR, the weighted difference round-robin scheduling algorithm DWRR, the weighted fair queuing algorithm WFQ and the flow control, and overcomes the problems that the bandwidth management algorithm based on flow shaping is too complex, the hardware realization cost is high, the bandwidth management algorithm can only be applied to a switching chip supporting the MEF Traffic shaping algorithm, and the utilization surface is not wide enough in the prior art, so that the method has the advantages of high flexibility and algorithm configuration.
Drawings
FIG. 1 is a block diagram of the apparatus of the present invention;
FIG. 2 is a flow chart of the method of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Referring to fig. 1, the apparatus of the present invention includes a flow classification module 1, an enqueue level scheduling module 2, a shared cache module 3, a service flow level scheduling module 4, a user level scheduling module 5, a subnet level scheduling module 6, an output port level scheduling module 7, a scheduling algorithm configuration module 8, a flow control module 9, and a CPU interface module 10; the flow classification module 1 is connected with the enqueue level scheduling module 2; the enqueue level scheduling module 2 is connected with the flow classification module 1, the shared cache module 3 and the service flow level scheduling module 4; the service flow level scheduling module 4 is connected with the enqueue level scheduling module 2, the user level scheduling module 5 and the scheduling algorithm configuration module 8; the user-level scheduling module 5 is connected with the service flow-level scheduling module 4, the subnet-level scheduling module 6 and the scheduling algorithm configuration module 8; the subnet-level scheduling module 6 is connected with the user-level scheduling module 5, the output port-level scheduling module 7 and the scheduling algorithm configuration module 8; the output port level scheduling module 7 is connected with the subnet level scheduling module 6 and the flow control module 9; the scheduling algorithm configuration module 8 is connected with the service flow level scheduling module 4, the user level scheduling module 5, the subnet level scheduling module 6 and the CPU interface module 10; the CPU interface module 10 is connected with the scheduling algorithm configuration module 8; wherein the content of the first and second substances,
the flow classification module 1 is used for extracting a service type ToS of a data packet to be enqueued, and classifying the data packet into one of four service flows according to the service type ToS; extracting a source IP and a target IP of a data packet to be enqueued, inquiring a user queue number to which the source IP belongs, and inquiring a sub-network queue number to which the target IP belongs; obtaining the queue number of the data packet to be enqueued according to the service flow type, the user number and the subnet number of the data packet to be enqueued, and transmitting the queue number of the data packet to be enqueued to the enqueue level scheduling module 2;
the enqueue scheduling module 2 is configured to determine whether the data packets to be enqueued satisfy enqueue conditions, enqueue the data packets satisfying the enqueue conditions, and update the enqueue capacity and the storage capacity of the shared cache module 3; discarding data packets that do not satisfy the enqueue condition;
the shared cache module 3 is used for storing all data packets;
the service flow level scheduling module 4 is configured to dequeue the data packets in the queue to be scheduled by using the service flow level scheduling algorithm selected by the scheduling algorithm configuration module 8 according to the weight attribute of the queue to be scheduled; judging whether the selected service flow level scheduling algorithm finishes dequeuing the data packet, and transmitting the data packet to a user level scheduling module 5 after finishing dequeuing the data packet;
the user-level scheduling module 5 is configured to dequeue the data packets in the queue to be scheduled by using the user-level scheduling algorithm selected by the scheduling algorithm configuration module 8 according to the weight attribute of the queue to be scheduled; judging whether the selected user-level scheduling algorithm finishes dequeuing the data packet, and transmitting the data packet to the subnet-level scheduling module 6 after the dequeuing is finished;
the sub-network level scheduling module 6 is configured to dequeue the data packets in the queue to be scheduled by using the sub-network level scheduling algorithm selected by the scheduling algorithm configuration module 8 according to the weight attribute of the queue to be scheduled; judging whether the selected subnet-level scheduling algorithm finishes dequeuing the data packet, and transmitting the data packet to an output port-level scheduling module 7 after the dequeuing is finished;
the output port level scheduling module 7 is configured to, when there is a token in the token bucket in the flow control module, sequentially dequeue the data packets queued at the output port by the output port level scheduling module 7, and sequentially decrease the number of tokens until the number of tokens is zero or all the data packets are dequeued;
the CPU interface module 10 is configured to set the number of tokens in the flow control module 7, and write the number of data packets, the length of the data packets, and the virtual completion time of the data packets, which are required by each stage of scheduling, into weight information of a corresponding queue;
the scheduling algorithm configuration module 8 is configured to configure the scheduling algorithms required by the user-level scheduling module 5, the subnet-level scheduling module 6, and the output port-level scheduling module 7;
the flow control module 9 is configured to receive the number of tokens set by the CPU interface module 10, and control dequeuing of the data packet by the output port level scheduling module 7.
The method of implementing the present invention is further described with reference to fig. 2.
The five-stage queue scheduling method of the invention uses a five-stage queue scheduling device for realizing hierarchical QoS (quality of service), and realizes multi-level bandwidth allocation when the switching equipment transmits data.
Step 1, data packets are classified.
The flow classification module 1 extracts the service type ToS of the data packet to be enqueued, and classifies it into one of four traffic flows according to the service type ToS.
The four traffic flows refer to the classification of the service type ToS of 0 or 1 as a voice traffic flow; classifying the service type ToS of 2 or 3 as a video service stream; classifying the service type ToS of 4 or 5 into a Virtual Private Network (VPN) service flow; the service type ToS of 6 or 7 is classified as a data traffic flow.
The flow classification module 1 extracts a source IP and a destination IP of a data packet to be enqueued, inquires a user queue number to which the source IP belongs, and inquires a subnet queue number to which the destination IP belongs.
And step 2, acquiring the queue number of the data packet.
The flow classification module 1 obtains the queue number of the data packet to be enqueued according to the service flow type, the user number and the subnet number of the data packet to be enqueued, and transmits the queue number of the data packet to be enqueued to the enqueue level scheduling module 2.
And 3, judging whether the data packet to be enqueued meets enqueuing conditions or not by the enqueuing level scheduling module 2, if so, executing the step 5, and otherwise, executing the step 4.
The enqueue condition refers to a situation that the following two conditions are simultaneously satisfied:
in condition 1, the remaining value of the storage capacity of the shared cache module 3 is greater than the length of the data packet to be enqueued;
2, the capacity of a queue to which the data packet to be enqueued belongs does not reach an enqueue threshold;
the enqueue threshold is calculated by the shared cache module 3 according to the following formula:
T=αi*(B-∑Q),
where T denotes a queue threshold value, αiRepresenting an enqueue threshold coefficient of the ith service flow, setting the value of each service flow by the shared cache module 3 according to the priority of the four service flows by using an integer greater than 0, representing multiplication operation, B representing the total capacity of the shared cache module 3, sigma representing summation operation, and Q representing the length of each queue at the current moment;
the total capacity B of the shared cache module 3 is calculated by the following formula:
B=(SUBNET*USER*FLOW*AVGLEN),
wherein SUBNET represents the number of SUBNETs, USER represents the number of USERs, FLOW represents the number of traffic types, and AVGLEN represents the average queue length.
And 4, discarding the data packet to be enqueued when the enqueue of the data packet fails.
And 5, enqueuing the data packet.
The enqueue scheduling module 2 enqueues the data packets meeting the enqueue condition, updates the enqueued queue capacity and the storage capacity of the shared cache module 3, and executes step 6.
And 6, initializing a scheduling algorithm configuration module 8 and a flow control module 9.
The CPU interface module 10 writes the number of data packets, the length of the data packets, and the virtual completion time of the data packets required for scheduling at each stage into the weight information of the corresponding queue.
The central processing unit CPU interface module 10 sets the number of tokens in the flow control module.
The token is a virtual packet that fills the token bucket at a given rate.
And 7, starting the dequeue scheduling period.
And 8, scheduling the service flow level.
And the service flow level scheduling module 4 dequeues the data packets in the queue to be scheduled by using the service flow level scheduling algorithm selected by the scheduling algorithm configuration module 8 according to the weight attribute of the queue to be scheduled.
The selection of the scheduling algorithm according to the weight attribute of the queue to be scheduled means that if the weight of the queue to be scheduled is the number of the data packets, the selected algorithm is a weighted round robin scheduling algorithm WRR; if the weight of the scheduling queue is the length of the data packet, the selected algorithm is a weighted difference polling scheduling algorithm DWRR; if the weight of the scheduled queue is the virtual completion time of the data packet, the selected algorithm is a weighted fair queuing algorithm WFQ.
And 9, judging whether the selected service flow level scheduling algorithm finishes dequeuing the data packet, if so, executing the step 10, otherwise, executing the step 15.
Step 10, user-level scheduling.
And the user-level scheduling module 5 dequeues the data packets in the queue to be scheduled by using the user-level scheduling algorithm selected by the scheduling algorithm configuration module 8 according to the weight attribute of the queue to be scheduled.
And 11, judging whether the selected user-level scheduling algorithm finishes dequeuing the data packet, if so, executing a step 12, and otherwise, executing a step 15.
And step 12, subnet-level scheduling.
And the sub-network level scheduling module 6 utilizes the sub-network level scheduling algorithm selected by the scheduling algorithm configuration module 8 according to the weight attribute of the queue to be scheduled, so as to dequeue the data packets in the queue to be scheduled.
And step 13, judging whether the selected subnet-level scheduling algorithm finishes dequeuing the data packet, if so, executing step 14, otherwise, executing step 15.
Step 14, output port level scheduling.
When there is a token in the token bucket in the flow control module 9, the output port level scheduling module 7 sequentially dequeues the data packets queued at the output port, and the number of tokens is sequentially decreased until the number of tokens is zero or all the data packets are dequeued.
And step 15, finishing the dequeue scheduling cycle and finishing the dequeue scheduling processing.

Claims (5)

1. A five-stage queue scheduling device for realizing hierarchical quality of service (QoS) is characterized by comprising a flow classification module, an enqueue scheduling module, a shared cache module, a service flow scheduling module, a user-level scheduling module, a subnet scheduling module, an output port scheduling module, a scheduling algorithm configuration module, a flow control module and a CPU interface module; the flow classification module is connected with the enqueue level scheduling module; the enqueue level scheduling module is connected with the flow classification module, the shared cache module and the service flow level scheduling module; the service flow level scheduling module is connected with the enqueue level scheduling module, the user level scheduling module and the scheduling algorithm configuration module; the user-level scheduling module is connected with the service flow-level scheduling module, the subnet-level scheduling module and the scheduling algorithm configuration module; the subnet-level scheduling module is connected with the user-level scheduling module, the output port-level scheduling module and the scheduling algorithm configuration module; the output port level scheduling module is connected with the subnet level scheduling module and the flow control module; the scheduling algorithm configuration module is connected with the service flow level scheduling module, the user level scheduling module, the subnet level scheduling module and the CPU interface module; the CPU interface module is connected with the scheduling algorithm configuration module; wherein the content of the first and second substances,
the flow classification module is used for extracting the service type ToS of the data packet to be queued and classifying the data packet into one of four service flows according to the service type ToS; extracting a source IP and a target IP of a data packet to be enqueued, inquiring a user queue number to which the source IP belongs, and inquiring a sub-network queue number to which the target IP belongs; obtaining the queue number of the data packet to be enqueued according to the service flow type, the user number and the subnet number of the data packet to be enqueued, and transmitting the queue number of the data packet to be enqueued to an enqueue-level scheduling module;
the enqueue level scheduling module is used for judging whether the data packets to be enqueued meet enqueue conditions or not, enqueuing the data packets meeting the enqueue conditions, and updating the queue capacity after enqueue and the storage capacity of the cache module; discarding data packets that do not satisfy the enqueue condition;
the enqueue condition refers to a situation that the following two conditions are simultaneously satisfied:
the method comprises the following steps that 1, the residual value of the storage capacity of a cache module is larger than the length of a data packet to be enqueued;
2, the capacity of a queue to which the data packet to be enqueued belongs does not reach an enqueue threshold value;
the enqueue threshold is calculated by the shared cache module according to the following formula:
T=αi*(B-∑Q),
wherein T represents an enqueue threshold value, αiRepresenting an enqueue threshold coefficient of the ith service flow, setting the value of each service flow by using an integer larger than 1 by the shared cache module according to the priority of the four service flows, wherein the integer represents multiplication operation, B represents the total capacity of the shared cache module, sigma represents summation operation, and Q represents the length of a single queue in the shared cache module;
the total capacity B of the shared cache module is calculated by the following formula:
B=(SUBNET*USER*FLOW*AVGLEN),
wherein SUBNET represents the number of SUBNETs, USER represents the number of USERs, FLOW represents the number of types of traffic, and AVGLEN represents the average queue length;
the shared cache module is used for storing all data packets;
the service flow level scheduling module is used for dequeuing the data packets in the queue to be scheduled by utilizing the service flow level scheduling algorithm selected by the scheduling algorithm configuration module according to the weight attribute of the queue to be scheduled; judging whether the selected service flow level scheduling algorithm finishes dequeuing the data packet, and transmitting the data packet to a user level scheduling module after finishing dequeuing the data packet;
the user-level scheduling module is used for the user-level scheduling module to dequeue the data packets in the queue to be scheduled by using the user-level scheduling algorithm selected by the scheduling algorithm configuration module according to the weight attribute of the queue to be scheduled; judging whether the selected user-level scheduling algorithm finishes dequeuing the data packet, and transmitting the data packet to the subnet-level scheduling module after the dequeuing of the data packet is finished;
the subnet-level scheduling module is used for dequeuing the data packets in the queue to be scheduled by utilizing the subnet-level scheduling algorithm selected by the scheduling algorithm configuration module according to the weight attribute of the queue to be scheduled; judging whether the selected subnet-level scheduling algorithm finishes dequeuing the data packet or not, and transmitting the data packet to an output port-level scheduling module after the dequeuing is finished;
the output port level scheduling module is used for sequentially dequeuing the data packets queued at the output port when tokens exist in the token bucket in the flow control module, and simultaneously sequentially decreasing the number of the tokens until the number of the tokens is zero or all the data packets are dequeued;
the CPU interface module is used for setting the number of tokens in the flow control module and writing the number of data packets, the length of the data packets and the virtual completion time of the data packets required by each stage of scheduling into weight information of a corresponding queue;
the scheduling algorithm configuration module is used for configuring scheduling algorithms required by the service flow level scheduling module, the user level scheduling module and the subnet level scheduling module;
and the flow control module is used for receiving the number of tokens set by the CPU interface module and controlling the dequeue of the data packet of the output port level scheduling module.
2. A five-stage queue scheduling method for realizing hierarchical QoS is characterized in that a five-stage queue scheduling device for realizing hierarchical QoS is used to realize multi-level bandwidth allocation when data transmission is carried out by switching equipment, and comprises the following steps:
(1) classifying the data packet:
(1a) the flow classification module extracts the service type ToS of the data packet to be enqueued, and divides the extracted data packet to be enqueued into one of four service flows according to different service types ToS;
(1b) the flow classification module extracts a source IP and a target IP of a data packet to be queued, inquires a user queue number to which the source IP belongs, and inquires a subnet queue number to which the target IP belongs;
(2) acquiring a queue number of a data packet:
the flow classification module obtains a queue number of the data packet to be enqueued by inquiring the service flow type, the user number and the subnet number of the data packet to be enqueued, and transmits the queue number of the data packet to be enqueued to the enqueue level scheduling module;
(3) the enqueue level scheduling module judges whether the data packet to be enqueued meets enqueue conditions, if so, the step (5) is executed, otherwise, the step (4) is executed;
the enqueue condition refers to a situation that the following two conditions are simultaneously satisfied:
the method comprises the following steps that 1, the residual value of the storage capacity of a cache module is larger than the length of a data packet to be enqueued;
2, the capacity of a queue to which the data packet to be enqueued belongs does not reach an enqueue threshold value;
the enqueue threshold is calculated by the shared cache module according to the following formula:
T=αi*(B-∑Q),
wherein T represents an enqueue threshold value, αiRepresenting an enqueue threshold coefficient of the ith service flow, setting the value of each service flow by using an integer larger than 1 by the shared cache module according to the priority of the four service flows, wherein the integer represents multiplication operation, B represents the total capacity of the shared cache module, sigma represents summation operation, and Q represents the length of a single queue in the shared cache module;
the total capacity B of the shared cache module is calculated by the following formula:
B=(SUBNET*USER*FLOW*AVGLEN),
wherein SUBNET represents the number of SUBNETs, USER represents the number of USERs, FLOW represents the number of types of traffic, and AVGLEN represents the average queue length;
(4) if the data packet is failed to be enqueued, discarding the data packet to be enqueued;
(5) data packet enqueuing:
the enqueue scheduling module enqueues the data packets meeting the enqueue condition, updates the enqueued queue capacity and the storage capacity of the cache module and then executes the step (6);
(6) initializing a scheduling algorithm configuration module and a flow control module:
(6a) the central processing unit CPU interface module writes the number of data packets, the length of the data packets and the virtual completion time of the data packets required by each level of scheduling into the weight information of the corresponding queue;
(6b) the CPU interface module of the central processing unit sets the number of tokens in the flow control module;
(7) starting the dequeue scheduling period;
(8) and (3) service flow level scheduling:
the service flow level scheduling module utilizes the service flow level scheduling algorithm selected by the scheduling algorithm configuration module according to the weight attribute of the queue to be scheduled to dequeue the data packets in the queue to be scheduled;
(9) judging whether the selected service flow level scheduling algorithm finishes dequeuing the data packet, if so, executing the step (10), otherwise, executing the step (15);
(10) user-level scheduling:
the user-level scheduling module utilizes the user-level scheduling algorithm selected by the scheduling algorithm configuration module according to the weight attribute of the queue to be scheduled to dequeue the data packets in the queue to be scheduled;
(11) judging whether the selected user-level scheduling algorithm finishes dequeuing the data packet, if so, executing the step (12), otherwise, executing the step (15);
(12) and (3) subnet-level scheduling:
the sub-network level scheduling module utilizes the sub-network level scheduling algorithm selected by the scheduling algorithm configuration module according to the weight attribute of the queue to be scheduled to dequeue the data packets in the queue to be scheduled;
(13) judging whether the selected subnet-level scheduling algorithm finishes dequeuing the data packet, if so, executing the step (14), otherwise, executing the step (15);
(14) output port level scheduling:
when tokens exist in a token bucket in the flow control module, the output port level scheduling module enables data packets queued at the output port to be sequentially dequeued, and meanwhile, the number of the tokens is sequentially decreased until the number of the tokens is zero or all the data packets are dequeued;
(15) and finishing the dequeue scheduling cycle and finishing the dequeue scheduling processing.
3. The five-stage queue scheduling method for implementing hierarchical QoS according to claim 2, wherein the four traffic flows in step (1a) are that the ToS service type 0 or 1 is classified as voice traffic flow; classifying the service type ToS of 2 or 3 as a video service stream; classifying the service type ToS of 4 or 5 into a Virtual Private Network (VPN) service flow; the service type ToS of 6 or 7 is classified as a data traffic flow.
4. The method of claim 2, wherein the token in step (6b) is a dummy packet that the CPU interface module fills the token bucket at a given rate.
5. The five-stage queue scheduling method for realizing hierarchical QoS according to claim 2, wherein the selecting of the scheduling algorithm according to the weight attribute of the queue to be scheduled in step (8) means that if the weight of the queue to be scheduled is the number of data packets, the selected algorithm is a weighted round robin scheduling algorithm WRR; if the weight of the scheduling queue is the length of the data packet, the selected algorithm is a weighted difference polling scheduling algorithm DWRR; if the weight of the scheduled queue is the virtual completion time of the data packet, the selected algorithm is a weighted fair queuing algorithm WFQ.
CN201711102124.0A 2017-11-10 2017-11-10 Five-stage queue scheduling device and method for realizing hierarchical QoS Active CN107872403B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711102124.0A CN107872403B (en) 2017-11-10 2017-11-10 Five-stage queue scheduling device and method for realizing hierarchical QoS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711102124.0A CN107872403B (en) 2017-11-10 2017-11-10 Five-stage queue scheduling device and method for realizing hierarchical QoS

Publications (2)

Publication Number Publication Date
CN107872403A CN107872403A (en) 2018-04-03
CN107872403B true CN107872403B (en) 2019-12-24

Family

ID=61753684

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711102124.0A Active CN107872403B (en) 2017-11-10 2017-11-10 Five-stage queue scheduling device and method for realizing hierarchical QoS

Country Status (1)

Country Link
CN (1) CN107872403B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109819457B (en) * 2019-01-25 2020-05-22 云南大学 Two-stage threshold polling system based on FPGA
CN109951399A (en) * 2019-03-25 2019-06-28 网宿科技股份有限公司 Processing method, server and the interchanger of request of data
CN113906720B (en) * 2019-06-12 2024-05-10 华为技术有限公司 Traffic scheduling method, traffic scheduling device and storage medium
CN110493822B (en) * 2019-08-06 2021-08-24 京信网络系统股份有限公司 Point-to-multipoint communication device and system
CN110808916B (en) * 2019-10-31 2022-12-09 武汉二进制半导体有限公司 Qos implementation method and system based on clustering design
CN112995056B (en) * 2019-12-16 2023-09-15 中兴通讯股份有限公司 Traffic scheduling method, electronic equipment and storage medium
CN111416779B (en) * 2020-03-27 2022-04-19 西安电子科技大学 Internet service queue scheduling method based on time limit
CN113472684A (en) * 2020-03-31 2021-10-01 深圳市中兴微电子技术有限公司 Traffic scheduling method and network processor
CN115086238B (en) * 2022-08-23 2022-11-22 中国人民解放军国防科技大学 TSN network port output scheduling device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9521089B2 (en) * 2014-08-30 2016-12-13 International Business Machines Corporation Multi-layer QoS management in a distributed computing environment
CN106851746A (en) * 2016-12-26 2017-06-13 上海交通大学 The method for realizing software definition QoS configurations in radio sensing network is calculated based on mist
CN106533806B (en) * 2016-12-26 2020-05-22 上海交通大学 Method for providing cross-layer QoS based on application awareness in multi-tenant SDN network
CN107302498B (en) * 2017-06-21 2019-08-27 安徽大学 The multiple domain QoS path calculation method of secret protection is supported in a kind of SDN network

Also Published As

Publication number Publication date
CN107872403A (en) 2018-04-03

Similar Documents

Publication Publication Date Title
CN107872403B (en) Five-stage queue scheduling device and method for realizing hierarchical QoS
Semeria Supporting differentiated service classes: queue scheduling disciplines
WO2007101152A2 (en) Management of packet congestion in packet switching network
CN101964758A (en) Differentiated service-based queue scheduling method
EP3029898B1 (en) Virtual output queue authorization management method and device, and computer storage medium
EP1561317A1 (en) Method for selecting a logical link for a packet in a router
US8379518B2 (en) Multi-stage scheduler with processor resource and bandwidth resource allocation
US11695702B2 (en) Packet forwarding apparatus, method and program
Balogh et al. Performance evaluation of WFQ, WF 2 Q+ and WRR queue scheduling algorithms
WO2016082603A1 (en) Scheduler and dynamic multiplexing method for scheduler
CN105915468B (en) A kind of dispatching method and device of business
CN108667746B (en) Method for realizing service priority in deep space delay tolerant network
US20050047415A1 (en) Data traffic manager and method therefor
JP2001211207A (en) Packet transmission method, packet transmitter and band ensuring method
CN106899514B (en) Queue scheduling method for guaranteeing multimedia service quality
JP2001197110A (en) Traffic control method
JP2020022023A (en) Packet transfer device, method, and program
JP4087279B2 (en) BAND CONTROL METHOD AND BAND CONTROL DEVICE THEREOF
CN110932995A (en) QoS queue scheduling implementation method
US20090073878A1 (en) Usage based queuing with accounting for wireless access points
Tokmakov et al. A case for data centre traffic management on software programmable ethernet switches
Hong et al. Hardware-efficient implementation of WFQ algorithm on NetFPGA-based OpenFlow switch
Kulhari et al. Traffic shaping at differentiated services enabled edge router using adaptive packet allocation to router input queue
RU2696218C1 (en) Method of managing queues in routers of transport communication network
CN113242606B (en) Low-delay data transmission method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant