"vscode:/vscode.git/clone" did not exist on "7194a5cc2463364d8cdb46b9e93a185e502a51b2"
Commit f7d76917 authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

experiments: add ns3 bridge experiment

parent 98ae1d1c
......@@ -12,6 +12,7 @@ EXPERIMENTS := \
qemu-corundum-verilator-pair \
gem5-kvm-corundum-bm-pair \
gem5-timing-corundum-verilator-pair \
qemu-ns3-bridge-pair \
BUILDDIR := build
OUTDIR := out
......
......@@ -22,6 +22,11 @@ if [ ! -d "$GEM5_BASE" ] ; then
"(local-config.sh)"
exit 1
fi
if [ ! -d "$NS3_BASE" ] ; then
echo "\$NS3_BASE should be set to the absolute path to a built ns3 repo"\
"(local-config.sh)"
exit 1
fi
QEMU_IMAGE=$EHSIM_BASE/images/output-ubuntu1804/ubuntu1804
QEMU_KERNEL=$EHSIM_BASE/images/bzImage
......@@ -125,6 +130,22 @@ run_wire() {
return $pid
}
# Args:
# - Instance name
# - Port names
run_ns3_bridge() {
ports=""
for p in $2; do
epath="`readlink -f $OUTDIR/eth.$p`"
ports="$ports --CosimPort=$epath"
done
$NS3_BASE/cosim-run.sh cosim-bridge-example \
$ports &>$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-bridge-pair
run_corundum_bm a
run_corundum_bm b
sleep 0.5
run_ns3_bridge 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