Module Name:    src
Committed By:   rmind
Date:           Wed Jun 25 00:21:42 UTC 2014

Modified Files:
        src/usr.sbin/npf/npftest: README
        src/usr.sbin/npf/npftest/libnpftest: npf_perf_test.c

Log Message:
npftest: add an example in the README, fix the total in npf_test_conc().


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/npf/npftest/README
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/npf/npftest/libnpftest/npf_perf_test.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/npf/npftest/README
diff -u src/usr.sbin/npf/npftest/README:1.5 src/usr.sbin/npf/npftest/README:1.6
--- src/usr.sbin/npf/npftest/README:1.5	Wed May 14 21:46:50 2014
+++ src/usr.sbin/npf/npftest/README	Wed Jun 25 00:21:42 2014
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.5 2014/05/14 21:46:50 rmind Exp $
+$NetBSD: README,v 1.6 2014/06/25 00:21:42 rmind Exp $
 
 npftest - a tool for regression testing and debugging NPF.
 It uses RUMP framework to run NPF kernel module in the userspace.
@@ -12,12 +12,16 @@ npftest -c /tmp/npf.plist -t
 
 Stream:
 
-tcpdump -w stream.pcap -i $INTERFACE "host $HOST and tcp"
+tcpdump -w stream.pcap -i $interface "host $host and tcp"
 npfctl debug npftest.conf /tmp/npf.plist
 npftest -c /tmp/npf.plist -s stream.pcap > stream_npf_data.txt
 
 Preferably, use MALLOC_OPTIONS="AJ" and/or other facilities.
 
+Benchmark:
+
+npftest -b rule -c /tmp/npf.plist -p $ncpu
+
 ---
 
 Update RUMP libraries once the kernel side has been changed.  Hint:

Index: src/usr.sbin/npf/npftest/libnpftest/npf_perf_test.c
diff -u src/usr.sbin/npf/npftest/libnpftest/npf_perf_test.c:1.3 src/usr.sbin/npf/npftest/libnpftest/npf_perf_test.c:1.4
--- src/usr.sbin/npf/npftest/libnpftest/npf_perf_test.c:1.3	Tue Sep 24 22:52:14 2013
+++ src/usr.sbin/npf/npftest/libnpftest/npf_perf_test.c	Wed Jun 25 00:21:42 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_perf_test.c,v 1.3 2013/09/24 22:52:14 joerg Exp $	*/
+/*	$NetBSD: npf_perf_test.c,v 1.4 2014/06/25 00:21:42 rmind Exp $	*/
 
 /*
  * NPF benchmarking.
@@ -99,5 +99,5 @@ npf_test_conc(bool st, unsigned nthreads
 	kmem_free(npackets, sizeof(uint64_t) * nthreads);
 	kmem_free(l, sizeof(lwp_t *) * nthreads);
 
-	printf("%u\t%" PRIu64 "\n", nthreads, total);
+	printf("%u\t%" PRIu64 "\n", nthreads, total / NSECS);
 }

Reply via email to