A packet switching or routing network (referred to as a switching network henceforth) has switches used for transmission of data among senders and receivers connected to the network. The switching performed by these switches is in fact the action of passing on packets of data received by a switch to a further switch in the network. Such switching actions are the means by which communication data is moved through the packet switching network.
Each switch may include what is commonly referred to as a switch fabric configured to process packets between input and output packet processor. Each switch may further comprise one or more packet processors coupled to the switch fabric. The packet processors may further be configured to direct the incoming packets of data across the switch fabric to particular packet processors. Each packet processor may be configured to provide traffic to the switch fabric and accept traffic from the switch fabric. Each packet processor may further be configured to accept/transmit data from/to hosts, respectively. Thus, any host connected with one of the packet processors may communicate with another host connected to another packet processor.
Due to bottlenecks in processing in packet processors or in transferring traffic across the switch, data packets may be required to wait prior to being processed by a packet processor and transmitted to another packet processor or switch in the packet switching network. As a result, queues configured to temporarily store data packets may be implemented in the packet processor. Coupled to the queues may be mechanisms to enqueue the data packets into the queues. That is, the enqueuing mechanisms may be configured to insert the packets in the corresponding queues. It is noted that a portion or all of the queues may be part of the same physical memory resource.
Typically, packets are assigned a priority where the priority may be determined based on a value of particular bits in the packet header. The packets with a higher priority may be processed prior to the packets with a lower priority. After each particular interval of time, a scheduler in the packet processor may be configured to search through all the queues storing packets and identify the packet with the highest priority to be transmitted. However, in order for the scheduler to search through all the queues storing packets and identify the packet with the highest priority to be transmitted, the scheduler may be complex to implement such as by having multiple sub-queues and logic for identifying multiple priorities.
It would therefore be desirable to implement a simpler scheduler without the complexity in design of having multiple sub-queues and logic for identifying multiple priorities in order to identify the packet to be transmitted.