"include/vscode:/vscode.git/clone" did not exist on "dba65b1c71197d63688c75fb0290142b7a0f30e4"
Commit 242cae8e authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

experiments: add qemu-ns3-dumbbell-pair

parent f7d76917
......@@ -13,6 +13,7 @@ EXPERIMENTS := \
gem5-kvm-corundum-bm-pair \
gem5-timing-corundum-verilator-pair \
qemu-ns3-bridge-pair \
qemu-ns3-dumbbell-pair \
BUILDDIR := build
OUTDIR := out
......
......@@ -146,6 +146,29 @@ run_ns3_bridge() {
return $pid
}
# Args:
# - Instance name
# - Left Port names
# - Right Port names
# - Other args
run_ns3_dumbbell() {
ports=""
for p in $2; do
epath="`readlink -f $OUTDIR/eth.$p`"
ports="$ports --CosimPortLeft=$epath"
done
for p in $3; do
epath="`readlink -f $OUTDIR/eth.$p`"
ports="$ports --CosimPortRight=$epath"
done
$NS3_BASE/cosim-run.sh cosim-dumbbell-example \
$ports $4 &>$OUTDIR/ns3_bridge.$1.log &
pid=$!
ALL_PIDS="$ALL_PIDS $pid"
return $pid
}
cleanup() {
echo Cleaning up
for p in $ALL_PIDS ; do
......
#!/bin/bash
source common-functions.sh
init_out qemu-ns3-dumbbell-pair
run_corundum_bm a
run_corundum_bm b
sleep 0.5
run_ns3_dumbbell ab "a" "b"
run_qemu a a build/qemu-pair-server.tar
run_qemu b b build/qemu-pair-client.tar
client_pid=$!
wait $client_pid
cleanup
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment