Commit fb78d91c authored by Marvin Meiers's avatar Marvin Meiers Committed by Antoine Kaufmann
Browse files

update ns-3 to version 3.38

Update to newer ns-3 version and adapt code for changes (mostly
renamed files and command line parameters) in the ns-3 submodule.
parent f260bf16
...@@ -8,6 +8,7 @@ RUN apt-get update \ ...@@ -8,6 +8,7 @@ RUN apt-get update \
bc \ bc \
bison \ bison \
build-essential \ build-essential \
cmake \
doxygen \ doxygen \
g++ \ g++ \
flex \ flex \
......
...@@ -3,11 +3,11 @@ set -e ...@@ -3,11 +3,11 @@ set -e
mkdir -p sims/external/ns-3-new/ mkdir -p sims/external/ns-3-new/
cd sims/external/ns-3 cd sims/external/ns-3
find build -name '*.o' -delete
cp -r \ cp -r \
build/ \ build/ \
cosim-run.sh \ simbricks-run.sh \
cosim-dctcp-run.sh \ ns3 \
.lock-ns3* \
../ns-3-new/ ../ns-3-new/
cd .. cd ..
git submodule deinit -f ns-3 git submodule deinit -f ns-3
......
...@@ -16,7 +16,7 @@ mkdir -p $RUN_DIR ...@@ -16,7 +16,7 @@ mkdir -p $RUN_DIR
# Runs the SENDER host first # Runs the SENDER host first
echo "run sender host" echo "run sender host"
build/src/cosim/examples/ns3-dev-cosim-nicif-example-debug --verbose --uxsoc=$RUN_DIR/uxsoc --shm=$RUN_DIR/shm --syncDelay=500000 --pollDelay=500000 --ethLatency=500000 --sync=1 --sync_mode=0 > $RUN_DIR/sender.out 2>&1 & ./simbricks-run.sh simbricks-nicif-example --verbose --uxsoc=$RUN_DIR/uxsoc --shm=$RUN_DIR/shm --syncDelay=500000 --pollDelay=500000 --ethLatency=500000 --sync=1 --sync_mode=0 > $RUN_DIR/sender.out 2>&1 &
pid=$! pid=$!
ALL_PIDS="$ALL_PIDS $pid" ALL_PIDS="$ALL_PIDS $pid"
...@@ -25,7 +25,7 @@ sleep 1 ...@@ -25,7 +25,7 @@ sleep 1
# Runs the RECEIVER host # Runs the RECEIVER host
echo "run receiver host" echo "run receiver host"
build/src/cosim/examples/ns3-dev-cosim-netif-example-debug --verbose --uxsoc=$RUN_DIR/uxsoc --syncDelay=500000 --pollDelay=500000 --ethLatency=500000 --sync=1 > $RUN_DIR/receiver.out 2>&1 & ./simbricks-run.sh simbricks-netif-example --verbose --uxsoc=$RUN_DIR/uxsoc --syncDelay=500000 --pollDelay=500000 --ethLatency=500000 --sync=1 > $RUN_DIR/receiver.out 2>&1 &
# #
# #
...@@ -54,7 +54,7 @@ sleep 2 ...@@ -54,7 +54,7 @@ sleep 2
### Run single instance ns-3 ### Run single instance ns-3
echo "Run single instance ns-3" echo "Run single instance ns-3"
build/src/network/examples/ns3-dev-packet-socket-apps-debug --verbose > $RUN_DIR/single_ns3.out 2>&1 ./simbricks-run.sh packet-socket-apps --verbose > $RUN_DIR/single_ns3.out 2>&1
echo "parsing data" echo "parsing data"
cat $RUN_DIR/sender.out | awk '/Time:/ {print "Tx at: "$11}' > $RUN_DIR/sender.time cat $RUN_DIR/sender.out | awk '/Time:/ {print "Tx at: "$11}' > $RUN_DIR/sender.time
......
...@@ -82,7 +82,7 @@ do ...@@ -82,7 +82,7 @@ do
for k in $(seq $k_start $k_step $k_end) for k in $(seq $k_start $k_step $k_end)
do do
echo "latency: $lat MtU: $m K: $k " echo "latency: $lat MtU: $m K: $k "
./cosim-dctcp-run.sh $k $m $lat & ./simbricks-run.sh dctcp-cwnd-devred --EcnTh=$k --mtu=$m --LinkLatency=$lat &
pid=$! pid=$!
pids="$pids $pid" pids="$pids $pid"
proc=$(($proc + 1)) proc=$(($proc + 1))
......
...@@ -84,7 +84,7 @@ do ...@@ -84,7 +84,7 @@ do
for k in $(seq $k_start $k_step $k_end) for k in $(seq $k_start $k_step $k_end)
do do
echo "latency: $lat MtU: $m K: $k " echo "latency: $lat MtU: $m K: $k "
./cosim-dctcp-run.sh $k $m $lat & ./simbricks-run.sh dctcp-cwnd-devred --EcnTh=$k --mtu=$m --LinkLatency=$lat &
pid=$! pid=$!
pids="$pids $pid" pids="$pids $pid"
proc=$(($proc + 1)) proc=$(($proc + 1))
......
...@@ -892,13 +892,13 @@ class NS3DumbbellNet(NetSim): ...@@ -892,13 +892,13 @@ class NS3DumbbellNet(NetSim):
ports = '' ports = ''
for (n, s) in self.connect_sockets(env): for (n, s) in self.connect_sockets(env):
if 'server' in n.name: if 'server' in n.name:
ports += f'--CosimPortLeft={s} ' ports += f'--SimbricksPortLeft={s} '
else: else:
ports += f'--CosimPortRight={s} ' ports += f'--SimbricksPortRight={s} '
cmd = ( cmd = (
f'{env.repodir}/sims/external/ns-3' f'{env.repodir}/sims/external/ns-3'
f'/cosim-run.sh cosim cosim-dumbbell-example {ports} {self.opt}' f'/simbricks-run.sh simbricks-dumbbell-example {ports} {self.opt}'
) )
print(cmd) print(cmd)
...@@ -910,11 +910,11 @@ class NS3BridgeNet(NetSim): ...@@ -910,11 +910,11 @@ class NS3BridgeNet(NetSim):
def run_cmd(self, env: ExpEnv) -> str: def run_cmd(self, env: ExpEnv) -> str:
ports = '' ports = ''
for (_, n) in self.connect_sockets(env): for (_, n) in self.connect_sockets(env):
ports += '--CosimPort=' + n + ' ' ports += '--SimbricksPort=' + n + ' '
cmd = ( cmd = (
f'{env.repodir}/sims/external/ns-3' f'{env.repodir}/sims/external/ns-3'
f'/cosim-run.sh cosim cosim-bridge-example {ports} {self.opt}' f'/simbricks-run.sh simbricks-bridge-example {ports} {self.opt}'
) )
print(cmd) print(cmd)
...@@ -936,7 +936,7 @@ class NS3SequencerNet(NetSim): ...@@ -936,7 +936,7 @@ class NS3SequencerNet(NetSim):
raise KeyError('Wrong NIC type') raise KeyError('Wrong NIC type')
cmd = ( cmd = (
f'{env.repodir}/sims/external/ns-3' f'{env.repodir}/sims/external/ns-3'
f'/cosim-run.sh sequencer sequencer-single-switch-example' f'/simbricks-run.sh sequencer-single-switch-example'
f' {ports} {self.opt}' f' {ports} {self.opt}'
) )
return cmd return cmd
......
Subproject commit 853cafc9c883fd64e7890b0710441c6bd3a25196 Subproject commit 29e4f0953b546e413cc6858e60a2e4e9d38dca00
...@@ -78,11 +78,11 @@ $(d)ns-3: ...@@ -78,11 +78,11 @@ $(d)ns-3:
git clone https://github.com/simbricks/ns-3.git $@ git clone https://github.com/simbricks/ns-3.git $@
$(d)ns-3/ready: $(d)ns-3 $(lib_netif) $(d)ns-3/ready: $(d)ns-3 $(lib_netif)
+cd $< && COSIM_PATH=$(abspath $(base_dir)) ./cosim-build.sh configure +cd $< && SIMBRICKS_PATH=$(abspath $(base_dir)) ./simbricks-build.sh configure
touch $@ touch $@
ns-3-clean: ns-3-clean:
-cd $(EXTERNAL_SIMS_DIR)ns-3 && ./waf clean -cd $(EXTERNAL_SIMS_DIR)ns-3 && ./ns3 clean
rm -f $(EXTERNAL_SIMS_DIR)ns-3/ready rm -f $(EXTERNAL_SIMS_DIR)ns-3/ready
$(d)femu: $(d)femu:
......
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