From c8fd4852022ca8ae85ac4d30d05950eaf506b828 Mon Sep 17 00:00:00 2001 From: Igor Russkikh Date: Thu, 11 Mar 2021 11:32:53 +0100 Subject: 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 Signed-off-by: David S. Miller --- samples/pktgen/parameters.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'samples/pktgen/parameters.sh') diff --git a/samples/pktgen/parameters.sh b/samples/pktgen/parameters.sh index dd6ef1d2e498..b4c1b371e4b8 100644 --- a/samples/pktgen/parameters.sh +++ b/samples/pktgen/parameters.sh @@ -20,12 +20,13 @@ function usage() { echo " -x : (\$DEBUG) debug" echo " -6 : (\$IP6) IPv6" echo " -w : (\$DELAY) Tx Delay value (ns)" + echo " -a : (\$APPEND) Script will not reset generator's state, but will append its config" echo "" } ## --- Parse command line arguments / parameters --- ## echo "Commandline options:" -while getopts "s:i:d:m:p:f:t:c:n:b:w:vxh6" option; do +while getopts "s:i:d:m:p:f:t:c:n:b:w:vxh6a" option; do case $option in i) # interface export DEV=$OPTARG @@ -83,6 +84,10 @@ while getopts "s:i:d:m:p:f:t:c:n:b:w:vxh6" option; do export IP6=6 info "IP6: IP6=$IP6" ;; + a) + export APPEND=yes + info "Append mode: APPEND=$APPEND" + ;; h|?|*) usage; err 2 "[ERROR] Unknown parameters!!!" -- cgit v1.2.3