Commit 4fe914dd authored by Jialin Li's avatar Jialin Li
Browse files

working tofino docker image and run script

parent 3d5ae610
#!/bin/bash
SB_BASE="$(readlink -f $(dirname ${BASH_SOURCE[0]})/../..)"
start_tofino () {
$SDE/run_tofino_model.sh -p nopaxos --log-dir /tmp --json-logs-enable -q &
sleep 5
$SDE/run_switchd.sh -p nopaxos &
sleep 20
$SDE/run_bfshell.sh -b /simbricks/sims/net/tofino/p4/nopaxos_setup.py
}
cleanup () {
killall -9 tofino-model
killall -9 run_tofino_model.sh
killall -9 bf_switchd
killall -9 run_switchd.sh
rm -f /tmp/model.ldjson
}
run_experiment () {
start_tofino
python3 run.py pyexps/ae/nopaxos.py --filter nopaxos-qt-ib-tofino-$1 --force --verbose
cleanup
}
# Run nopaxos with Tofino sequencer in Figure 10
for i in 1 2 3 4 5 6 8 10
do
run_experiment $i
done
# Parse nopaxos result
python3 pyexps/ae/data_nopaxos.py out/ > ae/nopaxos.data
......@@ -27,7 +27,7 @@ if len(sys.argv) != 2:
print('Usage: data_nopaxos.py OUTDIR')
sys.exit(1)
types_of_network = ['swseq', 'ehseq']
types_of_network = ['swseq', 'ehseq', 'tofino']
num_clients = [1, 2, 3, 4, 5, 6, 8, 10]
basedir = sys.argv[1]
......
......@@ -124,7 +124,7 @@ class l2_switch():
self.l2_age_ttl = default_ttl
def setup(self):
self.clear_all()
#self.clear_all()
self.__init__()
# Enable learning on SMAC
......@@ -138,8 +138,11 @@ class l2_switch():
# Enable aging on SMAC
print("Inializing Aging on SMAC ... ", end='', flush=True)
try:
self.p4.Ingress.smac.idle_table_set_notify(enable=False,
callback=None)
except:
pass
#self.p4.Ingress.smac.idle_table_set_notify(enable=True,
# callback=self.aging_cb,
......
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