diff options
author | Igor Russkikh <irusskikh@marvell.com> | 2021-03-11 11:32:53 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-14 22:22:38 +0100 |
commit | c8fd4852022ca8ae85ac4d30d05950eaf506b828 (patch) | |
tree | c4d1df8db17eb0e871e1f0f45aba5abdab793a39 /samples/pktgen/functions.sh | |
parent | samples: pktgen: allow to specify delay parameter via new opt (diff) | |
download | linux-c8fd4852022ca8ae85ac4d30d05950eaf506b828.tar.xz linux-c8fd4852022ca8ae85ac4d30d05950eaf506b828.zip |
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 <irusskikh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/pktgen/functions.sh')
-rw-r--r-- | samples/pktgen/functions.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/samples/pktgen/functions.sh b/samples/pktgen/functions.sh index dae06d5b38fa..a335393157eb 100644 --- a/samples/pktgen/functions.sh +++ b/samples/pktgen/functions.sh @@ -108,7 +108,12 @@ function pgset() { fi } -[[ $EUID -eq 0 ]] && trap 'pg_ctrl "reset"' EXIT +if [[ -z "$APPEND" ]]; then + if [[ $EUID -eq 0 ]]; then + # Cleanup pktgen setup on exit if thats not "append mode" + trap 'pg_ctrl "reset"' EXIT + fi +fi ## -- General shell tricks -- |