CN112929294A - Message scheduling method and device - Google Patents

Message scheduling method and device Download PDF

Info

Publication number
CN112929294A
CN112929294A CN201911244972.4A CN201911244972A CN112929294A CN 112929294 A CN112929294 A CN 112929294A CN 201911244972 A CN201911244972 A CN 201911244972A CN 112929294 A CN112929294 A CN 112929294A
Authority
CN
China
Prior art keywords
queue
sub
bandwidth
requested
parent
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.)
Pending
Application number
CN201911244972.4A
Other languages
Chinese (zh)
Inventor
周媛
姚为骏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201911244972.4A priority Critical patent/CN112929294A/en
Publication of CN112929294A publication Critical patent/CN112929294A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • 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/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/622Queue service order

Abstract

The embodiment of the application discloses a message scheduling method and a message scheduling device, and particularly, when a target queue acquires a bandwidth to be allocated, network equipment allocates the requested bandwidth to each sub-queue according to a state table of the target queue. Wherein the state table includes bandwidth requested by each child queue having the target queue as a parent queue. And if the sub-queues are non-flow queues at the moment, taking each sub-queue as a new target queue, and allocating the requested bandwidth to the sub-queues again according to the state table of the new target queue until the sub-queues are flow queues, thereby completing the allocation of the corresponding bandwidth to each sub-queue. And the network equipment outputs the messages corresponding to the sub-queues according to the bandwidth distributed to each sub-queue. In the embodiment of the present application, the target queue may be any scheduling level, such as an egress port queue and a user queue, and the software algorithm is used to realize any expansion of the scheduling level, and allocate required scheduling resources to each sub-queue to realize scheduling output of the message.

Description

Message scheduling method and device
Technical Field
The present application relates to the field of data transmission technologies, and in particular, to a method and an apparatus for scheduling a packet.
Background
With the continuous development of communication services, new services require that a traffic scheduler can support a new scheduling model in time. The current Traffic Manager (TM) architecture is based on Modified Differentiated Round Robin (MDRR) queue scheduling. The scheduling architecture has fixed scheduling levels, can only support limited service models, and can support a new scheduling model only in a chip iteration mode if the new scheduling model is required to be met. However, the iteration time of the chip is usually 3-5 years, so that the market cannot respond to the requirement of a new service in time.
Disclosure of Invention
In view of this, embodiments of the present application provide a method and an apparatus for scheduling a packet, so as to implement any extension of a scheduling hierarchy.
In order to solve the above problem, the technical solution provided by the embodiment of the present application is as follows:
in a first aspect, a method for scheduling packets is provided, where the method is applied to a network device, and the method includes: allocating the requested bandwidth to a child queue according to a state table of a target queue, wherein the state table comprises the bandwidth requested by the child queue taking the target queue as a parent queue; when the sub-queue is a non-flow queue, taking the sub-queue as a target queue, and repeatedly executing the operation of distributing the requested bandwidth for the sub-queue according to the state table of the target queue until the sub-queue is a flow queue; and outputting the message corresponding to the sub-queue according to the bandwidth allocated to the sub-queue.
In this embodiment, the network device allocates the requested bandwidth to each sub-queue according to the state table of the target queue. The state table records the bandwidth requested by each sub-queue taking the target queue as the parent queue. And if the sub-queues are non-flow queues at the moment, taking each sub-queue as a new target queue, and allocating the requested bandwidth to the sub-queues again according to the state table of the new target queue until the sub-queues are flow queues, thereby completing the allocation of the corresponding bandwidth to each sub-queue. And the network equipment outputs the messages corresponding to the sub-queues according to the bandwidth distributed to each sub-queue.
In some implementations, the sub-queue has a priority, and the allocating the requested bandwidth for the sub-queue includes: and allocating the requested bandwidth to the sub-queues according to the priorities of the sub-queues, wherein the bandwidth to be allocated corresponding to the target queue is smaller than the sum of the bandwidth requested by each sub-queue in the state table. In this embodiment, when the bandwidth to be allocated corresponding to the target queue is smaller than the sum of the bandwidths requested by the sub-queues corresponding to the target queue, bandwidth allocation is performed according to the priorities of the sub-queues, so that the bandwidth requirements of the sub-queues with higher priorities are met preferentially.
In some implementations, a sub-queue has a weight, the allocating the requested bandwidth for the sub-queue includes: and allocating the bandwidth for the sub-queues according to the weights of the sub-queues, wherein the bandwidth to be allocated corresponding to the target queue is smaller than the bandwidth neutralization requested by each sub-queue in the state table. In this embodiment, when the bandwidth to be allocated corresponding to the target queue is smaller than the sum of the bandwidths requested by the sub-queues corresponding to the target queue, bandwidth allocation is performed in sequence according to the weights of the sub-queues, so that each sub-queue is allocated to the bandwidth of the corresponding weight, so as to perform subsequent message scheduling.
In some implementations, configuring a preset information rate for a sub-queue, and allocating a requested bandwidth to the sub-queue according to the state table of the target queue includes: and allocating a bandwidth corresponding to the preset information rate to the sub-queue according to a state table of the target queue, wherein the preset information rate is a Committed Information Rate (CIR) or a Peak Information Rate (PIR). In this embodiment, when the sub-queue is configured with the preset information rate, and when the bandwidth is allocated to the sub-queue, the bandwidth corresponding to the preset information rate is allocated to the sub-queue, so as to satisfy the bandwidth required by the preset information rate in advance. The preset information rate is CIR or PIR, wherein CIR refers to the information transmission rate which can be ensured in the normal state of the network; PIR refers to the maximum rate at which a message is allowed to be transmitted.
In some implementations, when the sub-queue configures CIR and PIR simultaneously, the allocating the requested bandwidth for the sub-queue according to the state table of the target queue includes: allocating bandwidth corresponding to the CIR to the sub-queue according to a state table of a target queue; and allocating the bandwidth corresponding to the PIR for the sub-queue. In the embodiment, the bandwidth corresponding to the CIR is preferentially met to ensure the normal scheduling of the packet, and then the bandwidth corresponding to the PIR is allocated to the sub-queue.
In some implementations, after the sub-queue in the state table is allocated with the requested bandwidth, the method further includes: the state of the sub-queue is set to invalid. In this embodiment, after the bandwidth is allocated to the sub-queue, the state of the sub-queue is set to be invalid in the state table, thereby avoiding duplicate allocation.
In some implementations, the method further includes: and establishing threads with the number of the sub-queues according to the number of the sub-queues corresponding to the target queue, so as to distribute the requested bandwidth for each sub-queue by utilizing the threads. That is, to improve the bandwidth allocation efficiency, multiple threads may be established according to the number of sub-queues, so as to allocate the requested bandwidth to each sub-queue in parallel using the multiple threads.
In some implementations, prior to allocating the requested bandwidth for the sub-queue according to the state table of the target queue, the method further includes: sending a bandwidth request of a sub queue to a corresponding parent queue, wherein the bandwidth request comprises the bandwidth requested by the sub queue; recording the bandwidth requested by the sub queue in a state table of the parent queue, and setting the state of the sub queue to be effective; and when the parent queue is a non-egress port queue, taking the parent queue as a child queue, and repeatedly sending the bandwidth request of the child queue to the corresponding parent queue until the parent queue is the egress port queue. In this embodiment, the bandwidth requested by each sub-queue may be sequentially reported to the upper parent queue, and the bandwidth requested by each sub-queue is recorded in the state table corresponding to the parent queue, so that when bandwidth allocation is performed, bandwidth allocation may be performed according to the state table.
In some implementations, after sending the bandwidth request of the child queue to the corresponding parent queue, the method further includes: and taking the available bandwidth of the parent queue as a reporting bandwidth, wherein the sum of the bandwidths requested by the child queues is greater than the available bandwidth of the parent queue. In this embodiment, after the parent queue receives the bandwidth requests of the corresponding child queues, the network device determines whether the sum of the bandwidths requested by the child queues is greater than the available bandwidth of the parent queue, and if so, takes the available bandwidth of the parent queue as the bandwidth reported to the superior parent queue, thereby avoiding the reported bandwidth from exceeding the available bandwidth corresponding to the parent queue. And if the sum of the bandwidths requested by the sub queues is smaller than the available bandwidth of the parent queue, taking the sum of the bandwidths requested by the sub queues as the reported bandwidth.
In some implementations, when the sub-queue configures the preset information rate, before sending the bandwidth request of the sub-queue to the corresponding parent queue, the method further includes: if the bandwidth requested by the sub-queue is greater than a preset information rate, taking the bandwidth corresponding to the preset information rate as the bandwidth requested by the sub-queue; the preset information rate is a committed information rate CIR or a peak information rate PIR. That is, in this embodiment, when the sub-queue is configured with the preset information rate, when the bandwidth request of the sub-queue is sent to the parent queue, it is first determined whether the bandwidth requested by the sub-queue is greater than the bandwidth corresponding to the preset information rate, and if so, the bandwidth corresponding to the preset information rate is taken as the bandwidth requested by the sub-queue.
In some implementations, when the sub-queue configures CIR and PIR, determining whether a bandwidth requested by the sub-queue is greater than a bandwidth corresponding to a preset information rate includes: determining whether the bandwidth requested by the sub-queue is larger than the bandwidth corresponding to the PIR; and if so, taking the bandwidth corresponding to the PIR as the bandwidth requested by the sub-queue. In this embodiment, if the sub-queue configures CIR and PIR at the same time, since the bandwidth corresponding to PIR is greater than the bandwidth corresponding to CIR, when determining whether the bandwidth requested by the sub-queue is greater than the bandwidth corresponding to the preset information rate, it is determined whether the bandwidth requested by the sub-queue is greater than the bandwidth corresponding to PIR.
In some implementations, the method further includes: and recording the preset information rate configured by the child queue in a state table of the parent queue, so that the bandwidth can be distributed according to the preset information rate when the bandwidth is distributed.
In some implementations, the sending the bandwidth request of the child queue to the parent queue specifically includes: and sending the bandwidth request to the corresponding parent queue according to the priority of each child queue. In this embodiment, when sending the bandwidth request, the sending may be performed according to the priority of the sub-queue, so as to preferentially satisfy the bandwidth request of the sub-queue with higher priority.
In a second aspect, a packet scheduling apparatus is provided, where the apparatus is applied to a network device, and the apparatus includes an allocating unit, a first determining unit, and a scheduling unit. The allocation unit is used for allocating the requested bandwidth to the sub-queue according to a state table of the target queue, and the state table comprises the bandwidth requested by the sub-queue taking the target queue as the parent queue. The first determining unit is configured to, when the sub-queue is a non-flow queue, use the sub-queue as a target queue, and repeatedly perform an operation of allocating the requested bandwidth to the sub-queue by the allocating unit according to the state table of the target queue until the sub-queue is a flow queue. And the scheduling unit is used for outputting the message corresponding to the sub-queue according to the bandwidth distributed to the sub-queue.
In some implementations, the sub-queue has a priority, the allocating unit is specifically configured to allocate the requested bandwidth to the sub-queue according to the priority of the sub-queue, and the bandwidth to be allocated corresponding to the target queue is smaller than a sum of the bandwidth requested by each of the sub-queues in the state table.
In some implementations, the sub-queue has a weight. The allocating unit is specifically configured to allocate bandwidth to the sub-queues according to the weights of the sub-queues, and the bandwidth to be allocated corresponding to the target queue is smaller than the sum of the bandwidths requested by the sub-queues in the state table.
In some implementations, the sub-queue configures a preset information rate. The allocating unit is specifically configured to allocate a bandwidth corresponding to the preset information rate to the sub-queue according to a state table of a target queue, where the preset information rate is a committed information rate CIR or a peak information rate PIR.
In some implementations, the allocation unit includes a first allocation subunit and a second allocation subunit when the sub-queue configures the CIR and the PIR. And the first allocating subunit is used for allocating the bandwidth corresponding to the CIR for the sub-queue according to a state table of the target queue. The second sub-allocation subunit is configured to allocate a bandwidth corresponding to the PIR for the sub-queue.
In some implementations, the apparatus further includes a configuration unit, where the configuration unit is configured to set the state of the sub-queue to be invalid after the sub-queue in the state table is allocated with the requested bandwidth.
In some implementation manners, the apparatus further includes an establishing unit, where the establishing unit is configured to establish, according to the number of sub-queues corresponding to the target queue, threads of the number of sub-queues, so as to allocate the requested bandwidth to each sub-queue by using the threads.
In some implementations, the apparatus further includes a transmitting unit, a recording unit, and a second determining unit. The sending unit is configured to send a bandwidth request of the sub-queue to a corresponding parent queue before the allocating unit is executed, where the bandwidth request includes a bandwidth requested by the sub-queue. The recording unit is used for recording the bandwidth requested by the sub queue in the state table of the parent queue and setting the state of the sub queue to be effective. The second determining unit is configured to, when the parent queue is a non-egress-port queue, use the parent queue as a child queue, and repeatedly execute an operation of the sending unit sending the bandwidth request of the child queue to the corresponding parent queue until the parent queue is an egress-port queue.
In some implementations, the apparatus further includes a third determining unit. The third determining unit is configured to use the available bandwidth of the parent queue as a reporting bandwidth, where a sum of bandwidths requested by the child queues is greater than the available bandwidth of the parent queue.
In some implementations, when the sub-queue configures a preset information rate, the apparatus further includes a fourth determining unit. The fourth determining unit is configured to, when the bandwidth requested by the sub-queue is greater than a preset information rate, take a bandwidth corresponding to the preset information rate as the bandwidth requested by the sub-queue; the preset information rate is a committed information rate CIR or a peak information rate PIR.
In some implementations, when the sub-queue configures the CIR and the PIR, the second determining unit is specifically configured to determine whether a bandwidth requested by the sub-queue is greater than a bandwidth corresponding to the PIR.
In some implementations, the recording unit is further configured to record the preset information rate configured by the child queue in the state table of the parent queue.
In some implementations, the sending unit is specifically configured to send the bandwidth request to the corresponding parent queue according to the priority of each child queue.
In a third aspect, a network device is provided that includes a memory and a memory. Wherein the memory is used to store computer program code or instructions. The processor is configured to run the computer program code or the instructions to enable the network device to perform the message scheduling method according to the first aspect.
In a fourth aspect, a computer readable storage medium is provided, which stores computer program code or instructions, which when run on a computer, causes the computer to perform the message scheduling method of the first aspect above.
According to the technical scheme of the embodiment of the application, when the target queue acquires the bandwidth to be allocated, the network equipment allocates the requested bandwidth to each sub-queue according to the state table of the target queue. The state table records the bandwidth requested by each sub-queue taking the target queue as the parent queue. And if the sub-queues are non-flow queues at the moment, taking each sub-queue as a new target queue, and allocating the requested bandwidth to the sub-queues again according to the state table of the new target queue until the sub-queues are flow queues, thereby completing the allocation of the corresponding bandwidth to each sub-queue. And the network equipment outputs the messages corresponding to the sub-queues according to the bandwidth distributed to each sub-queue. That is, in the embodiment of the present application, the target queue may be at any scheduling level, such as an egress port queue, a group queue, a user queue, and the like, that is, any expansion of the scheduling level is realized through a software algorithm, and a required scheduling resource is allocated to each sub-queue to realize scheduling output of a message.
Drawings
Fig. 1 is a flowchart of a message scheduling method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a scheduling hierarchy according to an embodiment of the present application;
fig. 3 is a flowchart of a bandwidth request according to an embodiment of the present application;
fig. 4 is a flowchart of another message scheduling method according to an embodiment of the present application;
fig. 5 is a flowchart of bandwidth allocation provided in an embodiment of the present application;
fig. 6 is a structural diagram of a message scheduling apparatus according to an embodiment of the present application;
fig. 7 is a diagram of a network device structure according to an embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanying the drawings are described in detail below.
The scheduler architecture may implement scheduling of queues based on various scheduling algorithms such as Round Robin (RR), Weighted Round Robin (WRR), etc. The RR scheduling algorithm is a fair scheduling algorithm, and schedules a packet to dequeue from the second queue after scheduling a packet to dequeue from the first queue. The WRR scheduling algorithm is based on weighted scheduling of the messages, and configures a corresponding weight for each queue, where the weight is used to indicate the number of messages that can be scheduled out in each round of the queue. And when the current queue is dispatched with a preset number of messages for dequeuing, dispatching the next queue with a corresponding number of messages for dequeuing.
Some scheduler architectures are based on an MDRR scheduling algorithm, and the scheduling levels corresponding to the MDRR scheduling algorithm are fixed, only limited service models are supported, and a new scheduling model is difficult to meet. To extend the scheduling hierarchy, an additional scheduler can be added to the MDRR scheduler, extending the scheduling topology and scheduling algorithm by programming. However, due to the complexity of programming, poor performance, and limited flexibility, it is still difficult to satisfy the new scheduling model.
Based on this, an embodiment of the present application provides a packet scheduling method, where for a scheduler of a network device, a bandwidth request corresponding to each sub-queue is obtained, and the bandwidth request is sent to a parent queue corresponding to the sub-queue. The parent queue obtains the bandwidth requests of all the child queues connected with the parent queue, and records the bandwidth requested by each child queue in a corresponding state table. And after the father queue obtains the total bandwidth request, reporting the bandwidth request to the superior father queue until the father queue is an output port queue.
And after the output port queue acquires the final bandwidth request, distributing the requested bandwidth for the sub-queue according to the bandwidth to be distributed and the state table corresponding to the output port queue. And then, taking the sub-queue corresponding to the egress port queue as a new target queue, and allocating the requested bandwidth to the sub-queue of the new target queue until the sub-queue is a flow queue, which indicates that the lowest level is reached and bandwidth allocation is not required again. And finally, the scheduler performs scheduling output on the messages corresponding to the sub-queues according to the bandwidth allocated to each sub-queue.
It should be noted that the message scheduling method provided in the embodiment of the present application is applied to scheduling between different queues in a network device, and the network device in the embodiment is a device with a message forwarding function, such as a router and a switch.
In order to facilitate understanding of the technical solutions provided by the present application, the following describes a message scheduling method provided by the present application with reference to the accompanying drawings. Specifically, the procedure of requesting bandwidth will be described first.
Referring to fig. 1, which is a flowchart of a message scheduling method provided in the embodiment of the present application, as shown in fig. 1, the method is applied to a network device, and specifically may include:
s101: and sending the bandwidth request of the child queue to the corresponding parent queue.
In this embodiment, a scheduler of the network device obtains a bandwidth request from the first-level queue, and sends the obtained bandwidth request to a corresponding parent queue. The sub-queue corresponds to each queue of the downstream scheduling hierarchy, and the parent queue corresponds to the queue of the upstream scheduling hierarchy to which the sub-queue belongs, as shown in fig. 2. If the Flow Queue (FQ) belongs to a user queue (SQ), the FQ is a child queue and the SQ is a parent queue; if SQ belongs to a Group Queue (GQ), the SQ is a child queue, and the GQ is a parent queue; if GQ belongs to a egress port (DP) queue, GQ is a child queue and DP is a parent queue. As can be seen from fig. 2, if the parent queue corresponding to the child queue FQ0 and the FQ1 is SQ0, and the parent queue corresponding to the FQ1 and the FQ2 is SQ1, the bandwidth requests of the FQ0 and the FQ1 are sent to SQ0, and the bandwidth requests of the FQ1 and the FQ2 are sent to SQ 1. It should be noted that fig. 2 is only an example of a scheduling hierarchy, and in practical applications, a user may add a hierarchy between the FQ and the DP according to actual needs.
In a specific implementation, when the network device receives a message to be processed, the received message may be classified, and different types of messages are added to the flow queues with different priorities, so that the network device may process the message with a higher priority in priority. The common message classification bases are: a physical interface, a Media Access Control (MAC) address, an Internet Protocol (IP) quintuple (source address, source port number, protocol number, destination address, egress port number), and the like. Further, when each of the child queues is configured with a priority, the bandwidth requests of the child queues may be sequentially transmitted to the parent queue according to the priority of each of the child queues when transmitting the bandwidth requests of the child queues to the corresponding parent queue.
In addition, in practical applications, each sub-queue may be configured with a preset information rate in advance, where the preset information rate indicates that, in some application scenarios, the bandwidth allocated to the sub-queue needs to meet the preset information rate. Therefore, before the bandwidth request of the sub-queue is sent to the corresponding parent queue, the sizes of the bandwidth requested by the sub-queue and the preset information rate can also be determined, and if the bandwidth requested by the sub-queue is greater than the preset information rate, the preset information rate is used as the bandwidth requested by the sub-queue. That is, when the actual bandwidth requested by the sub-queue is greater than the preset information rate, the preset information rate is used as the bandwidth requested by the sub-queue. If the bandwidth requested by the sub-queue is not larger than the preset information rate, the bandwidth requested by the sub-queue is reported to the parent queue.
The preset information rate may be a Committed Information Rate (CIR), where the CIR indicates a packet transmission rate provided by the network device for the user in a normal state, or a Peak Information Rate (PIR), and the PIR indicates a maximum rate at which the packet is allowed to be transmitted. And if the preset information rate is CIR or PIR, determining whether the bandwidth requested by the sub-queue is greater than the set CIR or PIR, and if so, taking the bandwidth corresponding to the CIR or PIR as the bandwidth requested by the sub-queue. If the CIR and the PIR are configured at the same time in the sub-queue, when determining whether the bandwidth requested by the sub-queue is larger than the preset information rate, determining whether the bandwidth requested by the sub-queue is larger than the bandwidth corresponding to the PIR, and if the bandwidth requested by the sub-queue is larger than the bandwidth corresponding to the PIR, taking the bandwidth corresponding to the PIR as the bandwidth requested by the sub-queue.
When the sub-queues are configured with the preset information rate CIR and/or PIR, the preset information rate of each sub-queue can also be recorded in the state table of the parent queue, so that when bandwidth allocation is performed, allocation can be performed according to the preset information rate.
S102: and recording the bandwidth requested by the child queue in a state table of the parent queue, and setting the state of the child queue to be valid.
When the bandwidth request of the sub-queue is sent to the corresponding parent queue, the bandwidth requested by each sub-queue is recorded in the state table of the parent queue, and the state of the sub-queue is set to be valid so as to indicate that the sub-queue requests the bandwidth. The state of the sub-queue is set to be valid, and the state can be represented by setting the state field corresponding to the sub-queue in the state table to be 1.
It should be noted that, in practical applications, the available bandwidth of each parent queue may be preset, so as to limit the upper limit of the bandwidth requested by the parent queue. Therefore, after the bandwidth requests of each sub-queue are sent to the parent queue, whether the sum of the bandwidth requested by each sub-queue is larger than the available bandwidth of the parent queue can be determined, and if the sum of the bandwidth requested by each sub-queue is larger than the available bandwidth of the parent queue, the available bandwidth of the parent queue is used as the report bandwidth to be reported to the upper-level parent queue; and if the sum of the bandwidths requested by the sub queues is not more than the available bandwidth of the parent queue, reporting the bandwidth to be equal to the sum of the bandwidths requested by the sub queues. As shown in fig. 2, assuming that an available bandwidth of SQ0 is 500M, a bandwidth requested by FQ0 is 300M, and a bandwidth requested by FQ1 is 250M, a bandwidth reported by SQ0 to GQ0 is 500M; if the bandwidth requested by the FQ0 is 200M and the bandwidth requested by the FQ1 is 250M, the bandwidth reported by the SQ0 to the GQ0 is 450M.
It should be noted that, although the sum of the bandwidth requested by each sub-queue is greater than the available bandwidth of the parent queue, the actually requested bandwidth of each word queue is recorded in the state table of the parent queue. For example, FQ 0-300M, FQ 1-250M are recorded in the state table of SQ 0.
S103: determining whether the current father queue is an exit port queue, if so, ending the bandwidth request; if not, S104 is executed.
S104: s101 is executed with the parent queue as the child queue.
And sending the bandwidth request of the child queue to a parent queue, determining whether the current parent queue is an exit port queue, and if the current parent queue is the exit port queue, indicating that the bandwidth request is sent to the highest level, ending the bandwidth request and not sending the bandwidth request. If the current queue is not the exit port queue, the parent queue is used as a child queue, the bandwidth request of the child queue is sent to the corresponding parent queue, and the execution is repeated until the parent queue is the exit port queue.
That is, when the parent queue is SQ or GQ, SQ or GQ may be used as a child queue, and the bandwidth request of the child queue is reported to the parent queue at the previous stage; when the parent queue is DP, the bandwidth request transmission is stopped.
For ease of understanding, fig. 2 is taken as an example for illustration. A scheduler (TM) of the network device receives a bandwidth request sent by each FQ, where the bandwidth request includes a bandwidth actually requested by the FQ. The TM sends bandwidth requests of the FQ0 and the FQ1 to SQ0, records the bandwidth requested by the FQ0 and the bandwidth requested by the FQ1 in a state table of SQ0, and sets the states of the FQ0 and the FQ1 to valid in the state table. The bandwidth requests of the FQ2 and the FQ3 are sent to SQ1, the bandwidth requested by the FQ2 and the bandwidth requested by the FQ3 are recorded in a state table of SQ1, and the states of the FQ2 and the FQ3 are set to valid in a state table of SQ 1.
When the TM sends a bandwidth request of SQ0 to the GQ0, the TM first compares whether the total bandwidth requested by FQ0 and FQ1 is greater than the available bandwidth of SQ0, and if the total bandwidth requested by FQ0 and FQ1 is not greater than the available bandwidth of SQ0, the reported bandwidth is the total bandwidth of FQ0 and FQ1 when the scheduler reports to the GQ 0. And if the total bandwidth requested by the FQ0 and the FQ1 is larger than the available bandwidth of SQ0, reporting the available bandwidth of which the bandwidth is SQ 0. Similarly, the scheduler sends a bandwidth request for SQ1 to the GQ 0. Recording related information of SQ0 and SQ1 in a state table of the GQ0, and sending a bandwidth request of the GQ0 to the DP. When the bandwidth request is sent to the egress port queue, the bandwidth request is stopped, and the scheduler performs bandwidth allocation according to the available bandwidth allocated by the egress port and the bandwidth request of the sub-queue.
In some embodiments, to improve the bandwidth request processing performance, a process of processing the bandwidth of a plurality of sub-queues by establishing a multi-thread manner can be used. In particular, the identifiers of the queues may be range-divided, and one or more processing threads may be configured for queues of different ranges.
For understanding the overall flow of the bandwidth request, referring to the bandwidth request flow chart shown in fig. 3, the following steps may be specifically included:
s301: and acquiring the bandwidth request of the child queue, and enqueuing to the parent queue according to the priority.
S302: if the child queue is configured with CIR and PIR, the CIR and PIR are recorded in the state table of the parent queue, and the child queue is set to be valid.
S303: determining whether the father queue is an exit port queue DP, and if so, stopping the bandwidth request; if not, S304 is performed.
S304: determining whether the sum of the request bandwidths of the sub queues is larger than the available bandwidth of the parent queue, if so, executing S305; otherwise, S306 is executed.
S305: and determining the available bandwidth of the parent queue as the reported bandwidth.
S306: and determining the sum of the request bandwidths of the sub-queues as the reported bandwidth.
S307: s301 is executed with the current parent queue as the child queue.
For facilitating understanding of specific implementation of bandwidth allocation, the following describes a technical solution for allocating bandwidth resources with reference to the accompanying drawings.
Referring to fig. 4, which is a flowchart of another packet scheduling method provided in the embodiment of the present application, as shown in fig. 4, the method applies to a network device, and the method may include:
s401: and allocating the requested bandwidth for the sub-queues according to the state table of the target queue.
In this embodiment, when the bandwidth request reaches the egress port queue, the scheduler does not report the bandwidth request, and the target queue is the egress port queue. And then, distributing the requested bandwidth for each subqueue according to the available bandwidth of the egress port queue and the state table corresponding to the egress port queue. The state table records the bandwidth requested by each sub-queue taking the target queue as the parent queue.
In specific implementation, before allocating bandwidth requests to the sub-queues, whether the bandwidth to be allocated corresponding to the target queue is smaller than the sum of the bandwidths requested by the sub-queues in the state table or not is determined, and if the bandwidth to be allocated corresponding to the target queue is smaller than the sum of the bandwidths requested by the sub-queues in the state table, the requested bandwidth is allocated to the sub-queues according to the priority of the sub-queues; and if the bandwidth to be allocated corresponding to the target queue is not less than the sum of the bandwidths requested by each sub-queue in the state table, directly and sequentially allocating the bandwidths requested by the sub-queues. For example, if the available bandwidth of the DP is 1000M, the bandwidth requested by the first GQ is 300M, and the bandwidth requested by the second GQ is 500M, then 300M bandwidth is sequentially allocated to the first GQ, and 500M bandwidth is sequentially allocated to the second GQ. If the available bandwidth of the DP is 600M and the priority of the first GQ is higher than that of the second GQ, the first GQ is preferentially allocated 300M and the remaining 300 bandwidth is allocated to the second GQ.
Further, when each sub-queue is configured with a weight and the bandwidth to be allocated corresponding to the target queue is smaller than the sum of the bandwidths requested by the sub-queues in the state table, allocating the bandwidth for the sub-queue according to the weight of the sub-queue when the bandwidth is allocated for the sub-queue. For example, the bandwidth to be allocated corresponding to GP0 is 800M, the bandwidth requested by SQ0 is 600M, the bandwidth requested by SQ1 is 500, the weight of SQ0 is 0.7, the weight of SQ1 is 0.3, and if so, 560M is allocated for SQ 1. SQ2 allocates 240M.
It should be noted that, since each sub-queue can be configured with a preset information rate, when the sub-queue is configured with the preset information rate, and when the sub-queue is allocated with the requested bandwidth, the sub-queue is allocated with the bandwidth of the preset information rate according to the state table of the target queue. That is, the preset information rate set by the target queue is met when bandwidth allocation is performed. The predetermined information rate may be a committed information rate or a peak information rate. It can be understood that, when a sub-queue configures a preset information rate when a bandwidth request is made, the preset information rate of each sub-queue will be recorded in the state table of the parent queue, and therefore, when bandwidth allocation is made, a bandwidth of the preset information rate can be allocated to the sub-queue according to the state table of the target queue.
Specifically, when the sub-queue configures the committed information rate and the peak information rate at the same time, when allocating the requested bandwidth to the sub-queue, firstly allocating the bandwidth of the committed information rate to the sub-queue according to the state table of the target queue; and then allocates bandwidth for the peak information rate to the sub-queue. I.e., bandwidth that preferentially satisfies the committed information rate of the sub-queue, and then allocates the peak information rate of the sub-queue using the remaining bandwidth. For example, if the sub-queue 1 sets CIR and PIR at the same time, when allocating bandwidth to the sub-queue, the bandwidth corresponding to CIR is allocated first, and then the bandwidth corresponding to PIR is allocated from the remaining bandwidth. In addition, after the requested bandwidth is allocated to the sub-queue, the state of the sub-queue is set to be invalid in the state table, which indicates that the sub-queue has already allocated the bandwidth.
In practical application, to improve the bandwidth allocation processing performance, multi-thread processing may be performed, and specifically, threads with the number of sub-queues are established according to the number of sub-queues corresponding to the target queue, so as to allocate the requested bandwidth to the sub-queues at the same time by using multi-thread.
S402: determining whether the sub-queue is a flow queue, and if the sub-queue is not the flow queue, executing S403; if the sub-queue is a flow queue, S404 is performed.
S403: s401 is repeatedly executed with the sub queue as the target queue.
And when the bandwidth is completely distributed to the sub-queue, determining whether the sub-queue is a flow queue FQ, if the sub-queue is not the flow queue FQ, using the sub-queue as a target queue to distribute the bandwidth to the sub-queue of the target queue until the sub-queue is the flow queue FQ, and finishing the bandwidth distribution.
S404: and outputting the messages corresponding to the sub-queues according to the bandwidth allocated to each sub-queue.
After the bandwidth allocation is completed, the scheduler may output the packet corresponding to the sub-queue according to the bandwidth allocated to each sub-queue, thereby completing the scheduling of the packet.
As can be seen from the above description, when the target queue acquires the bandwidth to be allocated, the network device allocates the requested bandwidth to each sub-queue according to the state table of the target queue. The state table includes the bandwidth requested by each sub-queue taking the target queue as the parent queue. And if the sub-queues are non-flow queues at the moment, taking each sub-queue as a new target queue, and allocating the requested bandwidth to the sub-queues again according to the state table of the new target queue until the sub-queues are flow queues, thereby completing the allocation of the corresponding bandwidth to each flow queue. And the network equipment outputs the messages corresponding to the sub-queues according to the bandwidth distributed to each sub-queue. That is, in the embodiment of the present application, the target queue may be any scheduling hierarchy, such as an egress port queue, a group queue, a user queue, and the like, that is, any expansion of the scheduling hierarchy is realized through a software algorithm, and a required scheduling resource is allocated to each sub-queue to realize scheduling output of a message.
For the convenience of understanding the bandwidth allocation flow of the present application, refer to a bandwidth allocation flow chart shown in fig. 5, as shown in fig. 5:
s501: and sequentially distributing the CIR bandwidth and the PIR bandwidth for the effective sub-queues according to the available bandwidth of the target queue and the state table.
In the present embodiment, the sub-queue is described by taking the example where CIR and PIR information are arranged, and the sub-queue is not limited to the case where CIR and PIR information must be arranged.
S502: and setting the sub-queue state of the allocated bandwidth as invalid.
S503: determining whether the current sub-queue is a flow queue, and stopping bandwidth allocation if the current sub-queue is the flow queue; if the current sub-queue is not a flow queue, S504 is performed.
S505: the sub-queue is determined as the target queue, and S501 is performed.
Based on the above description, the embodiment of the application realizes hierarchical scheduling through software, can perform scheduling hierarchical definition according to user requirements, has high flexibility, does not influence the existing chip rack structure, and solves the problem that a scheduler TM cannot arbitrarily expand the hierarchy due to the limitation of hardware resources. Moreover, the method is simple and convenient to implement, and can save cost compared with the improvement of hardware resources.
Based on the above method embodiment, the embodiment of the present application further provides a message scheduling apparatus, and the apparatus is described below with reference to the accompanying drawings.
Referring to fig. 6, which is a structural diagram of a message scheduling apparatus provided in an embodiment of the present application, where the apparatus is applied to a network device, as shown in fig. 6, the apparatus may include:
an allocating unit 601, configured to allocate a requested bandwidth to a child queue according to a status table of a target queue, where the status table includes a bandwidth requested by the child queue using the target queue as a parent queue;
a first determining unit 602, configured to, when the sub-queue is a non-flow queue, use the sub-queue as a target queue, and repeatedly perform an operation of allocating, by the allocating unit, the requested bandwidth to the sub-queue according to a state table of the target queue until the sub-queue is a flow queue;
and the scheduling unit 603 is configured to output the packet corresponding to the sub-queue according to the bandwidth allocated to the sub-queue.
In a possible implementation manner, the sub-queue has a priority, the allocating unit is specifically configured to allocate the requested bandwidth to the sub-queue according to the priority of the sub-queue, and the bandwidth to be allocated corresponding to the target queue is smaller than a sum of the requested bandwidths of the sub-queues in the state table.
In a possible implementation manner, the sub-queue has a weight, and the allocating unit is specifically configured to allocate a bandwidth to the sub-queue according to the weight of the sub-queue, where a bandwidth to be allocated corresponding to the target queue is smaller than a sum of bandwidths requested by each of the sub-queues in the state table.
In a possible implementation manner, the sub-queue configures a preset information rate, and the allocating unit is specifically configured to allocate a bandwidth corresponding to the preset information rate to the sub-queue according to a state table of a target queue, where the preset information rate is a committed information rate CIR or a peak information rate PIR.
In one possible implementation manner, when the sub-queue configures the CIR and the PIR, the allocating unit includes:
a first allocating subunit, configured to allocate, according to a state table of a target queue, a bandwidth corresponding to the CIR to the sub-queue;
and the second sub-allocation subunit is used for allocating the bandwidth corresponding to the PIR for the sub-queue.
In one possible implementation, the apparatus further includes:
and the configuration unit is used for setting the state of the sub queue to be invalid after the sub queue in the state table is allocated with the requested bandwidth.
In one possible implementation, the apparatus further includes:
and the establishing unit is used for establishing threads with the sub-queue number according to the sub-queue number corresponding to the target queue so as to distribute the requested bandwidth for each sub-queue by utilizing the threads.
In one possible implementation, the apparatus further includes:
a sending unit, configured to send a bandwidth request of the child queue to a corresponding parent queue before executing the allocating unit, where the bandwidth request includes a bandwidth requested by the child queue;
the recording unit is used for recording the bandwidth requested by the sub queue in a state table of the parent queue and setting the state of the sub queue to be effective;
a second determining unit, configured to, when the parent queue is a non-egress-port queue, use the parent queue as a child queue, and repeatedly execute an operation in which the sending unit sends the bandwidth request of the child queue to a corresponding parent queue until the parent queue is an egress-port queue.
In one possible implementation, the apparatus further includes:
and a third determining unit, configured to use the available bandwidth of the parent queue as a reporting bandwidth, where a sum of bandwidths requested by the child queues is greater than the available bandwidth of the parent queue.
In a possible implementation manner, when the sub-queue configures a preset information rate, the apparatus further includes:
a fourth determining unit, configured to, when the bandwidth requested by the sub-queue is greater than a preset information rate, use a bandwidth corresponding to the preset information rate as the bandwidth requested by the sub-queue; the preset information rate is a committed information rate CIR or a peak information rate PIR.
In a possible implementation manner, when the sub-queue configures the CIR and the PIR, a bandwidth requested by the sub-queue is greater than a preset information rate, and the second determining unit includes: the bandwidth requested by the sub-queue is larger than the bandwidth corresponding to the PIR.
In a possible implementation manner, the recording unit is further configured to record the preset information rate configured by the child queue in a state table of the parent queue.
In a possible implementation manner, the sending unit is specifically configured to send the bandwidth request to the corresponding parent queue according to the priority of each child queue.
It should be noted that, implementation of each unit in this embodiment may refer to the above method embodiment, and this embodiment is not described herein again.
Based on the above embodiment, when the target queue acquires the bandwidth to be allocated, the network device allocates the requested bandwidth to each sub-queue according to the state table of the target queue. The state table records the bandwidth requested by each sub-queue taking the target queue as the parent queue. And if the sub-queues are non-flow queues at the moment, taking each sub-queue as a new target queue, and allocating the requested bandwidth to the sub-queues again according to the state table of the new target queue until the sub-queues are flow queues, thereby completing the allocation of the corresponding bandwidth to each sub-queue. And the network equipment outputs the messages corresponding to the sub-queues according to the bandwidth distributed to each sub-queue. That is, in the embodiment of the present application, the target queue may be at any scheduling level, such as an egress port queue, a group queue, a user queue, and the like, that is, any expansion of the scheduling level is realized through a software algorithm, and a required scheduling resource is allocated to each sub-queue to realize scheduling output of a message.
In addition, the embodiment of the present application further provides a network device 700. As shown in fig. 7, the network device 700 comprises a memory 701 and a processor 702, wherein the memory 701 is used for storing computer program codes or instructions; the processor 702 is configured to execute the computer program code or instructions to enable the network device 700 to execute the method according to any one of the above-described method embodiments.
In addition, the present application also provides a computer readable storage medium, in which computer program codes or instructions are stored, and when the computer program codes or instructions are executed on a computer, the computer is caused to execute the method in any implementation manner of the above method embodiments.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the system or the device disclosed by the embodiment, the description is simple because the system or the device corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (28)

1. A message scheduling method is applied to network equipment, and is characterized in that the method comprises the following steps:
allocating the requested bandwidth to a child queue according to a state table of a target queue, wherein the state table comprises the bandwidth requested by the child queue taking the target queue as a parent queue;
when the sub-queue is a non-flow queue, taking the sub-queue as a target queue, and repeatedly executing the allocation of the requested bandwidth to the sub-queue according to the state table of the target queue until the sub-queue is a flow queue;
and outputting the message corresponding to the sub-queue according to the bandwidth allocated to the sub-queue.
2. The method of claim 1, wherein the sub-queue has a priority, and wherein allocating the requested bandwidth for the sub-queue comprises:
and allocating the requested bandwidth to the sub-queues according to the priorities of the sub-queues, wherein the bandwidth to be allocated corresponding to the target queue is smaller than the sum of the bandwidth requested by each sub-queue in the state table.
3. The method of claim 1, wherein the sub-queue has a weight, and wherein allocating the requested bandwidth for the sub-queue comprises:
and allocating bandwidth to the sub-queues according to the weights of the sub-queues, wherein the bandwidth to be allocated corresponding to the target queue is smaller than the sum of the bandwidth requested by each sub-queue in the state table.
4. The method of claim 1, wherein the sub-queue is configured with a predetermined information rate, and wherein allocating the requested bandwidth to the sub-queue according to the status table of the target queue comprises:
and allocating a bandwidth corresponding to the preset information rate to the sub-queue according to a state table of the target queue, wherein the preset information rate is a Committed Information Rate (CIR) or a Peak Information Rate (PIR).
5. The method of claim 4, wherein allocating the requested bandwidth for the sub-queue according to a state table of a target queue when the sub-queue configures the CIR and the PIR comprises:
allocating bandwidth corresponding to the CIR to the sub-queue according to a state table of a target queue;
and allocating the bandwidth corresponding to the PIR for the sub-queue.
6. The method of claim 1, wherein after the sub-queue in the state table is allocated the requested bandwidth, the method further comprises:
and setting the state of the sub queue to be invalid.
7. The method of any one of claims 1-6, further comprising:
and establishing threads with the number of the sub-queues according to the number of the sub-queues corresponding to the target queue, so as to distribute the requested bandwidth for each sub-queue by utilizing the threads.
8. The method of claim 1, wherein prior to allocating the requested bandwidth for the sub-queue according to the state table of the target queue, the method further comprises:
sending a bandwidth request of a sub queue to a corresponding parent queue, wherein the bandwidth request comprises the bandwidth requested by the sub queue;
recording the bandwidth requested by the sub queue in a state table of the parent queue, and setting the state of the sub queue to be effective;
and when the parent queue is a non-egress port queue, taking the parent queue as a child queue, and repeatedly sending the bandwidth request of the child queue to the corresponding parent queue until the parent queue is the egress port queue.
9. The method of claim 8, wherein after sending the bandwidth request of the child queue to the corresponding parent queue, the method further comprises:
and taking the available bandwidth of the parent queue as a reporting bandwidth, wherein the sum of the bandwidths requested by the child queues is greater than the available bandwidth of the parent queue.
10. The method of claim 8, wherein when the sub-queue is configured with a preset information rate, before sending the bandwidth request of the sub-queue to the corresponding parent queue, the method further comprises:
if the bandwidth requested by the sub-queue is greater than a preset information rate, taking the bandwidth corresponding to the preset information rate as the bandwidth requested by the sub-queue; the preset information rate is a committed information rate CIR or a peak information rate PIR.
11. The method of claim 10, wherein when the sub-queue configures the PIR, the requested bandwidth of the sub-queue is greater than a preset information rate, comprising: the bandwidth requested by the sub-queue is larger than the bandwidth corresponding to the PIR.
12. The method of claim 10 or 11, further comprising:
and recording the preset information rate configured by the child queue in a state table of the parent queue.
13. The method according to claim 8, wherein the sending the bandwidth request of the child queue to the corresponding parent queue specifically comprises:
and sending the bandwidth request to the corresponding parent queue according to the priority of each child queue.
14. A message scheduling apparatus, wherein the apparatus is applied to a network device, and the apparatus comprises:
the allocation unit is used for allocating the requested bandwidth to the sub-queue according to a state table of the target queue, wherein the state table comprises the bandwidth requested by the sub-queue taking the target queue as a parent queue;
a first determining unit, configured to, when the sub-queue is a non-flow queue, use the sub-queue as a target queue, and repeatedly perform the step of allocating, by the allocating unit, the requested bandwidth to the sub-queue according to the state table of the target queue until the sub-queue is a flow queue;
and the scheduling unit is used for outputting the message corresponding to the sub-queue according to the bandwidth distributed to the sub-queue.
15. The apparatus according to claim 14, wherein the sub-queue has a priority, the allocating unit is specifically configured to allocate the requested bandwidth to the sub-queue according to the priority of the sub-queue, and the bandwidth to be allocated corresponding to the target queue is smaller than a sum of the requested bandwidths of the sub-queues in the status table.
16. The apparatus according to claim 14, wherein the sub-queue has a weight, the allocating unit is specifically configured to allocate bandwidth to the sub-queue according to the weight of the sub-queue, and the bandwidth to be allocated corresponding to the target queue is smaller than a sum of bandwidths requested by the sub-queues in the status table.
17. The apparatus according to claim 14, wherein the sub-queue is configured with a preset information rate, and the allocating unit is specifically configured to allocate a bandwidth corresponding to the preset information rate to the sub-queue according to a state table of a target queue, where the preset information rate is a committed information rate CIR or a peak information rate PIR.
18. The apparatus of claim 17, wherein when the sub-queue configures the CIR and the PIR, the allocating unit comprises:
a first allocating subunit, configured to allocate, according to a state table of a target queue, a bandwidth corresponding to the CIR to the sub-queue;
and the second sub-allocation subunit is used for allocating the bandwidth corresponding to the PIR for the sub-queue.
19. The apparatus of claim 14, further comprising:
and the configuration unit is used for setting the state of the sub queue to be invalid after the sub queue in the state table is allocated with the requested bandwidth.
20. The apparatus of any one of claims 14-19, further comprising: and the establishing unit is used for establishing threads with the sub-queue number according to the sub-queue number corresponding to the target queue so as to distribute the requested bandwidth for each sub-queue by utilizing the threads.
21. The apparatus of claim 14, further comprising:
a sending unit, configured to send a bandwidth request of the child queue to a corresponding parent queue before executing the allocating unit, where the bandwidth request includes a bandwidth requested by the child queue;
the recording unit is used for recording the bandwidth requested by the sub queue in a state table of the parent queue and setting the state of the sub queue to be effective;
a second determining unit, configured to, when the parent queue is a non-egress-port queue, use the parent queue as a child queue, and repeatedly execute an operation in which the sending unit sends the bandwidth request of the child queue to a corresponding parent queue until the parent queue is an egress-port queue.
22. The apparatus of claim 21, further comprising:
and a third determining unit, configured to use the available bandwidth of the parent queue as a reporting bandwidth, where a sum of bandwidths requested by the child queues is greater than the available bandwidth of the parent queue.
23. The apparatus of claim 21, wherein when the sub-queue configures a preset information rate, the apparatus further comprises:
a fourth determining unit, configured to, when the bandwidth requested by the sub-queue is greater than a preset information rate, use a bandwidth corresponding to the preset information rate as the bandwidth requested by the sub-queue; the preset information rate is a committed information rate CIR or a peak information rate PIR.
24. The apparatus of claim 23, wherein when the sub-queue configures the CIR and the PIR, the requested bandwidth of the sub-queue is greater than a preset information rate, comprising: the bandwidth requested by the sub-queue is larger than the bandwidth corresponding to the PIR.
25. The apparatus according to claim 23 or 24, wherein the recording unit is further configured to record the preset information rate configured by the child queue in the state table of the parent queue.
26. The apparatus according to claim 21, wherein the sending unit is specifically configured to send the bandwidth request to the corresponding parent queue according to the priority of each child queue.
27. A network device, comprising:
a memory for storing program code or instructions;
a processor for executing the program code or instructions to cause the network device to perform the message scheduling method of any of the preceding claims 1-13.
28. A computer-readable storage medium, characterized in that it stores program code or instructions which, when run on a computer, cause the computer to perform the message scheduling method according to any of the preceding claims 1-13.
CN201911244972.4A 2019-12-06 2019-12-06 Message scheduling method and device Pending CN112929294A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911244972.4A CN112929294A (en) 2019-12-06 2019-12-06 Message scheduling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911244972.4A CN112929294A (en) 2019-12-06 2019-12-06 Message scheduling method and device

Publications (1)

Publication Number Publication Date
CN112929294A true CN112929294A (en) 2021-06-08

Family

ID=76162053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911244972.4A Pending CN112929294A (en) 2019-12-06 2019-12-06 Message scheduling method and device

Country Status (1)

Country Link
CN (1) CN112929294A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030189943A1 (en) * 2002-04-08 2003-10-09 International Business Machines Corporation Priority based bandwidth allocation within real-time and non-real-time traffic streams
CN1645860A (en) * 2005-01-20 2005-07-27 中国科学院计算技术研究所 Terminal up dispatching method for voice service in wide band wireless cut-in network
CN103067308A (en) * 2012-12-26 2013-04-24 中兴通讯股份有限公司 Method and system for bandwidth distribution
CN103701722A (en) * 2014-01-02 2014-04-02 网神信息技术(北京)股份有限公司 Network bandwidth allocation method, device and system
US20140334301A1 (en) * 2013-05-07 2014-11-13 WMware Inc. Hierarchical allocation of network bandwidth for quality of service
CN105721350A (en) * 2016-03-04 2016-06-29 深圳市共进电子股份有限公司 Intelligent bandwidth allocation method and apparatus
CN109246023A (en) * 2018-11-16 2019-01-18 锐捷网络股份有限公司 Flow control methods, the network equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030189943A1 (en) * 2002-04-08 2003-10-09 International Business Machines Corporation Priority based bandwidth allocation within real-time and non-real-time traffic streams
CN1645860A (en) * 2005-01-20 2005-07-27 中国科学院计算技术研究所 Terminal up dispatching method for voice service in wide band wireless cut-in network
CN103067308A (en) * 2012-12-26 2013-04-24 中兴通讯股份有限公司 Method and system for bandwidth distribution
US20140334301A1 (en) * 2013-05-07 2014-11-13 WMware Inc. Hierarchical allocation of network bandwidth for quality of service
CN103701722A (en) * 2014-01-02 2014-04-02 网神信息技术(北京)股份有限公司 Network bandwidth allocation method, device and system
CN105721350A (en) * 2016-03-04 2016-06-29 深圳市共进电子股份有限公司 Intelligent bandwidth allocation method and apparatus
CN109246023A (en) * 2018-11-16 2019-01-18 锐捷网络股份有限公司 Flow control methods, the network equipment and storage medium

Similar Documents

Publication Publication Date Title
CN1989738B (en) Propagation of minimum guaranteed scheduling rates
CN107959636B (en) Method and device for sending BGP (Border gateway protocol) message
EP2923479B1 (en) Method and apparatus for controlling utilization in a horizontally scaled software application
US9270527B2 (en) Methods, systems, and computer readable media for enabling real-time guarantees in publish-subscribe middleware using dynamically reconfigurable networks
US8149846B2 (en) Data processing system and method
CN101436987A (en) Method and apparatus for scheduling and configuring QoS service
Homg et al. An adaptive approach to weighted fair queue with QoS enhanced on IP network
Kumar et al. A delay optimal MAC and packet scheduler for heterogeneous M2M uplink
RU2643666C2 (en) Method and device to control virtual output queue authorization and also computer storage media
JP2008536409A (en) Method and apparatus for enhanced content delivery over a data network
Li et al. OPTAS: Decentralized flow monitoring and scheduling for tiny tasks
Sharma et al. Packet scheduling scheme to guarantee QoS in internet of things
Zhang et al. Dynamic scheduling with service curve for QoS guarantee of large-scale cloud storage
Kumar et al. A delay-optimal packet scheduler for M2M uplink
Rukmani et al. Scheduling algorithm for real time applications in mobile ad hoc network with opnet modeler
CN100466593C (en) Method of implementing integrated queue scheduling for supporting multi service
JP3830937B2 (en) Packet scheduling system and method for high-speed packet networks
WO2023087845A1 (en) Data scheduling method, system and apparatus, and computer-readable storage medium
US8467401B1 (en) Scheduling variable length packets
Yaghmaee et al. A model for differentiated service support in wireless multimedia sensor networks
US20180115498A1 (en) Systems and methods for adaptive credit-based flow
CN102594670B (en) Multiport multi-flow scheduling method, device and equipment
CN112929294A (en) Message scheduling method and device
US6904056B2 (en) Method and apparatus for improved scheduling technique
Tokmakov et al. A case for data centre traffic management on software programmable ethernet switches

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