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
4a14b793
Commit
4a14b793
authored
Sep 04, 2024
by
Hejing Li
Browse files
new example script checkpoint
parent
05109d2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
21 deletions
+24
-21
experiments/pyexps/netperf_sysconf.py
experiments/pyexps/netperf_sysconf.py
+24
-21
No files found.
experiments/pyexps/netperf_sysconf.py
View file @
4a14b793
import
simbricks.orchestration.experiments
as
exp
import
simbricks.
splitsim.specification
as
spec
import
simbricks.
orchestration.system
as
system
import
simbricks.
splitsim.impl
as
im
pl
import
simbricks.
orchestration.simulation
as
s
im
import
simbricks.
splitsim.runobj
as
runobj
import
simbricks.
orchestration.instantiation
as
inst
"""
"""
Netperf Example:
Netperf Example:
One Client: Host_0, One Server: Host1 connected through a switch
One Client: Host_0, One Server: Host1 connected through a switch
...
@@ -11,28 +11,30 @@ This scripts generates the experiments with all the combinations of different ex
...
@@ -11,28 +11,30 @@ This scripts generates the experiments with all the combinations of different ex
"""
"""
# host_types = ['qemu', 'gem5', 'qt']
# host_types = ['qemu', 'gem5', 'qt']
host_types
=
[
'
q
em
u
'
]
host_types
=
[
'
g
em
5
'
]
nic_types
=
[
'bm'
,
'vr'
]
nic_types
=
[
'bm'
]
net_types
=
[
'switch'
]
net_types
=
[
'switch'
]
experiments
=
[]
experiments
=
[]
sys
tem
=
s
pec
.
System
()
sys
=
s
ystem
.
System
()
# create a host instance and a NIC instance then install the NIC on the host
# create a host instance and a NIC instance then install the NIC on the host
host0
=
spec
.
LinuxHost
(
system
)
host0
=
system
.
I40ELinuxHost
(
sys
)
nic0
=
spec
.
CorundumNIC
(
system
)
pcie0
=
system
.
PCIeHostInterface
(
host0
)
host0
.
nic_driver
=
[
'/tmp/guest/mqnic.ko'
]
host0
.
add_if
(
pcie0
)
host0
.
ip
=
'10.0.0.1'
nic0
=
system
.
IntelI40eNIC
(
sys
)
pcichannel0
=
spec
.
PCI
(
system
)
nic0
.
add_ipv4
(
'10.0.0.1'
)
pcichannel0
.
install
(
host0
,
nic0
)
pcichannel0
=
system
.
PCIeChannel
(
pcie0
,
nic0
.
pci_if
)
host1
=
spec
.
LinuxHost
(
system
)
nic1
=
spec
.
CorundumNIC
(
system
)
host1
.
nic_driver
=
[
'/tmp/guest/mqnic.ko'
]
host1
.
ip
=
'10.0.0.2'
pcichannel1
=
spec
.
PCI
(
system
)
pcichannel1
.
install
(
host1
,
nic1
)
# create a host instance and a NIC instance then install the NIC on the host
host1
=
system
.
I40ELinuxHost
(
sys
)
pcie1
=
system
.
PCIeHostInterface
(
host1
)
host1
.
add_if
(
pcie0
)
nic1
=
system
.
IntelI40eNIC
(
sys
)
nic1
.
add_ipv4
(
'10.0.0.2'
)
pcichannel1
=
system
.
PCIeChannel
(
pcie1
,
nic1
.
pci_if
)
'''
port0 = spec.NetDev()
port0 = spec.NetDev()
port1 = spec.NetDev()
port1 = spec.NetDev()
switch = spec.Switch(system)
switch = spec.Switch(system)
...
@@ -110,4 +112,5 @@ for host_type in host_types:
...
@@ -110,4 +112,5 @@ for host_type in host_types:
for sim in sims:
for sim in sims:
print(sim)
print(sim)
experiments
.
append
(
e
)
experiments.append(e)
\ No newline at end of file
'''
\ No newline at end of file
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