Patent ID: 7436773

Claim:
A method for controlling data packet traffic flow into a link partner device, said method comprising: detecting an occupancy level of a receive queue in the link partner device; wherein the link partner device is an Ethernet adapter or a network switch; wherein: said detecting an occupancy level of a receive queue in the link partner device is preceded by setting a pause time value to a default value; said detecting an occupancy level of a receive queue in the link partner device includes detecting a receive queue overrun condition; and said detecting a receive queue overrun condition includes detecting that the occupancy level of the receive queue has exceeded a pre-specified level below a 100% occupancy level; said detecting an occupancy level of a receive queue in the link partner device includes detecting a receive queue underrun condition; said detecting a receive queue underrun condition includes detecting that the occupancy level of the receive queue has fallen below a pre-specified level above a 0% occupancy level; responsive to detecting a receive queue underrun condition, delivering an XON flow control packet from said link partner device; setting the pause time value within a flow control frame in accordance with said detected occupancy level of the receive queue; wherein said setting the pause time value within a flow control frame in accordance with said detected occupancy level of the receive queue comprises: incrementing the pause time value by one or more specified pause time increments; and setting the pause time value in accordance with an underrun-specified XOFF adjust condition; wherein said setting the pause time value in accordance with an underrun-specified XOFF adjust condition includes setting the pause time value in accordance with whether or not a last detected underrun condition was preceded by an overrun condition in the receive queue; responsive to a last detected underrun condition being preceded by an overrun condition in the receive queue, maintaining the current pause time value in said flow control frame; responsive to a last detected underrun condition not being preceded by an overrun condition in the receive queue, determining whether or not the detected underrun frequency in the receive queue exceeds a specified threshold; responsive to the detected underrun frequency in the receive queue exceeding a specified threshold, decrementing the pause time value by one or more specified pause time increments; and transmitting the flow control frame from the link partner device to a corresponding remote link partner device.