From: David Miller <davem@davemloft.net>
To: netdev@vger.kernel.org
Cc: eric.dumazet@gmail.com, pablo@netfilter.org, robert.olsson@its.uu.se
Subject: [ANNOUNCE] NET Test Tools
Date: Fri, 18 Feb 2011 21:36:43 -0800 (PST) [thread overview]
Message-ID: <20110218.213643.193700084.davem@davemloft.net> (raw)
I've made a GIT repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net_test_tools.git
that contains little tools like the udpflood program I posted the other
day.
It requires libmnl be installed. I'm happy to take patches with the
strict rule that adding autoconf is not allowed.
Also in there is a new tool, "route_bench" that allows benchmarking
the ipv4 route lookup path. Amusingly it's slower than udpflood
because we have to recvmsg() sink the rtnetlink replies, maybe there
is some way to optimize that?
The tool allows all kinds of iteration through the various keys of a
routing lookup.
davem@maramba:~/src/GIT/route_bench$ route_bench -h
usage: route_bench [ -o ] [ -l count ]
[ -s src_ip ] [ -a src_ip_stride ] [ -b src_ip_limit ]
[ -d dst_ip ] [ -e dst_ip_stride ] [ -f dst_ip_limit ]
[ -i iif ] [ -x iif_stride ] [ -y iif_limit ]
[ -m mark ] [ -n mark_stride ] [ -p mark_limit ]
[ -t tos ] [ -q tos_stride ] [ -r tos_limit ]
For example, the following does 100000 lookups, iterating over destination
addresses 10.8.0.2 to 10.8.0.254 in increments of 7.
davem@maramba:~/src/GIT/route_bench$ route_bench -l 100000 -d 10.8.0.2 -a 7 -b 10.8.0.254
Bench: count(100000) saddr[0x00000000] daddr[0x0a080002] mark[0x0] iif[0x0]
Result: 0m2.342s
davem@maramba:~/src/GIT/route_bench$
That is with the routing cache removed on a Niagara 2+ machine.
You can use the "-o" option to control how the program handles the case where
it has been asked to iterate over several keys. By default, all keys iterate
at the same time. With "-o" specified we iterate only the highest priority
key until it wraps, then we iterate over the next key, and so on and so
forth. The priority is src --> dst --> iif --> mark --> tos.
Note that if "iif" is zero (it's default value) we do an output lookup,
else we do an input route lookup.
I want to add randomization to the iteration, as well as threading support.
Enjoy.
reply other threads:[~2011-02-19 5:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110218.213643.193700084.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=robert.olsson@its.uu.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox