Patent ID: 8189578

Claim:
A method for transmitting packets, comprising: forwarding a first set of upstream packets from a local switch to a downstream switch; modifying, in the local switch, an upstream packet window counter (UPWC), wherein the UPWC is a 3-bit hardware counter that specifies how many back-to-back upstream packets can be forwarded, an upstream packet counter (UPC), and a plurality of upstream switch packet counters (USPCs) in response to forwarding the first set of upstream packets, wherein at least one of the plurality of USPCs equals a predetermined value after forwarding the first set of upstream packets; forwarding a local packet from the local switch to the downstream switch after forwarding the first set of upstream packets; setting a UPC register to a sum of the plurality of USPCs, setting a UPWC register to the sum after performing a plurality of bitwise right shift operations on the sum, and setting the plurality of USPCs to zero; forwarding, after setting the plurality of USPCs to zero, a second set of upstream packets from the local switch to the downstream switch; modifying the UPWC, the UPC, and the plurality of USPCs in response to forwarding the second set of upstream packets, wherein each of the plurality of USPCs is less than the predetermined value after forwarding the second set of upstream packets; restoring the UWPC to a value of the UPWC register after forwarding the second number of packets; and forwarding, after restoring the UWPC, a third set of upstream packets from the local switch to the downstream switch.