Patent ID: 8174980

Claim:
A method for dynamically rate limiting slowpath processing of exception packets in a packet forwarding device, the method comprising: monitoring processing resources in a packet forwarding device used for performing slowpath processing of exception packets, wherein performing slowpath processing of exception packets includes performing, by a central processing unit (CPU), packet forwarding lookups in a software-implemented forwarding database for packets for which the packet forwarding device lacks hardware-programmed forwarding; determining whether, in the packet forwarding device, usage of the processing resources for slowpath processing exceeds a first threshold, wherein the first threshold is defined to be sufficiently large so as to not be exceeded when the monitored processing resources are under normal load conditions, and wherein determining that usage of the monitored processing resources exceeds the first threshold indicates that the monitored processing resources have exceeded normal load conditions; in response to determining that usage of the processing resources exceeds the first threshold, rate limiting the slowpath processing of the exception packets, wherein rate limiting the slowpath processing of the exception packets includes rate limiting the processing on a per packet classification basis; determining whether, in the packet forwarding device, usage of the processing resources for slowpath processing is less than a second threshold, wherein the second threshold is defined to be sufficiently smaller than the first threshold so as to allow for hysteresis in recovery of the monitored processing resources; and in response to determining that usage of the processing resources is less than the second threshold, ceasing the rate limiting of the exception packets.