Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "passthru" CLI argument #65

Merged
merged 1 commit into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions multiplex.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
"args": [ "ifname" ],
"vals": "^.+$"
},
"passthru": {
"description": "comma separated list",
"args": [ "passthru" ],
"vals": "^.+$"
},
"cpu-pinning": {
"description": "valid cpu pinning modes",
"args": [ "cpu-pin" ],
Expand Down
15 changes: 14 additions & 1 deletion uperf-client
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test_type="stream"
uopts=""
cpu_pin=""

longopts="test-type:,protocol:,rsize:,wsize:,nthreads:,remotehost:,duration:,cpu-pin:,think:"
longopts="test-type:,protocol:,rsize:,wsize:,nthreads:,remotehost:,duration:,cpu-pin:,think:,passthru:"
opts=$(getopt -q -o "" --longoptions "$longopts" -n "getopt.sh" -- "$@");
if [ $? -ne 0 ]; then
exit_error "Unrecognized option specified"
Expand Down Expand Up @@ -87,6 +87,12 @@ while true; do
echo "duration=$duration"
shift
;;
--passthru) # uperf options that user wants passthru
shift;
pt_opts=$1
echo "pt_opts=$pt_opts"
shift
;;
--)
shift;
break
Expand Down Expand Up @@ -209,6 +215,13 @@ case "${cpu_pin}" in
esac

cmd+="${cpu_pin_cmd} uperf -R -m test.xml -P $control_port $uopts"

# strip ',' from the passthru options
passthru_opts=$(echo "$pt_opts" | sed 's/,/ /g')
options+=" $passthru_opts"
echo "passthu options: $options"
cmd+="$options"

echo "going to run: ${cmd}"
nthreads=$nthreads \
protocol=$protocol \
Expand Down
16 changes: 15 additions & 1 deletion uperf-server-start
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ data_port=""
ifname=""
cpu_pin=""

longopts="ifname:,cpu-pin:"
longopts="ifname:,cpu-pin:,passthru:"
opts=$(getopt -q -o "" --longoptions "$longopts" -n "getopt.sh" -- "$@");
if [ $? -ne 0 ]; then
exit_error "Unrecognized option specified"
Expand All @@ -38,6 +38,12 @@ while true; do
shift;
shift;
;;
--passthru) # uperf options that user wants passthru
shift;
pt_opts=$1
echo "pt_opts=$pt_opts"
shift
;;
--)
shift;
break
Expand Down Expand Up @@ -166,6 +172,14 @@ case "${cpu_pin}" in
esac

cmd="${cpu_pin_cmd} uperf -s -P $control_port"

# strip ',' from the passthru options
passthru_opts=$(echo "$pt_opts" | sed 's/,/ /g')
options+=" $passthru_opts"
echo "passthu optins run: $options"

cmd+="$options"

echo "going to run: $cmd"
export MALLOC_CHECK_=2
$cmd 2>&1 >uperf-server-start.txt &
Expand Down
Loading