Patent ID: 8726134

Claim:
A method for validating a data packet protected by a data packet checksum in a network processor supporting a first network protocol and a second network protocol utilizing shared hardware for packets for either protocol comprising: receiving a data packet in a stream of data packets by a parser that identities a network packet protocol for the data packet; responsive to the parser identifying the network packet protocol as the first network protocol, sending a first set of fields extracted from the packet for adjusting length found in the first network protocol and not in the second network protocol to a first logic block that updates a first register with a first partial packet length; responsive to the parser identifying the network packet protocol as the second network protocol, sending a second set of fields extracted from the packet for adjusting length found in the second network protocol and not the first network protocol to a second logic block that updates a second register with a second partial packet length; sending by the parser a third set of fields independent of the network protocol to a third logic block that updates a third register with a first checksum; producing a second checksum by applying a function combining values from the first register, the second register, and the third register; and validating the data packet by comparing the data packet checksum to the second checksum.