Patent ID: 7719982

Claim:
A switching device comprising: one or more ingress queues to queue data received from external sources while waiting to forward the data to one or more egress queues, wherein the egress queues queue the data while waiting to transmit the data to external sources; a switch fabric to provide connectivity between said one or more ingress queues and the one or more egress queues; an egress flow-control manager to monitor congestion state of the one or more egress queues, to generate and forward a flow-control message to at least a subset of the one or more ingress queues that are associated with an egress queue that had a change in the congestion state, to monitor amount of data received by the egress queue after forwarding an OFF flow-control message, and to forward another OFF flow-control message if the egress queue receives at least a given amount of data after forwarding previous OFF flow-control message; and an ingress flow-control manager to monitor flow-control state of said one or more ingress queues, and to detect and recover from loss of ON flow-control messages, wherein said ingress flow-control manager tracks amount of time that an ingress queue has had an off status and ascertains congestion state of an associated egress queue if an ingress queue has had an off status for longer than a given amount of time, wherein said ingress flow-control manager ascertains the congestion state of the associated egress queue by sending a query to an egress flow-control manager that monitors congestion state of the egress queues.