Skip to content
  • Marko Zec's avatar
    fib_algo: shift / mask by constants in dxr_lookup() · e7abe200
    Marko Zec authored
    Since trie configuration remains invariant during each DXR instance
    lifetime, instead of shifting and masking lookup keys by values
    computed at runtime, compile upfront several dxr_lookup()
    configurations with hardcoded shift / mask constants, and choose the
    apropriate lookup function version after each DXR instance rebuild.
    
    In synthetic tests this yields small but measurable (5-10%) lookup
    throughput improvement, depending on FIB size and  prefix patterns.
    
    MFC after:	3 days
    e7abe200