Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
4fe914dd
Commit
4fe914dd
authored
Jun 11, 2022
by
Jialin Li
Browse files
working tofino docker image and run script
parent
3d5ae610
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
4 deletions
+40
-4
experiments/ae/nopaxos-tofino.sh
experiments/ae/nopaxos-tofino.sh
+33
-0
experiments/pyexps/ae/data_nopaxos.py
experiments/pyexps/ae/data_nopaxos.py
+1
-1
sims/net/tofino/p4/nopaxos_setup.py
sims/net/tofino/p4/nopaxos_setup.py
+6
-3
No files found.
experiments/ae/nopaxos-tofino.sh
0 → 100755
View file @
4fe914dd
#!/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
experiments/pyexps/ae/data_nopaxos.py
View file @
4fe914dd
...
...
@@ -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
]
...
...
sims/net/tofino/p4/nopaxos_setup.py
View file @
4fe914dd
...
...
@@ -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
)
self
.
p4
.
Ingress
.
smac
.
idle_table_set_notify
(
enable
=
False
,
callback
=
None
)
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,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment