# US 2003/0210689 A1 · Lookups by collisionless direct tables and CAMs

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2003/0210689 A1
- Document ID: US20030210689A1
- Status: Published application
- Kind: A1
- Application number: 10/144,610
- Filed: 2002-05-13
- Published: 2003-11-13
- Earliest claimed: 2002-05-13
- Assignees: International Business Machines Corporation
- Inventors: Gordon Taylor Davis; Andreas Guenther Herkersdorf; Clark Debs Jeffries; Mark Anthony Rinaldi
- Web page: https://patentgrep.com/patent/US20030210689A1

## CPC

- H04L 49/3009: {Header conversion, routing tables or routing tags}
- H04L 45/745: Address table lookup; Address filtering
- H04L 45/7453: using hashing
- H04L 49/351: for local area network [LAN], e.g. Ethernet switches
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A structure and technique for preventing collisions using a hash table in conjunction with a CAM to identify and prevent a collisions of binary keys. A portion of the hash value of a binary key, which does not collide with a portion of the hash value of any other reference binary key, is used as an entry in the hash table. If two or more binary keys have identical values of the portions of the hash values, each of these binary keys are stored in their entirety, in the CAM. The key in the CAM provides a pointer to a data structure where the action associated with that binary key is stored. If the binary key is not found in the CAM, the binary key is hashed, and a specific entry in the hash table is selected using a portion of this hash value.

## Claims

### Claim 1

A method of preventing collisions between two or more binary keys wherein each binary key corresponds to an action to be taken, comprising the steps of:
providing a hash table having a plurality of entries indexed by a selected portion of hash values of said binary keys, each entry pointing to a location in a data structure for storing the non-selected portions of, or the entire hash value of, the binary key and action data corresponding to the value of the binary key, and a CAM having a plurality of entries, each configured to store a binary key, or a value unique to a binary key, and an association to a corresponding action associated therewith;
storing in said hash table a pointer to said data structure using a selected one portion of the hash values of binary keys as an index into the hash table when and only when said selected one portion of the hash value is not the selected one portion of the hash value of any other binary key, and storing in the CAM binary keys or values unique to said binary keys, and establishing an association between said CAM entry locations and locations of said data structures, when and only when the selected portion of the hash value of any such binary key is the same as the selected portion of the hash value of one or more other binary keys.

### Claim 2 (depends on 1)

The invention as defined in claim 1 further characterized by:
presenting a binary key for action;
searching the CAM to see if the binary key is stored in said CAM;
if said binary key is found, using established association with said data structure in order to access the action data associated therewith;
hashing the binary key and accessing an entry in the hash table using a portion of resulting hashed binary key as an index into said hash table to determine if the selected entry of the hash table is valid;
if the entry is valid, then pointing to said data structure in order to access the action data associated therewith.

### Claim 3 (depends on 2)

The invention as defined in claim 2 wherein said CAM and said hash table are searched simultaneously.

### Claim 4 (depends on 2)

The invention as defined in claim 2 wherein said CAM is searched first, and said hash table is searched if and only if the value of the binary key is not found in the CAM.

### Claim 5 (depends on 1)

The invention as defined in claim 1 wherein said binary key is stored unaltered in the CAM.

### Claim 6 (depends on 2)

The invention as defined in claim 2 wherein said binary key is stored unaltered in the CAM.

### Claim 7 (depends on 3)

The invention as defined in claim 3 wherein said binary key is stored unaltered in the CAM.

### Claim 8 (depends on 4)

The invention as defined in claim 4 wherein said binary key is stored unaltered in the CAM.

### Claim 9 (depends on 1)

The invention as defined in claim 1 wherein said action is stored in the CAM.

### Claim 10 (depends on 1)

The invention as defined in claim 1 wherein said action is directed by an offset value in said CAM location.

### Claim 11 (depends on 1)

The method of claim 1 wherein deletion of an entry from the hash table or CAM is accomplished by:
seeking the binary key in the CAM and, if found, then deleting this key and ending the program;
if the key is not found, then seek the selected portion of the hash value in the hash table, if a match is not found, end program;
if a match is found, compare the remainder of hash value,
if a match is found, delete portion of hash value from hash table; if a match is not found, end program.

### Claim 12 (depends on 1)

The invention as defined in claim 1 wherein an insertion of a new value in the CAM or hash table is accomplished by:
seeking the value of the binary key in the cam; if the value is found, overwriting the key and associated action and the program ended;
if the key is not found in the CAM, the key is hashed, the selected hash value is sought in the hash table, if the selected value is not found in the hash table, the selected value is written in the hash table with a pointer to the action and the remainder of the hash value, and the program is ended;
if the selected portion of hash value is stored in the hash table with a pointer to the remainder of the hash value, the action is updated and the program ended;
if the remainder of the hash value is different corresponding to a different action, then enter the key of the selected portion of the hash value being compared into the CAM with the associated activity, recreate the key from the hash value stored in the hash table and action, and enter the recreated key in the CAM and associated action and end the program.

### Claim 13

A structure for preventing collisions between two or more binary keys wherein each binary key corresponds to an action to be taken comprising:
a hash table having a plurality of entries indexed by a selected portion of hash values of said binary keys, each entry pointing to a location in a data structure for storing the non-selected portions of, or the entire hash value of, the binary key and action data corresponding to the value of the binary key;
a CAM having a plurality of entries, each configured to store a binary key, or a value unique to a binary key, and an association to a corresponding action associated therewith;
each entry in said hash table having an entry and a pointer to said data structure using a selected one portion of the hash values of binary keys as an index into the hash table when and only when said selected one portion of hash value is not the selected one portion of the hash value of any other binary key.

### Claim 14 (depends on 13)

The invention as defined in claim 13 wherein said value stored in the CAM is the unaltered value of each key.

### Claim 15 (depends on 13)

The invention as defined in claim 13 wherein said action related to each entry in said CAM is stored in said CAM.

### Claim 16 (depends on 14)

The invention as defined in claim 14 wherein said action related to each entry in said CAM is stored in said CAM.

### Claim 17 (depends on 13)

The invention as defined in claim 13 wherein said action related to each entry in said CAM is designated by an offset.

### Claim 18 (depends on 14)

The invention as defined in claim 14 wherein said action related to each entry in said CAM is designated by an offset.
