Page MenuHomeFreeBSD

pctrie: drop meaningless neighbor check
ClosedPublic

Authored by dougm on Thu, Oct 24, 9:19 PM.
Tags
None
Referenced Files
F101258644: D47277.diff
Sat, Oct 26, 7:24 PM
F101258630: D47277.diff
Sat, Oct 26, 7:24 PM
Unknown Object (File)
Sat, Oct 26, 5:04 AM
Unknown Object (File)
Sat, Oct 26, 5:03 AM
Unknown Object (File)
Sat, Oct 26, 5:03 AM
Unknown Object (File)
Sat, Oct 26, 5:03 AM
Unknown Object (File)
Fri, Oct 25, 5:47 PM
Subscribers

Details

Summary

In PCTRIE_INSERT_LOOKUP_{G,L}E, there is a test - if two pointers are equal, replace one with a new value. The pointers can never be equal; one points to a struct pctrie_node and the other is the (void*) cast of a pointer to a field within a struct pctrie_node. So the tests and assignments can be removed with no effect.

If the assignments were made under some other conditions, they would only move the neighbor pointer one level up the tree, undoing the benefits of a neighbor update near the end of pctrie_insert_lookup_compount.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable