hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/samples/pktgen/parameters.sh
....@@ -8,8 +8,9 @@
88 echo "Usage: $0 [-vx] -i ethX"
99 echo " -i : (\$DEV) output interface/device (required)"
1010 echo " -s : (\$PKT_SIZE) packet size"
11
- echo " -d : (\$DEST_IP) destination IP"
11
+ echo " -d : (\$DEST_IP) destination IP. CIDR (e.g. 198.18.0.0/15) is also allowed"
1212 echo " -m : (\$DST_MAC) destination MAC-addr"
13
+ echo " -p : (\$DST_PORT) destination PORT range (e.g. 433-444) is also allowed"
1314 echo " -t : (\$THREADS) threads to start"
1415 echo " -f : (\$F_THREAD) index of first thread (zero indexed CPU number)"
1516 echo " -c : (\$SKB_CLONE) SKB clones send before alloc new SKB"
....@@ -23,7 +24,7 @@
2324
2425 ## --- Parse command line arguments / parameters ---
2526 ## echo "Commandline options:"
26
-while getopts "s:i:d:m:f:t:c:n:b:vxh6" option; do
27
+while getopts "s:i:d:m:p:f:t:c:n:b:vxh6" option; do
2728 case $option in
2829 i) # interface
2930 export DEV=$OPTARG
....@@ -41,6 +42,10 @@
4142 export DST_MAC=$OPTARG
4243 info "Destination MAC set to: DST_MAC=$DST_MAC"
4344 ;;
45
+ p) # PORT
46
+ export DST_PORT=$OPTARG
47
+ info "Destination PORT set to: DST_PORT=$DST_PORT"
48
+ ;;
4449 f)
4550 export F_THREAD=$OPTARG
4651 info "Index of first thread (zero indexed CPU number): $F_THREAD"