CPC H04L 61/5046 (2022.05) [H04L 9/0643 (2013.01); H04L 9/40 (2022.05); H04L 61/5007 (2022.05)] | 18 Claims |
1. A network device, comprising:
a memory, configured to store a hash table for accessing a database of network addresses, the hash table comprising multiple buckets, each bucket dimensioned to store entries for up to a maximal permitted number of the network addresses;
a memory access circuit, configured to receive a network address, to calculate a hash value over at least the network address by applying a hashing scheme selected from among a plurality of hashing schemes, to choose a bucket of the hash table based on the hash value, and to access information in the database pertaining to the network address by accessing the selected bucket; and
a processor, configured to:
detect that in accordance with the selected hashing scheme, at least one of the buckets is mapped, or is about to be mapped, to more than the maximal permitted number of the network addresses; and
replace the selected hashing scheme with an alternative hashing scheme from among the plurality of the hashing schemes, wherein in accordance with the alternative hashing scheme none of the buckets is mapped to more than the maximal permitted number of the network addresses.
|