LPMBench
(Beta Version)
  • LPMBench is an toolkit for Development & Performance benchmarking of the IP Route Lookup Algorithms
  • LPMBench takes updating into consideration

 

 

 

ClassBench Workflow

Fig. Flow-Chart of LPMBench

Usage:
LPMBench
<r Routeset>
[-a algorithmID] [-t pkthdrTrace | -T Tracefile] [-M nSearchThread#] [-m nUpdateThread#]
[-c pktCnt#] [-l logfile] [-I Iteration] [-f addr_footprint] [-u eventPoolSize]

-a algorithmID: the lookup algorithm to test.
In the sample code: 1:BinaryTrie(default),2:SegTable{24-8},3:SegTable{16-8-8}
note: you may put more into LPMBench, providing the four APIs required.

-r Routeset: the route set used to build the lookup table

Format: dstIP prefix/mask
Examples: (test.route)
0.0.0.0/0
0.0.0.0/1
64.0.0.0/2
128.0.0.0/1
128.0.0.0/2
192.0.0.0/3
255.255.255.255/32

-t pkthdrTrace: the packet header trace for test the lookup algorithm
Format: dstIP srcIP dstPort srcPort proto matchRouteID
Examples: (test.trace)
0 0 0 0 0 1
1073741824 0 0 0 0 2
2147483648 0 0 0 0 4
3221225472 0 0 0 0 3
3758096384 0 0 0 0 5
4294967295 0 0 0 0 6

-T Tracefile: get trace from opening pcaped trace file
-M nSearchThread: the number of threads for looking up, default 1
-m nUpdateThread: the number of threads for updating rules, default 0 (not do updating)
-c hdrCnt: number limit for pkt hdr looking up, not more than 1000000 (default=1000000)
-l logfile: file to log the information
-I Iteration: number of running looking up
-f addr_footprint: randomly generate hdr trace with dstIP ranged in addr_footprint, this option Can not coexist with -t
-u updateEventPool Size: the size of update event Pool where update function will get the update event, not more than 1000000 (default=1000000)

Test Example:
on intel architecture: #> make test -f Makefile.ia
or Sun SPARC: #> make test -f Makefile.solaris
a simple example will run with test.trace and test.route


Outputs: (something like the followings)
./LPMBench -r test.route -t test.trace -I 10000 -u 10 -a 1 -M 1 -m 1
This Platform is LITTLE ENDIAN.(e.g. x86)
Benchmark Mode...
Route Read: 7(7). Hdr Read: 6.
Initiating Binary Trie Data Structure...
Init Finish:Totally 74 Trie Nodes(0 KByte Mem).Structure Build Time 0.031 secs
1 search thread,1 update thread
Number of searched packets:6 (x10000).
Time elapsed: 0.012935 secs. LPM Lookup Rate=5.411674 Mpps
8875 routes(3941 add, 4934 del) updated
Rule update Frequency=686122.94 /s

Links:
LPMBench: Source codes and test sets
RouteView: A project from University of Oregon. Source of route snapshots and many other info and stat.
MRT Parsers: Marco d'Itri's perl dump parser scripts to convert the MRT format routes or updates into text

| Contact Me | Dept of Computer Science and Technology, Tsinghua Univ. P.R.China, 100084