Page MenuHomeFreeBSD

pctrie: leave pctrie top as current after [gl]e_lookup failure
ClosedPublic

Authored by dougm on Jul 10 2025, 2:40 AM.
Tags
None
Referenced Files
F162868133: D51232.id158251.diff
Fri, Jul 17, 7:35 PM
Unknown Object (File)
Wed, Jul 8, 9:54 PM
Unknown Object (File)
Fri, Jun 26, 2:22 PM
Unknown Object (File)
Thu, Jun 25, 10:37 PM
Unknown Object (File)
Sun, Jun 21, 9:35 PM
Unknown Object (File)
Sun, Jun 21, 2:08 AM
Unknown Object (File)
Sat, Jun 20, 9:43 AM
Unknown Object (File)
Jun 3 2026, 4:20 PM
Subscribers

Details

Summary

If pctrie_lookup_iter_ge fails to return a node, the iterator is left with NULL as the current node. Instead, make the top of the tree the current node. Do the same thing for lookup_iter_le. If an iterator is reused after a ge/le lookup fails, this will skip the step in _pctrie_lookup_node where a NULL is replaced by the node at the top of the trie.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dougm requested review of this revision.Jul 10 2025, 2:40 AM
dougm created this revision.

Handle the case where the pctrie is empty.

This revision is now accepted and ready to land.Jul 10 2025, 7:53 AM