Patent ID: 7480730

Claim:
A method for adjusting a credit count in a credit based flow control system, the credit based flow control system having a credit head end and a credit queue end, the method comprising the steps of: assigning an initial credit count of credits in the credit head end, each credit representing a permission to send a unit of data from the credit head end to the credit queue end; initializing a credit count to be equal to the initial credit count; decrementing the credit count for every unit of data sent from the credit head end to the credit queue end; sending a credit return message including a returned credit number, the returned credit number indicating a number of units of data removed from a queue at the credit queue end; incrementing the credit count in the credit head end by the returned credit number received from the credit queue end; sending a credit check message from the credit head end to the credit queue end; initializing a credit owed counter with a number of outstanding credits; receiving, at the credit head end, the credit return message including the returned credit number; decrementing the credit owed counter based on the returned credit number; determining a loss or a gain in the credits used in the credit based flow control system using the credit owed counter and the returned credit number; and adjusting the credit count based on the loss or the gain.