1 $NetBSD: README,v 1.8 2026/10/24 15:54:55 joe Exp $ 2 3 npftest - a tool for regression testing and debugging NPF. 4 It uses RUMP framework to run NPF kernel module in the userspace. 5 6 --- 7 8 Test: 9 10 npfctl debug -c $test_config -o /tmp/npf.nvlist 11 12 $test_config (Test configuration files) are either npftest.conf or npftestl3.conf 13 14 npftest.conf - contains rules for layer 2 and 3. 15 npftestl3.conf - contains rules for layer 3 only 16 17 npftest -c /tmp/npf.nvlist -t /* for regression in al testnames */ 18 19 npftest -c /tmp/npf.nvlist -T $testname /* for a specific test */ 20 21 Stream: 22 23 tcpdump -w stream.pcap -i $interface "host $host and tcp" 24 npfctl debug npftest.conf /tmp/npf.nvlist 25 npftest -c /tmp/npf.nvlist -s stream.pcap > stream_npf_data.txt 26 27 Preferably, use MALLOC_OPTIONS="AJ" and/or other facilities. 28 29 Benchmark: 30 31 npftest -b rule -c /tmp/npf.nvlist -p $ncpu 32 33 --- 34 35 Update RUMP libraries once the kernel side has been changed. Hint: 36 37 cd src/sys/net/npf 38 sudo make includes 39 40 cd src/sys/rump/net/lib/libnpf 41 make distclean 42 MKDEBUG=yes MKDEBUGLIB=yes DBG="-g -O2" make -j8 43 sudo MKDEBUG=yes MKDEBUGLIB=yes DBG="-g -O2" make install 44