Patent ID: 8565092

Claim:
A method comprising: at a device configured to forward packets in a network, storing in a memory of the device new packets that are to be forwarded from the device to devices in the network; storing a queue link list defining at least one queue of packets stored in the memory to be read out from the memory and forwarded from the device and adding entries to the queue link list for the at least one queue as new packets are added to the at least one queue; outputting packets from the memory for the at least one queue according to entries in the queue link list; detecting when the at least one queue exceeds a threshold indicative of head of line blocking and terminating adding of entries to the queue link list for the at least one queue when the at least one queue is detected to exceed the threshold; storing a sub-queue link list defining a plurality of sub-queues for packets stored in the memory; for new packets that are to be added to the at least one queue, adding entries to the sub-queue link list for the plurality of sub-queues indicating that the new packets are assigned to one or more of the sub-queues such that packets are assigned to different ones of the plurality of sub-queues when the at least one queue exceeds the threshold while processing packets in the at least one queue; and outputting packets from the memory for the plurality of sub-queues according to the sub-queue link list after all packets in the queue link list for the at least one queue have been output from the memory.