History log of /freebsd-current/sys/tests/fib_lookup/fib_lookup.c
Revision Date Author Comments
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# cbfba56c 16-Aug-2021 Alexander V. Chernikov <melifaro@FreeBSD.org>

routing: add IPv6 fib validation procedure.

Allow consistency validation of the inet6 fib based on rib data.
Validation can be kicked off by loading test_lookup module and
running sysctl net.route.test.run_inet6_scan=1

MFC after: 1 week


# 4a77a9b6 15-Aug-2021 Alexander V. Chernikov <melifaro@FreeBSD.org>

routing: Use process fib instead of fib 0 when conducting tests.

* Allow to do validation/performance tests by using process
fib instead of default fib 0.
* Print all validation errors instead of just the first one.

MFC after: 1 week


# b6f8436b 17-Jun-2021 Marko Zec <zec@FreeBSD.org>

tests: Revise FIB lookups per second benchmarking routines

Fix a bug in the LPM SEQ benchmark (missing break inside a switch block)
by restructuring the test loop, while introducing additional two
synthetic test options:

ANN: scan only the address space announced in current RIB
REP: repeat lookups over several keys in a sliding window scheme

The total of eight combinations of test options are now available
through dedicated sysctl hooks.

Differential Revision: <https://reviews.freebsd.org/D30311>
Reviewed by: melifaro
MFC after: 3 days


# a43104eb 04-May-2021 Marko Zec <zec@FreeBSD.org>

Revise FIB lookups per second benchmarking routines.

Add a LPS benchmark variant which introduces artificial dependencies
between successive lookups. While here, instead of writing the results
from the lookups to a huge array, add them to an accumulator, in a more
lightweight attempt at preventing the CPU's OOO machinery from
discarding the lookup results if they would be completely unused.

net.route.test.run_lps_rnd measures LPS throughput with independent
uniformly random keys

net.route.test.run_lps_seq measures LPS throughput with uniformly
random keys with artificial interdependencies
Reviewed by: melifaro
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D30096


# b8598e2f 30-Mar-2021 Alexander V. Chernikov <melifaro@FreeBSD.org>

Add IPv4 fib lookup performance tests with uniform keys.

Submitted by: zec
MFC after: 1 week


# 74935ce8 17-Jan-2021 Alexander V. Chernikov <melifaro@FreeBSD.org>

Enable running fib tests inside vnet jail.


# 0433870e 08-Jan-2021 Alexander V. Chernikov <melifaro@FreeBSD.org>

Add fib lookup testing module.

This module intended to measure performance of routing lookups.

Uses a list of IP addresses specified by sysctl one-by-one.
Performance testing is triggered by changing sysctl OID with a number of lookups to execute.
Lookups are done by the chunks of 10K routes, entering/exiting epoch on
chunk granularity to amortise cost.

Example:
make -C sys/modules/test/fib_lookup unload load
for i in `cat ~/ip4.txt`; do sysctl net.route.test.add_inet_addr=$i; done
for i in `cat ~/ip6.txt`; do sysctl net.route.test.add_inet6_addr=$i; done

sysctl net.route.test.run_inet=10000000

dmesg | tail

Dec 13 23:24:05 current kernel: 10000000 packets in 417240173 nanoseconds, 23967011 pps
Dec 13 23:24:06 current kernel: run: 10000000 packets vnet 0xfffff80003073f00
Dec 13 23:24:07 current kernel: 10000000 packets in 423086254 nanoseconds, 23635842 pps

Differential Revision: https://reviews.freebsd.org/D27604