aboutsummaryrefslogtreecommitdiff
path: root/sys/tests
Commit message (Collapse)AuthorAgeFilesLines
* routing: add IPv6 fib validation procedure.Alexander V. Chernikov2021-08-161-1/+231
| | | | | | | | 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
* routing: Use process fib instead of fib 0 when conducting tests.Alexander V. Chernikov2021-08-151-24/+39
| | | | | | | | * 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
* tests: Revise FIB lookups per second benchmarking routinesMarko Zec2021-06-171-21/+119
| | | | | | | | | | | | | | | | 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
* Revise FIB lookups per second benchmarking routines.Marko Zec2021-05-051-15/+27
| | | | | | | | | | | | | | | | | 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
* Add IPv4 fib lookup performance tests with uniform keys.Alexander V. Chernikov2021-03-301-0/+52
| | | | | Submitted by: zec MFC after: 1 week
* Enable running fib tests inside vnet jail.Alexander V. Chernikov2021-01-171-4/+4
|
* Add fib lookup testing module.Alexander V. Chernikov2021-01-091-0/+537
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Add small tool to invoke kernel test framework tests.Hans Petter Selasky2020-09-022-0/+101
| | | | | | | | MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/head/; revision=365236
* Fix build of epoch_test module.Hans Petter Selasky2020-09-021-1/+2
| | | | | | | | | | While at it add missing epoch_free() call. MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/head/; revision=365235
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-262-6/+12
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* Regularize the Netflix copyrightWarner Losh2019-02-044-7/+5
| | | | | | | | | | | | | | | Use recent best practices for Copyright form at the top of the license: 1. Remove all the All Rights Reserved clauses on our stuff. Where we piggybacked others, use a separate line to make things clear. 2. Use "Netflix, Inc." everywhere. 3. Use a single line for the copyright for grep friendliness. 4. Use date ranges in all places for our stuff. Approved by: Netflix Legal (who gave me the form), adrian@ (pmc files) Notes: svn path=/head/; revision=343755
* epoch_test: fix compileMatt Macy2018-07-151-4/+6
| | | | | | | | | - update to new interface Reported by: manu Notes: svn path=/head/; revision=336300
* epoch(9): Make epochs non-preemptible by defaultMatt Macy2018-05-181-7/+7
| | | | | | | | | | | There are risks associated with waiting on a preemptible epoch section. Change the name to make them not be the default and document the issue under CAVEATS. Reported by: markj Notes: svn path=/head/; revision=333802
* epoch: add non-preemptible "critical" variantMatt Macy2018-05-181-1/+2
| | | | | | | | | | | | | | | | | adds: - epoch_enter_critical() - can be called inside a different epoch, starts a section that will acquire any MTX_DEF mutexes or do anything that might sleep. - epoch_exit_critical() - corresponding exit call - epoch_wait_critical() - wait variant that is guaranteed that any threads in a section are running. - epoch_global_critical - an epoch_wait_critical safe epoch instance Requested by: markj Approved by: sbruno Notes: svn path=/head/; revision=333775
* Test priority handling in epoch test.Matt Macy2018-05-111-2/+12
| | | | | | | | - Double the number of test threads to mp_ncpu*2 - Give each thread a different scheduling priority Notes: svn path=/head/; revision=333479
* Add simple preempt safe epoch APIMatt Macy2018-05-101-0/+211
| | | | | | | | | | | | | | | | | | Read locking is over used in the kernel to guarantee liveness. This API makes it easy to provide livenes guarantees without atomics. Includes epoch_test kernel module to stress test the API. Documentation will follow initial use case. Test case and improvements to preemption handling in response to discussion with mjg@ Reviewed by: imp@, shurd@ Approved by: sbruno@ Notes: svn path=/head/; revision=333466
* style(9): sort headersEnji Cooper2017-05-091-6/+6
| | | | | | | | MFC after: 3 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=318010
* style(9): sort headers and remove duplicatesEnji Cooper2017-05-091-4/+2
| | | | | | | | MFC after: 3 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=318006
* Style 9 changes.Randall Stewart2015-11-122-59/+63
| | | | | | | MFC after: 1 Month Notes: svn path=/head/; revision=290714
* Fix UP build.Konstantin Belousov2015-11-121-4/+0
| | | | Notes: svn path=/head/; revision=290707
* Remove redundant declaration for sysctl kern.Bryan Drewery2015-11-111-1/+0
| | | | | | | | | | This is trying to fix the GCC build. MFC after: 1 month X-MFC-With: r290663 Notes: svn path=/head/; revision=290676
* Use a proper prototype.Bryan Drewery2015-11-111-1/+1
| | | | | | | | | | This was a failure in the GCC build. MFC after: 1 month X-MFC-With: r290663 Notes: svn path=/head/; revision=290675
* Add a kernel test framework. The callout_test is a demonstration and will onlyRandall Stewart2015-11-104-0/+710
work with the upcoming async-drain functionality. Tests can be added to the tests directory and then the framework can be used to launch those tests. MFC after: 1 month Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D1755 Notes: svn path=/head/; revision=290663