The invention provides a method and apparatus for policing a traffic flow in which a first stage of policing is performed on the traffic flow to produce a first stage conforming flow and a first stage violating flow. These two flows are then policed again in a second stage of policing, such that the first stage conforming flow can take advantage of a capacity allowed for the first stage violating flow which is unused by the first stage violating flow. In some embodiments, performing a first stage of policing involves associating each packet of the traffic flow with one of a plurality of sub-flows, policing at least one of the plurality of sub-flows individually to produce for each sub-flow a respective conforming sub-flow and a respective violating sub-flow. The conforming sub-flow(s) collectively are the first stage conforming flow. The violating sub-flows collectively are the first stage violating flow.
展开▼