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
f216d1ab
Commit
f216d1ab
authored
Aug 06, 2021
by
Antoine Kaufmann
Browse files
experiments: add support for disabling sync in switch
parent
50ed11f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
experiments/pyexps/dist_netperf.py
experiments/pyexps/dist_netperf.py
+1
-0
experiments/simbricks/simulators.py
experiments/simbricks/simulators.py
+6
-0
No files found.
experiments/pyexps/dist_netperf.py
View file @
f216d1ab
...
@@ -41,6 +41,7 @@ for host_type in host_types:
...
@@ -41,6 +41,7 @@ for host_type in host_types:
# host
# host
if
host_type
==
'qemu'
:
if
host_type
==
'qemu'
:
host_class
=
sim
.
QemuHost
host_class
=
sim
.
QemuHost
net
.
sync
=
False
elif
host_type
==
'qt'
:
elif
host_type
==
'qt'
:
def
qemu_timing
():
def
qemu_timing
():
h
=
sim
.
QemuHost
()
h
=
sim
.
QemuHost
()
...
...
experiments/simbricks/simulators.py
View file @
f216d1ab
...
@@ -255,9 +255,15 @@ class WireNet(NetSim):
...
@@ -255,9 +255,15 @@ class WireNet(NetSim):
return
cmd
return
cmd
class
SwitchNet
(
NetSim
):
class
SwitchNet
(
NetSim
):
sync
=
True
def
run_cmd
(
self
,
env
):
def
run_cmd
(
self
,
env
):
cmd
=
env
.
repodir
+
'/sims/net/switch/net_switch'
cmd
=
env
.
repodir
+
'/sims/net/switch/net_switch'
cmd
+=
f
' -m
{
self
.
sync_mode
}
-S
{
self
.
sync_period
}
-E
{
self
.
eth_latency
}
'
cmd
+=
f
' -m
{
self
.
sync_mode
}
-S
{
self
.
sync_period
}
-E
{
self
.
eth_latency
}
'
if
not
self
.
sync
:
cmd
+=
' -u'
if
len
(
env
.
pcap_file
)
>
0
:
if
len
(
env
.
pcap_file
)
>
0
:
cmd
+=
' -p '
+
env
.
pcap_file
cmd
+=
' -p '
+
env
.
pcap_file
for
n
in
self
.
nics
:
for
n
in
self
.
nics
:
...
...
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