| 6c882bdc | 25-Aug-2021 |
Juhee Kang <[email protected]> |
samples: pktgen: add trap SIGINT for printing execution result
All pktgen samples can send indefinitely num messages per thread by setting the count option to 0(-n 0). If running sample with setting
samples: pktgen: add trap SIGINT for printing execution result
All pktgen samples can send indefinitely num messages per thread by setting the count option to 0(-n 0). If running sample with setting count 0 and press Ctrl-C to stop this program, the program prints the result of the execution so far. Currently, the samples besides sample{3...5} don't work properly. Because Ctrl-C stops the script, not just pktgen.
This is results of samples:
# DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample04_many_flows.sh -n 0 Running... ctrl^C to stop ^CDevice: eth0@0 Result: OK: 569657(c569538+d118) usec, 84650 (60byte,0frags) 148597pps 71Mb/sec (71326560bps) errors: 0
# DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample01_simple.sh -n 0 Running... ctrl^C to stop ^C
In order to solve this, this commit adds trap SIGINT. Also, this commit changes control_c function to print_result to maintain consistency with other samples.
Signed-off-by: Juhee Kang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| 0f0c4f1b | 12-Aug-2021 |
Juhee Kang <[email protected]> |
samples: pktgen: add missing IPv6 option to pktgen scripts
Currently, "sample04" and "sample05" are not working properly when running with an IPv6 option("-6"). The commit 0f06a6787e05 ("samples: Ad
samples: pktgen: add missing IPv6 option to pktgen scripts
Currently, "sample04" and "sample05" are not working properly when running with an IPv6 option("-6"). The commit 0f06a6787e05 ("samples: Add an IPv6 "-6" option to the pktgen scripts") has omitted the addition of this option at "sample04" and "sample05".
In order to support IPv6 option, this commit adds logic related to IPv6 option.
Fixes: 0f06a6787e05 ("samples: Add an IPv6 "-6" option to the pktgen scripts")
Signed-off-by: Juhee Kang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| c8fd4852 | 11-Mar-2021 |
Igor Russkikh <[email protected]> |
samples: pktgen: new append mode
To configure various complex flows we for sure can create custom pktgen init scripts, but sometimes thats not that easy.
New "-a" (append) option in all the existin
samples: pktgen: new append mode
To configure various complex flows we for sure can create custom pktgen init scripts, but sometimes thats not that easy.
New "-a" (append) option in all the existing sample scripts allows to append more "devices" into pktgen threads.
The most straightforward usecases for that are: - using multiple devices. We have to generate full linerate on all physical functions (ports) of our multiport device. - pushing multiple flows (with different packet options)
Signed-off-by: Igor Russkikh <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| 40f843ee | 05-Oct-2019 |
Daniel T. Lee <[email protected]> |
samples: pktgen: allow to specify destination IP range (CIDR)
Currently, kernel pktgen has the feature to specify destination address range for sending packet. (e.g. pgset "dst_min/dst_max")
But on
samples: pktgen: allow to specify destination IP range (CIDR)
Currently, kernel pktgen has the feature to specify destination address range for sending packet. (e.g. pgset "dst_min/dst_max")
But on samples, each pktgen script doesn't have any option to achieve this.
This commit adds the feature to specify the destination address range with CIDR.
-d : ($DEST_IP) destination IP. CIDR (e.g. 198.18.0.0/15) is also allowed
# ./pktgen_sample01_simple.sh -6 -d fe80::20/126 -p 3000 -n 4 # tcpdump ip6 and udp 05:14:18.082285 IP6 fe80::99.71 > fe80::23.3000: UDP, length 16 05:14:18.082564 IP6 fe80::99.43 > fe80::23.3000: UDP, length 16 05:14:18.083366 IP6 fe80::99.107 > fe80::22.3000: UDP, length 16 05:14:18.083585 IP6 fe80::99.97 > fe80::21.3000: UDP, length 16
Signed-off-by: Daniel T. Lee <[email protected]> Acked-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| f0681d95 | 05-Oct-2019 |
Daniel T. Lee <[email protected]> |
samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing
This commit adds CIDR parsing and IP validate helper function to parse single IP or range of IP with CIDR. (e.g. 198.18.0.0/15)
Vali
samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing
This commit adds CIDR parsing and IP validate helper function to parse single IP or range of IP with CIDR. (e.g. 198.18.0.0/15)
Validating the address should be preceded prior to the parsing. Helpers will be used in prior to set target address in samples/pktgen.
Signed-off-by: Daniel T. Lee <[email protected]> Acked-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| 3cad8f91 | 05-Oct-2019 |
Daniel T. Lee <[email protected]> |
samples: pktgen: fix proc_cmd command result check logic
Currently, proc_cmd is used to dispatch command to 'pg_ctrl', 'pg_thread', 'pg_set'. proc_cmd is designed to check command result with grep t
samples: pktgen: fix proc_cmd command result check logic
Currently, proc_cmd is used to dispatch command to 'pg_ctrl', 'pg_thread', 'pg_set'. proc_cmd is designed to check command result with grep the "Result:", but this might fail since this string is only shown in 'pg_thread' and 'pg_set'.
This commit fixes this logic by grep-ing the "Result:" string only when the command is not for 'pg_ctrl'.
For clarity of an execution flow, 'errexit' flag has been set.
To cleanup pktgen on exit, trap has been added for EXIT signal.
Signed-off-by: Daniel T. Lee <[email protected]> Acked-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| 6e32a74a | 29-Jun-2019 |
Daniel T. Lee <[email protected]> |
samples: pktgen: allow to specify destination port
Currently, kernel pktgen has the feature to specify udp destination port for sending packet. (e.g. pgset "udp_dst_min 9")
But on samples, each of
samples: pktgen: allow to specify destination port
Currently, kernel pktgen has the feature to specify udp destination port for sending packet. (e.g. pgset "udp_dst_min 9")
But on samples, each of the scripts doesn't have any option to achieve this.
This commit adds the DST_PORT option to specify the target port(s) in the script.
-p : ($DST_PORT) destination PORT range (e.g. 433-444) is also allowed
Signed-off-by: Daniel T. Lee <[email protected]> Acked-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| a4b6ade8 | 01-Nov-2017 |
Jesper Dangaard Brouer <[email protected]> |
samples/pktgen: remove remaining old pktgen sample scripts
Since commit 0f06a6787e05 ("samples: Add an IPv6 '-6' option to the pktgen scripts") the newer pktgen_sampleXX script does show howto use I
samples/pktgen: remove remaining old pktgen sample scripts
Since commit 0f06a6787e05 ("samples: Add an IPv6 '-6' option to the pktgen scripts") the newer pktgen_sampleXX script does show howto use IPv6 with pktgen.
Thus, there is no longer a reason to keep the older sample scripts around.
Signed-off-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| 9efc44d7 | 01-Nov-2017 |
Jesper Dangaard Brouer <[email protected]> |
samples/pktgen: update sample03, no need for clones when bursting
Like sample05, don't use pktgen clone_skb feature when using 'burst' feature, it is not really needed. This brings the burst users
samples/pktgen: update sample03, no need for clones when bursting
Like sample05, don't use pktgen clone_skb feature when using 'burst' feature, it is not really needed. This brings the burst users in sync.
Signed-off-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| 029e1ea6 | 01-Nov-2017 |
Robert Hoo <[email protected]> |
samples/pktgen: add script pktgen_sample06_numa_awared_queue_irq_affinity.sh
This script simply does:
* Detect $DEV's NUMA node belonging.
* Bind each thread (processor of NUMA locality) with each
samples/pktgen: add script pktgen_sample06_numa_awared_queue_irq_affinity.sh
This script simply does:
* Detect $DEV's NUMA node belonging.
* Bind each thread (processor of NUMA locality) with each $DEV queue's irq affinity, 1:1 mapping.
* How many '-t' threads input determines how many queues will be utilized.
If '-f' designates first cpu id, then offset in the NUMA node's cpu list.
(Changes by Jesper: allow changing count from cmdline via '-n')
Signed-off-by: Robert Hoo <[email protected]> Signed-off-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|