Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
README.rst | D | 08-May-2024 | 1.8 KiB | 47 | 38 | |
functions.sh | D | 08-May-2024 | 4.8 KiB | 204 | 142 | |
parameters.sh | D | 08-May-2024 | 3.1 KiB | 122 | 103 | |
pktgen_bench_xmit_mode_netif_receive.sh | D | 08-May-2024 | 3 KiB | 101 | 43 | |
pktgen_bench_xmit_mode_queue_xmit.sh | D | 08-May-2024 | 2.2 KiB | 81 | 44 | |
pktgen_sample01_simple.sh | D | 08-May-2024 | 2.3 KiB | 86 | 41 | |
pktgen_sample02_multiqueue.sh | D | 08-May-2024 | 2.5 KiB | 91 | 47 | |
pktgen_sample03_burst_single_flow.sh | D | 08-May-2024 | 2.9 KiB | 97 | 50 | |
pktgen_sample04_many_flows.sh | D | 08-May-2024 | 2.9 KiB | 106 | 54 | |
pktgen_sample05_flow_per_thread.sh | D | 08-May-2024 | 2.6 KiB | 93 | 51 | |
pktgen_sample06_numa_awared_queue_irq_affinity.sh | D | 08-May-2024 | 3.4 KiB | 109 | 60 |
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 -p : ($DST_PORT) destination PORT range (e.g. 433-444) is also allowed 24 -t : ($THREADS) threads to start 25 -f : ($F_THREAD) index of first thread (zero indexed CPU number) 26 -c : ($SKB_CLONE) SKB clones send before alloc new SKB 27 -n : ($COUNT) num messages to send per thread, 0 means indefinitely 28 -b : ($BURST) HW level bursting of SKBs 29 -v : ($VERBOSE) verbose 30 -x : ($DEBUG) debug 31 32The global variable being set is also listed. E.g. the required 33interface/device parameter "-i" sets variable $DEV. 34 35Common functions 36---------------- 37The functions.sh file provides; Three different shell functions for 38configuring the different components of pktgen: pg_ctrl(), pg_thread() 39and pg_set(). 40 41These functions correspond to pktgens different components. 42 * pg_ctrl() control "pgctrl" (/proc/net/pktgen/pgctrl) 43 * pg_thread() control the kernel threads and binding to devices 44 * pg_set() control setup of individual devices 45 46See sample scripts for usage examples. 47