f5baf8bb12
This change introduces framework that allows to dynamically attach or detach longest prefix match (lpm) lookup algorithms to speed up datapath route tables lookups. Framework takes care of handling initial synchronisation, route subscription, nhop/nhop groups reference and indexing, dataplane attachments and fib instance algorithm setup/teardown. Framework features automatic algorithm selection, allowing for picking the best matching algorithm on-the-fly based on the amount of routes in the routing table. Currently framework code is guarded under FIB_ALGO config option. An idea is to enable it by default in the next couple of weeks. The following algorithms are provided by default: IPv4: * bsearch4 (lockless binary search in a special IP array), tailored for small-fib (<16 routes) * radix4_lockless (lockless immutable radix, re-created on every rtable change), tailored for small-fib (<1000 routes) * radix4 (base system radix backend) * dpdk_lpm4 (DPDK DIR24-8-based lookups), lockless datastrucure, optimized for large-fib (D27412) IPv6: * radix6_lockless (lockless immutable radix, re-created on every rtable change), tailed for small-fib (<1000 routes) * radix6 (base system radix backend) * dpdk_lpm6 (DPDK DIR24-8-based lookups), lockless datastrucure, optimized for large-fib (D27412) Performance changes: Micro benchmarks (I7-7660U, single-core lookups, 2048k dst, code in D27604): IPv4: 8 routes: radix4: ~20mpps radix4_lockless: ~24.8mpps bsearch4: ~69mpps dpdk_lpm4: ~67 mpps 700k routes: radix4_lockless: 3.3mpps dpdk_lpm4: 46mpps IPv6: 8 routes: radix6_lockless: ~20mpps dpdk_lpm6: ~70mpps 100k routes: radix6_lockless: 13.9mpps dpdk_lpm6: 57mpps Forwarding benchmarks: + 10-15% IPv4 forwarding performance (small-fib, bsearch4) + 25% IPv4 forwarding performance (full-view, dpdk_lpm4) + 20% IPv6 forwarding performance (full-view, dpdk_lpm6) Control: Framwork adds the following runtime sysctls: List algos * net.route.algo.inet.algo_list: bsearch4, radix4_lockless, radix4 * net.route.algo.inet6.algo_list: radix6_lockless, radix6, dpdk_lpm6 Debug level (7=LOG_DEBUG, per-route) net.route.algo.debug_level: 5 Algo selection (currently only for fib 0): net.route.algo.inet.algo: bsearch4 net.route.algo.inet6.algo: radix6_lockless Support for manually changing algos in non-default fib will be added soon. Some sysctl names will be changed in the near future. Differential Revision: https://reviews.freebsd.org/D27401 |
||
---|---|---|
.. | ||
altq | ||
route | ||
bpf_buffer.c | ||
bpf_buffer.h | ||
bpf_filter.c | ||
bpf_jitter.c | ||
bpf_jitter.h | ||
bpf_zerocopy.c | ||
bpf_zerocopy.h | ||
bpf.c | ||
bpf.h | ||
bpfdesc.h | ||
bridgestp.c | ||
bridgestp.h | ||
debugnet_inet.c | ||
debugnet_int.h | ||
debugnet.c | ||
debugnet.h | ||
dlt.h | ||
ethernet.h | ||
firewire.h | ||
ieee8023ad_lacp.c | ||
ieee8023ad_lacp.h | ||
ieee_oui.h | ||
if_arp.h | ||
if_bridge.c | ||
if_bridgevar.h | ||
if_clone.c | ||
if_clone.h | ||
if_dead.c | ||
if_debug.c | ||
if_disc.c | ||
if_dl.h | ||
if_edsc.c | ||
if_enc.c | ||
if_enc.h | ||
if_epair.c | ||
if_ethersubr.c | ||
if_fwsubr.c | ||
if_gif.c | ||
if_gif.h | ||
if_gre.c | ||
if_gre.h | ||
if_infiniband.c | ||
if_ipsec.c | ||
if_ipsec.h | ||
if_lagg.c | ||
if_lagg.h | ||
if_llatbl.c | ||
if_llatbl.h | ||
if_llc.h | ||
if_loop.c | ||
if_me.c | ||
if_media.c | ||
if_media.h | ||
if_mib.c | ||
if_mib.h | ||
if_pflog.h | ||
if_pfsync.h | ||
if_sppp.h | ||
if_spppfr.c | ||
if_spppsubr.c | ||
if_stf.c | ||
if_tap.h | ||
if_tun.h | ||
if_tuntap.c | ||
if_types.h | ||
if_var.h | ||
if_vlan_var.h | ||
if_vlan.c | ||
if_vxlan.c | ||
if_vxlan.h | ||
if.c | ||
if.h | ||
ifdi_if.m | ||
iflib_clone.c | ||
iflib_private.h | ||
iflib.c | ||
iflib.h | ||
ifq.h | ||
infiniband.h | ||
mp_ring.c | ||
mp_ring.h | ||
mppc.h | ||
mppcc.c | ||
mppcd.c | ||
netisr_internal.h | ||
netisr.c | ||
netisr.h | ||
netmap_legacy.h | ||
netmap_user.h | ||
netmap_virt.h | ||
netmap.h | ||
paravirt.h | ||
pfil.c | ||
pfil.h | ||
pfkeyv2.h | ||
pfvar.h | ||
ppp_defs.h | ||
radix.c | ||
radix.h | ||
raw_cb.c | ||
raw_cb.h | ||
raw_usrreq.c | ||
rndis.h | ||
route.c | ||
route.h | ||
rss_config.c | ||
rss_config.h | ||
rtsock.c | ||
sff8436.h | ||
sff8472.h | ||
slcompress.c | ||
slcompress.h | ||
toeplitz.c | ||
toeplitz.h | ||
vnet.c | ||
vnet.h |