Patent ID: 7522522

Claim:
A method for routing fibre channel frames using a fibre channel switch element having a plurality of ports, each port including a receive segment for receiving a fibre channel frame and a transmit segment for transmitting a fibre channel frame, comprising: storing a relative age of a first fibre channel frame with respect to a second fibre channel frame; wherein the first fibre channel frame and the second fibre channel frame are received by the receive segment of a port from among the plurality of ports; and the first frame is stored in a first memory slot of a receive buffer having a plurality of memory slots and the second frame is stored in a second memory slot of the receive buffer; wherein the relative age is stored in an aging table and the relative age indicates how long a fibre channel frame has been waiting at a memory slot compared to other fibre channel frames that are waiting in other memory slots at any given time; determining if more than one transmit segment is requesting fibre channel frames stored in the plurality of memory slots; if only one transmit segment requests a fibre channel frame stored at a memory slot, then routing the frame to the transmit segment without using the aging table; if more than one transmit segment is requesting fibre channel frames then using the aging table to determine which fibre channel frame is the oldest among the plurality of fibre channel frames stored in the plurality of memory slots; transmitting the oldest fibre channel frame from a memory slot based on the relative age obtained from the aging table; and setting age bits in the aging table when fibre channel frames are written in the receive segment; and the relative age for a fibre channel frame is determined based on a value of the age bits; wherein the aging table includes a grid having a plurality of rows and a plurality of columns and the grid stores the age bits, and wherein each row and column of the aging table is identified by a memory slot number.