PRIORITY-BASED FLOW CONTROL
Some embodiments provide a method for a hardware forwarding element. The method adds a received packet to a buffer. The method determines whether adding the packet to the buffer causes the buffer to pass one of multiple flow control thresholds, each of which corresponds to a different packet priority. When adding the packet to the buffer causes the buffer to pass a particular flow control threshold corresponding to a particular priority, the method generates a flow control message for the particular priority.
1 . For a hardware forwarding element, a method comprising:
adding a received packet to a buffer;
determining whether adding the packet to the buffer causes the buffer to pass one of a plurality of flow control thresholds, wherein each flow control threshold corresponds to a different packet priority; and
when adding the packet to the buffer causes the buffer to pass a particular flow control threshold corresponding to a particular priority, generating a flow control message for the particular priority.
2 . The method of claim 1 , wherein the buffer is shared between a plurality of ports.
3 . The method of claim 1 , wherein the buffer is shared between a plurality of egress pipelines of the hardware forwarding element.
4 . The method of claim 3 , wherein the egress pipelines are configurable.
5 . The method of claim 3 , wherein the egress pipelines comprise configurable match-action units.
6 . The method of claim 1 , wherein each received packet is assigned a priority value.
7 . The method of claim 1 , wherein the buffer is a temporary storage for packets processed by an ingress pipeline prior to processing by an egress pipeline.
8 . The method of claim 7 , wherein the hardware forwarding element comprises a plurality of configurable ingress pipelines and a plurality of configurable egress pipelines.
9 . The method of claim 7 , wherein a priority value for the received packet is assigned by one of the ingress pipelines based on packet data.
10 . The method of claim 1 , wherein the hardware forwarding element comprises a traffic management unit that performs the receiving, determining, and generating.
11 . The method of claim 10 , wherein the traffic management unit is further for performing packet replication for broadcast and multicast packets.
12 . The method of claim 11 , wherein the traffic management unit performs processing on a particular packet after the packet is processed by one of a plurality of configurable ingress pipelines and prior to processing by one of a plurality of configurable egress pipelines.
13 . The method of claim 12 , wherein when a broadcast packet is replicated by the traffic management unit, at least two of the replicated packets are processed by different configurable egress pipelines.
14 . The method of claim 1 , wherein the flow control message requests one or more network elements that send packets to the forwarding element to pause sending the packets.
15 . The method of claim 1 , further comprising:
identifying a plurality of network elements that send packets correspond to the particular priority to the forwarding element; and
sending the generated flow control message to the identified plurality of network elements.
16 . The method of claim 1 , wherein the particular priority is a first priority, the method further comprising:
adding a received second packet to the buffer;
determining that adding the second packet to the buffer causes the buffer to pass a second one of the plurality of flow control thresholds; and
based on said determination, generating a second flow control message for the second priority.
17 . The method of claim 16 , wherein the flow control message for the first priority and the flow control message for the second priority are sent to different sets of network elements.
18 . A forwarding element comprising:
a buffer for storing packet data for a packet received by the forwarding element; and
a traffic management unit for:
adding a received packet to a buffer;
determining whether adding the packet to the buffer causes the buffer to pass one of a plurality of flow control thresholds, wherein each flow control threshold corresponds to a different packet priority; and
when adding the packet to the buffer causes the buffer to pass a particular flow control threshold corresponding to a particular priority, initiating generation of a flow control message for the particular priority.
19 . The forwarding element of claim 18 further comprising:
a plurality of configurable ingress pipelines; and
a plurality of configurable egress pipelines,
wherein the buffer is a temporary storage for packets processed by an ingress pipeline prior to processing by an egress pipeline.
20 . The forwarding element of claim 18 , wherein each packet is assigned a priority value by the ingress pipeline.