主权项 |
1. A network device for processing packets, the network device comprising:
an ingress front end configured to identify (i) a first packet in a stream of packets as a packet to be processed with a guaranteed rate at each processing stage of a plurality of processing stages that are programmable, and (ii) a second packet in the stream of packets as a packet to be processed without a guaranteed rate at each processing stage of the plurality of processing stages; a plurality of engines configured to provide a respective resource for use in processing the stream of packets at a processing stage, the resource being external to the plurality of processing stages; the plurality of processing stages are arranged in a pipeline and configured to:
(i) for the first packet, selectively cause a first packet processing operation to be performed on the first packet using the resource obtained from one of the engines and to pass the first packet to the next processing stage within a period of time corresponding to the guaranteed rate; and(ii) for the second packet, selectively request the resource from one of the engines for processing the second packet, buffer the second packet in a buffer until the resource is available, cause a second packet processing operation to be performed on the second packet using the available resource, and, in response to receiving a backpressure signal from downstream in the pipeline indicating an ability to forward the second packet to the next processing stage in the pipeline, to pass the second packet to the next processing stage at a rate that is not guaranteed. |