摘要 |
A hash compensation architecture and table lookup method is provided to efficiently lookup a valid directory entry in an address lookup table. Then, a compensation directory is implemented to store an address of a directory entry whenever an overflow occurs. When looking up an output port for an incoming packet, the lookups of the network address table and the compensation directory are performed in parallel, thereby to improve the efficiency of search. To improve the utilization of memory space, and ensure that the address of the entry indexed by the compensation directory will not affect the hash function search result, the invention further provides a translating/comparing mechanism for continuously searching a local best-fit directory entry from the outputs of the validity table and then provide for the compensation directory. Accordingly, the hash compensation mechanism and the lookup method can increase the hit rate of an address lookup for a network device and utilize the memory space more efficiently.
|