Patent ID: 8537671

Claim:
A method performed in a packet processor core for policing a packet through a hierarchical policer having a plurality of meter levels including an initial level and one or more subsequent levels, the hierarchical policer coupled to one or more policing requestors, the method comprising the steps of: receiving, from one of the policing requestors, a policer request to perform hierarchical packet policing, wherein the policer request comprises packet characteristics and identifies request configuration information; at each meter level: creating a meter result using the packet characteristics and a meter state specified by the request configuration information, and generating a meter level output that includes a meter level output packet attribute that classifies the packet and a set of one or more meter token state update indicators, the meter level output based on the meter result for that level and a portion of the request configuration information, wherein for at least one of the subsequent levels the meter level output is further based on the meter level output packet attribute from a previous meter level; performing a meter update combine, comprising the steps of: producing a final packet output attribute that classifies the packet using at least one of the plurality of meter level output packet attributes and a portion of the request configuration information, producing a set of one or more meter state updates that indicate changes to one or more meter states using at least one of the plurality of sets of meter token state update indicators and a portion of the request configuration information; processing the set of meter state updates, wherein one or more meter states are changed as indicated by the meter state updates; and returning the final packet output to the policing requestor whereby hierarchical packet policing may be implemented in hardware but configured in a flexible manner by the policing requestors.