Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/npf/npftest npftest: add an example in the README, ...



details:   https://anonhg.NetBSD.org/src/rev/bb844da395ad
branches:  trunk
changeset: 330151:bb844da395ad
user:      rmind <rmind%NetBSD.org@localhost>
date:      Wed Jun 25 00:21:42 2014 +0000

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

diffstat:

 usr.sbin/npf/npftest/README                     |  8 ++++++--
 usr.sbin/npf/npftest/libnpftest/npf_perf_test.c |  4 ++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diffs (43 lines):

diff -r 391d07e51565 -r bb844da395ad usr.sbin/npf/npftest/README
--- a/usr.sbin/npf/npftest/README       Wed Jun 25 00:20:06 2014 +0000
+++ b/usr.sbin/npf/npftest/README       Wed Jun 25 00:21:42 2014 +0000
@@ -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 @@
 
 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:
diff -r 391d07e51565 -r bb844da395ad usr.sbin/npf/npftest/libnpftest/npf_perf_test.c
--- a/usr.sbin/npf/npftest/libnpftest/npf_perf_test.c   Wed Jun 25 00:20:06 2014 +0000
+++ b/usr.sbin/npf/npftest/libnpftest/npf_perf_test.c   Wed Jun 25 00:21:42 2014 +0000
@@ -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 @@
        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);
 }



Home | Main Index | Thread Index | Old Index