Patent ID: 7508756

Claim:
A method implemented in a switch having a plurality of ports, the method comprising: executing a plurality of instructions for polling a set of operational ports to determine whether each of the operational ports has frames to be routed, wherein the operational ports are polled in a repeating sequential fashion; examining the plurality of ports to identify one of the operational ports which becomes non-operational; discontinuing polling of the non-operational port, wherein discontinuing polling of the non-operational port further comprises modifying a set of instructions corresponding to the identified non-operational port so that the identified non-operational port is not polled by replacing a first instruction within the set of instructions with a branch instruction which has as a target the location of a first instruction of a port to be polled after the identified non-operational port, wherein replacing the first instruction within the set of instructions corresponding to the non-operational port comprises replacing the first instruction with a new instruction that branches to the first instruction of the port to be polled and that indicates the offset to the next port to be polled, wherein the new instruction is formed by performing a binary OR operation on a branch op code and the offset between the first instruction in the set of instructions corresponding to the identified non-operational port and the first instruction in the set of instructions corresponding to the port to be polled, wherein the branch instruction causes execution of the plurality of instructions to jump to a set of instructions corresponding to a next port to be polled after the identified non-operational port; and continuing to execute the plurality of instructions.