A data routing mechanism is disclosed. The data routing mechanism includes virtual
output queues (VOQs), corresponding to a first input port, that store data to be
sent to one of a first and second output port. The data routing mechanism includes
VOQs, corresponding to a second input port, that store data to be sent to one of
the first and second output port. The data routing mechanism includes a switch
fabric that includes a plurality of buffers at crosspoints between the first and
second input ports and the first and second output ports. The data routing mechanism
includes a first input scheduler that transmits a first data from the VOQs corresponding
to the first input port to one of the plurality of buffers based on lengths of
the VOQs corresponding to the first input port and a credit state of the plurality
of buffers.