A method for assigning virtual lanes (VL) in a fibre channel switch is
provided. The fibre channel switch element includes a virtual lane cache
that can compare incoming frame parameters based on which virtual lanes
may be assigned; and a register to store parameters used for virtual lane
assignment. The method includes, determining if VL assignment is to be
based on an incoming frame parameter or a programmed value; determining
if an incoming frame is a preferred frame; and assigning a preferred
routing priority if the incoming frame is designated as a preferred
frame. The method also includes, determining if a fabric topology is
known; and assigning virtual lanes based on a known fabric topology.