Abstract: A method for routing using longest prefix matching. The method may include receiving a packet associated with a packet destination address; scanning, using the packet destination address, a tree that comprises multiple nodes to find a longest matching destination address prefix. The multiple nodes may include leaf nodes and non-leaf (NL) nodes. The NL nodes are associated with node boundary values that represent boundaries of destination address ranges, the destination address ranges are spanned by destination addresses prefixes of a routing table; and applying at least one routing decision, based on the longest matching destination address prefix. Each NL node has NL children nodes. The NL node is also associated with the NL children node pointers that point to the NL children nodes; introducing one or more changes in values of one or more of the boundaries of destination address ranges, while maintaining links to the multiple nodes unchanged.
Abstract: A method for routing using longest prefix matching. The method may include receiving a packet associated with a packet destination address; scanning, using the packet destination address, a tree that comprises multiple nodes to find a longest matching destination address prefix. The multiple nodes may include leaf nodes and non-leaf (NL) nodes. The NL nodes are associated with node boundary values that represent boundaries of destination address ranges, the destination address ranges are spanned by destination addresses prefixes of a routing table; and applying at least one routing decision, based on the longest matching destination address prefix. Each NL node has NL children nodes. The NL node is also associated with the NL children node pointers that point to the NL children nodes; introducing one or more changes in values of one or more of the boundaries of destination address ranges, while maintaining links to the multiple nodes unchanged.