主权项 |
1. A method for packet processing by a packet switch comprising a plurality of ports connected to a network, the packet switch being operable to perform a first processing operation on packets, wherein the first processing operation on a packet comprises:
determining whether or not the packet is to be forwarded or discarded; if the packet is to be forwarded, then determining one or more ports on which the packet is to be forwarded, the one or more ports being ports of the packet switch; wherein the method comprises: receiving a first packet over a network at a port of the packet switch; detecting, by the packet switch, whether or not the first packet is of a predefined type; if the first packet is not of the predefined type, then the packet switch performing the first processing operation on the first packet; if the first packet is of the predefined type, then:
the packet switch forming a test data structure which comprises a test packet, the test data structure being formed using a payload of the first packet; andthe packet switch performing the first processing operation on the test packet to determine results of the processing operation, wherein if the first processing operation determines that the test packet is to be forwarded, then the results indicate the one or more ports on which the test packet is to be forwarded as determined by the first processing operation, and if the first processing operation determines that the test packet is to be discarded, then the results indicate that the test packet is to be discarded. |