~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/samples/pktgen/README.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 Sample and benchmark scripts for pktgen (packet generator)
  2 ==========================================================
  3 This directory contains some pktgen sample and benchmark scripts, that
  4 can easily be copied and adjusted for your own use-case.
  5 
  6 General doc is located in kernel: Documentation/networking/pktgen.rst
  7 
  8 Helper include files
  9 ====================
 10 This directory contains two helper shell files, that can be "included"
 11 by shell source'ing.  Namely "functions.sh" and "parameters.sh".
 12 
 13 Common parameters
 14 -----------------
 15 The parameters.sh file support easy and consistant parameter parsing
 16 across 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. CIDR (e.g. 198.18.0.0/15) is also allowed
 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   -6 : ($IP6)       IPv6
 32   -w : ($DELAY)     Tx Delay value (ns)
 33   -a : ($APPEND)    Script will not reset generator's state, but will append its config
 34 
 35 The global variable being set is also listed.  E.g. the required
 36 interface/device parameter "-i" sets variable $DEV.
 37 
 38 "-a" parameter may be used to create different flows simultaneously.
 39 In this mode script will keep the existing config, will append its settings.
 40 In this mode you'll have to manually run traffic with "pg_ctrl start".
 41 
 42 For example you may use:
 43 
 44     source ./samples/pktgen/functions.sh
 45     pg_ctrl reset
 46     # add first device
 47     ./pktgen_sample06_numa_awared_queue_irq_affinity.sh -a -i ens1f0 -m 34:80:0d:a3:fc:c9 -t 8
 48     # add second device
 49     ./pktgen_sample06_numa_awared_queue_irq_affinity.sh -a -i ens1f1 -m 34:80:0d:a3:fc:c9 -t 8
 50     # run joint traffic on two devs
 51     pg_ctrl start
 52 
 53 Common functions
 54 ----------------
 55 The functions.sh file provides; Three different shell functions for
 56 configuring the different components of pktgen: pg_ctrl(), pg_thread()
 57 and pg_set().
 58 
 59 These functions correspond to pktgens different components.
 60  * pg_ctrl()   control "pgctrl" (/proc/net/pktgen/pgctrl)
 61  * pg_thread() control the kernel threads and binding to devices
 62  * pg_set()    control setup of individual devices
 63 
 64 See sample scripts for usage examples.

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php