NetBSD/usr.sbin/npf/npftest
martin 5c18a11ba1 Allow to set sanitizer flags for the rump build from the
build.sh command line, like: -V RUMP_SANITIZE=address
2021-07-07 11:51:45 +00:00
..
libnpftest npftest: Wait at least one tick in each gc busy wait iteration. 2020-08-27 18:51:20 +00:00
Makefile Allow to set sanitizer flags for the rump build from the 2021-07-07 11:51:45 +00:00
README
npfstream.c
npftest.c Major NPF improvements (merge from upstream): 2020-05-30 14:16:56 +00:00
npftest.conf Major NPF improvements (merge from upstream): 2020-05-30 14:16:56 +00:00
npftest.h Major NPF improvements (merge from upstream): 2020-05-30 14:16:56 +00:00

README

$NetBSD: README,v 1.7 2018/09/29 14:41:36 rmind Exp $

npftest - a tool for regression testing and debugging NPF.
It uses RUMP framework to run NPF kernel module in the userspace.

---

Test:

npfctl debug npftest.conf /tmp/npf.nvlist
npftest -c /tmp/npf.nvlist -t

Stream:

tcpdump -w stream.pcap -i $interface "host $host and tcp"
npfctl debug npftest.conf /tmp/npf.nvlist
npftest -c /tmp/npf.nvlist -s stream.pcap > stream_npf_data.txt

Preferably, use MALLOC_OPTIONS="AJ" and/or other facilities.

Benchmark:

npftest -b rule -c /tmp/npf.nvlist -p $ncpu

---

Update RUMP libraries once the kernel side has been changed.  Hint:

cd src/sys/net/npf
sudo make includes

cd src/sys/rump/net/lib/libnpf
make distclean
MKDEBUG=yes MKDEBUGLIB=yes DBG="-g -O2" make -j8
sudo MKDEBUG=yes MKDEBUGLIB=yes DBG="-g -O2" make install