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
88b1fa4c
Commit
88b1fa4c
authored
Jul 14, 2024
by
Jialin Li
Browse files
bmv2: move p4 path to a BMV2Net parameter
parent
d7d3abd8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
experiments/simbricks/orchestration/simulators.py
experiments/simbricks/orchestration/simulators.py
+2
-1
No files found.
experiments/simbricks/orchestration/simulators.py
View file @
88b1fa4c
...
@@ -915,6 +915,7 @@ class BMV2Net(NetSim):
...
@@ -915,6 +915,7 @@ class BMV2Net(NetSim):
def
__init__
(
self
):
def
__init__
(
self
):
super
().
__init__
()
super
().
__init__
()
self
.
sync
=
False
self
.
sync
=
False
self
.
p4_path
=
'sims/net/p4/basic.json'
def
run_cmd
(
self
,
env
):
def
run_cmd
(
self
,
env
):
cmd
=
(
cmd
=
(
...
@@ -932,7 +933,7 @@ class BMV2Net(NetSim):
...
@@ -932,7 +933,7 @@ class BMV2Net(NetSim):
for
_
,
n
in
self
.
connect_sockets
(
env
):
for
_
,
n
in
self
.
connect_sockets
(
env
):
cmd
+=
f
' -i
{
port
}
@
{
n
}
'
cmd
+=
f
' -i
{
port
}
@
{
n
}
'
port
+=
1
port
+=
1
cmd
+=
' '
+
env
.
repodir
+
'/sims/net/p4/basic.json
'
cmd
+=
f
'
{
env
.
repodir
}
/
{
self
.
p4_path
}
'
print
(
cmd
)
print
(
cmd
)
...
...
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