Patent ID: 8515965

Claim:
A method of processing a hash operation request by a plurality of processing modules of one of a plurality of network processors, said method comprising: by a hash processor of the network processor: determining (i) a job identifier for a received hash operation request having a desired hash key, (ii) one of a plurality of hash tables corresponding to the received hash operation request, and (iii) a setting for a traversal indicator corresponding to the received hash operation request, wherein the traversal indicator comprises a single bit flag, wherein: setting the flag indicates that the hash processor requested a hash operation to search for a first matching hash key without traversing to a last bucket of the hash table, and clearing the flag indicates that the hash processor requested a hash operation to search for one or more matching hash keys and to traverse to the last bucket of the hash table; determining whether one or more of the hash operation requests is one of an insert operation, a delete operation, and a lookup operation; in response to determining whether the hash operation request is one of an insert operation and a delete operation, clearing the traversal indicator by the hash processor; in response to determining whether the hash operation request is one of a lookup operation, setting the traversal indicator by the hash processor; concurrently (i) generating a read request for a first hash bucket of the corresponding hash table, and (ii) providing the job identifier, the desired hash key and the traversal indicator to a read return processor of the network processor; by the read return processor: storing the desired hash key and the traversal indicator in a job memory indexed by the job identifier; and storing (i) one or more entries and (ii) one or more link indicators of the first hash bucket read from the corresponding hash table in a return memory indexed by the job identifier, wherein: if one of the stored entries of the first hash bucket matches the desired hash key: determining, based on the traversal indicator, whether to read a next bucket, if any, of the hash table; and providing the job identifier, the matching hash key, and an address of the bucket containing the matching hash key to the hash processor.