Patent ID: 7600035

Claim:
A method to dynamically allocate credits to a port in a Fibre Channel network, the method comprising: connecting a first port on a first device to a second port on a second device to form a link; the first port sending a unique signal to a second port and starting a timer; the first port receiving the unique signal returned from the second port and stopping the timer; and allocating credits according to the time elapsed on the timer, wherein allocating credits according to the time elapsed on the timer includes: calculating the distance according to the time elapsed on the timer; and allocating credits corresponding to the distance between the first and second ports, and wherein calculating the distance according to the time elapsed on the timer uses the following formula: distance=( LRT _LATENCY*3)/(20 *RI ) Eq.(1) where distance is the link distance in km; LRT_LATENCY is the time lapse between timer stops and starts, in microseconds and RI is the refractive index of glass (worst case) in the fiber optic connecting the two ports.