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
50ba6ab0
Commit
50ba6ab0
authored
Nov 18, 2020
by
Jialin Li
Browse files
experiments: add all host,nic,net configurations in netperf
parent
62de4d8f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
19 deletions
+57
-19
experiments/pyexps/netperf.py
experiments/pyexps/netperf.py
+57
-0
experiments/pyexps/qemu_netperf.py
experiments/pyexps/qemu_netperf.py
+0
-19
No files found.
experiments/pyexps/netperf.py
0 → 100644
View file @
50ba6ab0
import
modes.experiments
as
exp
import
modes.simulators
as
sim
import
modes.nodeconfig
as
node
host_types
=
[
'qemu'
,
'gem5'
]
nic_types
=
[
'i40e'
,
'cd_bm'
,
'cd_verilator'
]
net_types
=
[
'switch'
,
'ns3'
]
experiments
=
[]
for
host_type
in
host_types
:
for
nic_type
in
nic_types
:
for
net_type
in
net_types
:
e
=
exp
.
Experiment
(
'netperf-'
+
host_type
+
'-'
+
net_type
+
'-'
+
nic_type
)
# network
if
net_type
==
'switch'
:
net
=
sim
.
SwitchNet
()
elif
net_type
==
'ns3'
:
net
=
sim
.
NS3BridgeNet
()
else
:
raise
NameError
(
net_type
)
e
.
add_network
(
net
)
# host
if
host_type
==
'qemu'
:
host_class
=
sim
.
QemuHost
elif
host_type
==
'gem5'
:
host_class
=
sim
.
Gem5Host
else
:
raise
NameError
(
host_type
)
# nic
if
nic_type
==
'i40e'
:
nic_class
=
sim
.
I40eNIC
nc_class
=
node
.
I40eLinuxNode
elif
nic_type
==
'cd_bm'
:
nic_class
=
sim
.
CorundumBMNIC
nc_class
=
node
.
CorundumLinuxNode
elif
nic_type
==
'cd_verilator'
:
nic_class
=
sim
.
CorundumVerilatorNIC
nc_class
=
node
.
CorundumLinuxNode
else
:
raise
NameError
(
nic_type
)
# create servers and clients
servers
=
sim
.
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NetperfServer
)
clients
=
sim
.
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NetperfClient
,
ip_start
=
2
)
for
c
in
clients
:
c
.
wait
=
True
c
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
# add to experiments
experiments
.
append
(
e
)
experiments/pyexps/qemu_netperf.py
deleted
100644 → 0
View file @
62de4d8f
import
modes.experiments
as
exp
import
modes.simulators
as
sim
import
modes.nodeconfig
as
node
e
=
exp
.
Experiment
(
'qemu-netperf'
)
net
=
sim
.
SwitchNet
()
e
.
add_network
(
net
)
servers
=
sim
.
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
sim
.
I40eNIC
,
sim
.
QemuHost
,
node
.
I40eLinuxNode
,
node
.
NetperfServer
)
clients
=
sim
.
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
sim
.
I40eNIC
,
sim
.
QemuHost
,
node
.
I40eLinuxNode
,
node
.
NetperfClient
,
ip_start
=
2
)
for
c
in
clients
:
c
.
wait
=
True
c
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
experiments
=
[
e
]
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