Patent ID: 7796609

Claim:
An apparatus for processing packets, comprising: a packet buffer that buffers either first packets on a first connection or second packets on a second connection that is different from the first connection, wherein the packet buffer initially focuses on the first connection and checks a packet length flag and a processing time flag to observe condition of packet processing for the first connection, and wherein the packet buffer keeps buffering the first packets on the first connection when neither of the packet length flag and processing time flag are on, and wherein the packet buffer changes focus from the first connection to the second connection and begins buffering the second packets on the second connection when either the packet length flag or the processing time flag or both are on; a packet processor that processes a packet read out of the packet buffer, thus outputting the processed packet; a packet length monitor that calculates a new cumulative packet length by adding a length of the processed packet to a cumulative sum of lengths of past processed packets and turns on the packet length flag if the new cumulative packet length is greater than a predetermined packet length threshold; a management table storing values of packet length ranges and processing time estimates in an associated manner, wherein the packet length ranges are ranges of packet lengths, and the processing time estimate corresponding to a particular packet length range is an estimated time for processing a packet with a length falling within that packet length range; a processing time monitor that searches the management table to find a processing time estimate corresponding to the packet length of the processed packet, calculates a new cumulative processing time estimate by adding the found processing time estimate to a cumulative sum of processing time estimates of past packets, and turns on the processing time flag if the new cumulative processing time estimate is greater than a predetermined processing time threshold; and a processed packet sender that outputs the processed packet to an external link.