aboutsummaryrefslogtreecommitdiffstats
path: root/samples/pktgen/README.rst
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2015-05-21 06:17:19 -0400
committerDavid S. Miller <davem@davemloft.net>2015-05-22 23:59:16 -0400
commitb64b0d1e64959691c1f4067a05fdb541d453ed6a (patch)
treed9db1b3e09c72c8101cc7ca4a0ab71142f620f8a /samples/pktgen/README.rst
parent4020726479ff799318a5aa188b81d79df86a0ea3 (diff)
pktgen: new pktgen helper functions for samples scripts
Preparing for removing existing samples/pktgen/ scripts, and replacing these with easier to use samples. This commit provides two helper shell files, that can be "included" by shell source'ing. Namely "functions.sh" and "parameters.sh". The parameters.sh file support easy and consistant parameter parsing across the sample scripts. Usage example is printed on errors. The functions.sh file provides, three new shell functions for configuring the different components of pktgen: pg_ctrl(), pg_thread() and pg_set(). A slightly improved version of the old pgset() function is also provided for backwards compat. The new functions correspond to pktgens different components. * pg_ctrl() control "pgctrl" (/proc/net/pktgen/pgctrl) * pg_thread() control the kernel threads and binding to devices * pg_set() control setup of individual devices These changes are borrowed from: https://github.com/netoptimizer/network-testing/tree/master/pktgen Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/pktgen/README.rst')
-rw-r--r--samples/pktgen/README.rst43
1 files changed, 43 insertions, 0 deletions
diff --git a/samples/pktgen/README.rst b/samples/pktgen/README.rst
new file mode 100644
index 000000000000..8365c4e5c513
--- /dev/null
+++ b/samples/pktgen/README.rst
@@ -0,0 +1,43 @@
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 -c : ($SKB_CLONE) SKB clones send before alloc new SKB
25 -b : ($BURST) HW level bursting of SKBs
26 -v : ($VERBOSE) verbose
27 -x : ($DEBUG) debug
28
29The global variable being set is also listed. E.g. the required
30interface/device parameter "-i" sets variable $DEV.
31
32Common functions
33----------------
34The functions.sh file provides; Three different shell functions for
35configuring the different components of pktgen: pg_ctrl(), pg_thread()
36and pg_set().
37
38These functions correspond to pktgens different components.
39 * pg_ctrl() control "pgctrl" (/proc/net/pktgen/pgctrl)
40 * pg_thread() control the kernel threads and binding to devices
41 * pg_set() control setup of individual devices
42
43See sample scripts for usage examples.