Longest prefix match using a binary search tree with compressed hash tables
AssigneeMellanox Technologies Tlv Ltd.
InventorsGil Levy, Aviv Kfir
Life of this patent
Estimating the term…
Loading patent…
AssigneeMellanox Technologies Tlv Ltd.
InventorsGil Levy, Aviv Kfir
Estimating the term…
A method for packet processing includes representing a routing table for a network as a binary search tree of address prefixes ordered by prefix lengths. For each node j in the binary search tree, a respective hash table is stored, including entries representing the address prefixes of length Lj. Each address prefix includes Lj−c most significant bits (MSB) and c least significant bits (LSB), and each entry in the respective hash table includes a matching value corresponding to the Lj−c MSB of one or more of the address prefixes and one or more action codes indexed by the c LSB of the one or more of the address prefixes. Upon receiving from the network a data packet having a destination address, the binary search tree is traversed to find a longest prefix match by performing, at each node j, a hash lookup in the respective hash table.
A method for packet processing, comprising:
Packet processing apparatus, comprising:
A computer software product, comprising a non-transitory computer-readable medium in which program instructions are stored, which instructions, when read by a programmable processor, cause the processor to store, in a memory, a representation of a routing table for a network as a binary search tree of address prefixes ordered by prefix lengths, such that each node j in the binary search tree corresponds to a respective prefix length Lj, and to store for each node j in the binary search tree, a respective hash table comprising entries representing the address prefixes of length Lj, each address prefix comprising Lj−c most significant bits (MSB) and c least significant bits (LSB), and each entry in the respective hash table comprising a matching value corresponding to the Lj−c MSB of one or more of the address prefixes and one or more action codes indexed by the c LSB of the one or more of the address prefixes,
Dependencies are inferred from the claim text.