Avoiding unfair advantage in weighted round robin (WRR) scheduling
AssigneeJuniper Networks, Inc.
InventorsSarin Thomas, Srihari Vegesna
Life of this patent
Estimating the term…
Abstract
A network device includes multiple queues to store packets to be scheduled, and a weighted round-robin (WRR) scheduler. The WRR scheduler performs a first WRR scheduling iteration including processing of at least one packet from a particular queue of the multiple queues, identifies the particular queue as an empty queue during the performing of the first WRR scheduling iteration, identifies the particular queue as a non-empty queue after the identifying the particular queue as the empty queue, and performs a second WRR scheduling iteration including processing of only one packet of a group of packets from the particular queue of the multiple queues.
Claims19
A method comprising:
- initializing, by a network device, credit counters for a plurality of queues;
- performing, by the network device, weighted round-robin (WRR) scheduling of packets from one of the plurality of queues;
- identifying, by the network device, that the one of the plurality of queues is empty while performing the WRR scheduling;
- and
- setting, by the network device, an indicator to indicate that no credits should be added to a credit counter, of the credit counters, associated with the one of the plurality of queues during a subsequent initializing of the credit counters.
A network device comprising:
- one or more processors to:
- perform a first weighted round-robin (WRR) scheduling iteration that includes processing of at least one packet from a particular queue of a plurality of queues;
- determine that the particular queue is empty while performing the first WRR scheduling iteration;
- set, after determining that the particular queue is empty, an indicator to indicate that no credits should be added to a credit counter, associated with the particular queue, during a second WRR scheduling iteration;
- add a plurality of packets to the particular queue after determining that the particular queue is empty;
- determine that the particular queue is not empty after adding the plurality of packets to the particular queue;
- and
- perform, based on the indicator, the second WRR scheduling iteration by processing only one packet of the plurality of packets in the particular queue.
A non-transitory computer-readable medium storing instructions, the instructions comprising:
- one or more instructions that, when executed by at least one processor, cause the at least one processor to:
- initialize a credit counter for a particular queue, of a plurality of queues, based on an assigned weighted round-robin (WRR) weight for the particular queue,
- the particular queue including one or more packets to be scheduled for processing;
- schedule the one or more packets from the particular queue based on the credit counter;
- identify that the particular queue is empty;
- set an indicator to indicate that no credits should be added to the credit counter during a subsequent initializing of the credit counter;
- and
- perform, based on the indicator, the subsequent initializing of the credit counter for the particular queue.
Dependencies are inferred from the claim text.