Lines Matching +full:0 +full:- +full:9 +full:a +full:- +full:e

1 .. SPDX-License-Identifier: GPL-2.0
7 Enable CONFIG_NET_PKTGEN to compile and build pktgen either in-kernel
8 or as a module. A module is preferred; modprobe pktgen if needed. Once
9 running, pktgen creates a thread for each CPU with affinity to that CPU.
10 Monitoring and controlling is done via /proc. It is easiest to select a
13 On a dual CPU::
16 root 129 0.3 0.0 0 0 ? SW 2003 523:20 [kpktgend_0]
17 root 130 0.3 0.0 0 0 ? SW 2003 509:50 [kpktgend_1]
31 overload type of benchmarking, as this could hurt the normal use-case.
35 # ethtool -G ethX tx 1024
37 A larger TX ring can improve pktgen's performance, while it can hurt
44 ring-buffers for various performance reasons, and packets stalling
49 and the cleanup interval is affected by the ethtool --coalesce setting
50 of parameter "rx-usecs".
52 For ixgbe use e.g. "30" resulting in approx 33K interrupts/sec (1/30*10^6)::
54 # ethtool -C ethX rx-usecs 30
59 Pktgen creates a thread for each CPU with affinity to that CPU.
65 Stopped: eth4@0
66 Result: OK: add_device=eth4@0
72 * add_device DEVICE@NAME -- adds a single device
73 * rem_device_all -- remove all associated devices
75 When adding a device to a thread, a corresponding procfile is created
90 holds running statistics. The Result is printed after a run or after
93 /proc/net/pktgen/eth4@0
96 frags: 0 delay: 0 clone_skb: 64 ifname: eth4@0
97 flows: 0 flowlen: 0
98 queue_map_min: 0 queue_map_max: 0
101 src_mac: 90:e2:ba:0a:56:b4 dst_mac: 00:1b:21:3c:9d:f8
102 udp_src_min: 9 udp_src_max: 109 udp_dst_min: 9 udp_dst_max: 9
103 src_mac_count: 0 dst_mac_count: 0
106 pkts-sofar: 100000 errors: 0
108 seq_num: 100001 cur_dst_mac_offset: 0 cur_src_mac_offset: 0
110 cur_udp_dst: 9 cur_udp_src: 42
111 cur_queue_map: 0
112 flows: 0
113 Result: OK: 15430(c15405+d25) usec, 100000 (60byte,0frags)
114 6480562pps 3110Mb/sec (3110669760bps) errors: 0
122 scripts, i.e.::
124 export PGDEV=/proc/net/pktgen/eth4@0
133 pgset "clone_skb 0" use single SKB for all transmits
156 pgset "queue_map_min 0" Sets the min value of tx queue interval
158 To select queue 1 of a given device,
167 pgset "flag [name]" Set a flag to determine behaviour. Current flags
181 pgset 'flag ![name]' Clear a flag to determine behaviour.
184 the specified flag as a history command.
188 pgset "udp_src_min 9" set UDP source port min, If < udp_src_max, then
191 pgset "udp_src_max 9" set UDP source port max.
192 pgset "udp_dst_min 9" set UDP destination port min, If < udp_dst_max, then
194 pgset "udp_dst_max 9" set UDP destination port max.
196 pgset "mpls 0001000a,0002000a,0000000a" set MPLS labels (in this example
198 inner label=0 (IPv4 NULL)) Note that
210 pgset "mpls 0" turn off mpls (or any invalid argument works too!)
212 pgset "vlan_id 77" set VLAN ID 0-4095
213 pgset "vlan_p 3" set priority bit 0-7 (default 0)
214 pgset "vlan_cfi 0" set canonical format identifier 0-1 (default 0)
216 pgset "svlan_id 22" set SVLAN ID 0-4095
217 pgset "svlan_p 3" set priority bit 0-7 (default 0)
218 pgset "svlan_cfi 0" set canonical format identifier 0-1 (default 0)
224 pgset "tos XX" set former IPv4 TOS field (e.g. "tos 28" for AF11 no ECN, default 00)
225 …pgset "traffic_class XX" set former IPv6 TRAFFIC CLASS (e.g. "traffic_class B8" for EF no ECN, def…
237 A collection of tutorial scripts and helpers for pktgen is in the
243 ./pktgen_sample01_simple.sh -i eth4 -m 00:1B:21:3C:9D:F8 -d 192.168.8.2
247 ./pktgen_sample01_simple.sh [-vx] -i ethX
249 -i : ($DEV) output interface/device (required)
250 -s : ($PKT_SIZE) packet size
251 -d : ($DEST_IP) destination IP. CIDR (e.g. 198.18.0.0/15) is also allowed
252 -m : ($DST_MAC) destination MAC-addr
253 -p : ($DST_PORT) destination PORT range (e.g. 433-444) is also allowed
254 -t : ($THREADS) threads to start
255 -f : ($F_THREAD) index of first thread (zero indexed CPU number)
256 -c : ($SKB_CLONE) SKB clones send before alloc new SKB
257 -n : ($COUNT) num messages to send per thread, 0 means indefinitely
258 -b : ($BURST) HW level bursting of SKBs
259 -v : ($VERBOSE) verbose
260 -x : ($DEBUG) debug
261 -6 : ($IP6) IPv6
262 -w : ($DELAY) Tx Delay value (ns)
263 -a : ($APPEND) Script will not reset generator's state, but will append its config
265 The global variables being set are also listed. E.g. the required
266 interface/device parameter "-i" sets variable $DEV. Copy the
272 Note that when adding devices to a specific CPU it is a good idea to
398 - ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/
399 - ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/examples/
401 Paper from Linux-Kongress in Erlangen 2004.
402 - ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/pktgen_paper.pdf
406 Grant Grundler for testing on IA-64 and parisc, Harald Welte, Lennert Buytenhek
410 Good luck with the linux net-development.