• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

README.rstD11-Mar-20241.8 KiB4637

functions.shD11-Mar-20244 KiB165114

parameters.shD11-Mar-20242.9 KiB11798

pktgen_bench_xmit_mode_netif_receive.shD11-Mar-20242.7 KiB9034

pktgen_bench_xmit_mode_queue_xmit.shD11-Mar-20241.9 KiB7035

pktgen_sample01_simple.shD11-Mar-20241.9 KiB7532

pktgen_sample02_multiqueue.shD11-Mar-20242.2 KiB8038

pktgen_sample03_burst_single_flow.shD11-Mar-20242.6 KiB8641

pktgen_sample04_many_flows.shD11-Mar-20242.5 KiB9545

pktgen_sample05_flow_per_thread.shD11-Mar-20242.3 KiB8342

pktgen_sample06_numa_awared_queue_irq_affinity.shD11-Mar-20243 KiB9851

README.rst

1Sample and benchmark scripts for pktgen (packet generator)
2==========================================================
3This directory contains some pktgen sample and benchmark scripts, that
4can easily be copied and adjusted for your own use-case.
5
6General doc is located in kernel: Documentation/networking/pktgen.txt
7
8Helper include files
9====================
10This directory contains two helper shell files, that can be "included"
11by shell source'ing.  Namely "functions.sh" and "parameters.sh".
12
13Common parameters
14-----------------
15The parameters.sh file support easy and consistant parameter parsing
16across the sample scripts.  Usage example is printed on errors::
17
18 Usage: ./pktgen_sample01_simple.sh [-vx] -i ethX
19  -i : ($DEV)       output interface/device (required)
20  -s : ($PKT_SIZE)  packet size
21  -d : ($DEST_IP)   destination IP
22  -m : ($DST_MAC)   destination MAC-addr
23  -t : ($THREADS)   threads to start
24  -f : ($F_THREAD)  index of first thread (zero indexed CPU number)
25  -c : ($SKB_CLONE) SKB clones send before alloc new SKB
26  -n : ($COUNT)     num messages to send per thread, 0 means indefinitely
27  -b : ($BURST)     HW level bursting of SKBs
28  -v : ($VERBOSE)   verbose
29  -x : ($DEBUG)     debug
30
31The global variable being set is also listed.  E.g. the required
32interface/device parameter "-i" sets variable $DEV.
33
34Common functions
35----------------
36The functions.sh file provides; Three different shell functions for
37configuring the different components of pktgen: pg_ctrl(), pg_thread()
38and pg_set().
39
40These functions correspond to pktgens different components.
41 * pg_ctrl()   control "pgctrl" (/proc/net/pktgen/pgctrl)
42 * pg_thread() control the kernel threads and binding to devices
43 * pg_set()    control setup of individual devices
44
45See sample scripts for usage examples.
46