Patent ID: 8619800

Claim:
A method comprising: receiving, at an output packet queue processor from one of a plurality of core processors in a network processor, a request to add a data packet to an output queue structure, the output queue structure including a plurality of output queues, a plurality of queue classes and a plurality of ports to an output link of the network processor, each of the output queues belonging to (i) one of the queue classes or (ii) one of the ports, and each of the queue classes belonging to one of the ports, and wherein each of the queue classes or output queues is associated with a pre-defined QoS; obtaining, from the data packet, a queue identification (ID) of the data packet, the obtaining the queue ID of the data packet including requesting, by a packet queue finite state machine module of the network processor, a memory of the network processor to store the queue ID of the data packet in a queue cache, and storing, by the memory, the queue ID in the queue cache; identifying, based on the queue ID, an output queue to which the particular data packet belongs, the output queue belonging to one of the classes or one of the ports; adding the data packet to the output queue; and forwarding, by an egress module of the network processor and based on the QoS of (i) the output queues or (ii) queue classes, data packets contained in the output queue structure towards corresponding destination addresses of the data packets.