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
ab21c0b6
Commit
ab21c0b6
authored
Sep 22, 2024
by
Hejing Li
Browse files
netperf_sysconf.py: add config disk
parent
98edd40c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
experiments/pyexps/netperf_sysconf.py
experiments/pyexps/netperf_sysconf.py
+7
-1
No files found.
experiments/pyexps/netperf_sysconf.py
View file @
ab21c0b6
...
@@ -22,6 +22,9 @@ sys = system.System()
...
@@ -22,6 +22,9 @@ sys = system.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
=
system
.
I40ELinuxHost
(
sys
)
host0
=
system
.
I40ELinuxHost
(
sys
)
pcie0
=
system
.
PCIeHostInterface
(
host0
)
pcie0
=
system
.
PCIeHostInterface
(
host0
)
cfg_disk0
=
system
.
LinuxConfigDiskImage
(
host0
)
host0
.
add_disk
(
cfg_disk0
)
host0
.
add_if
(
pcie0
)
host0
.
add_if
(
pcie0
)
nic0
=
system
.
IntelI40eNIC
(
sys
)
nic0
=
system
.
IntelI40eNIC
(
sys
)
nic0
.
add_ipv4
(
'10.0.0.1'
)
nic0
.
add_ipv4
(
'10.0.0.1'
)
...
@@ -30,6 +33,9 @@ pcichannel0 = system.PCIeChannel(pcie0, nic0._pci_if)
...
@@ -30,6 +33,9 @@ pcichannel0 = system.PCIeChannel(pcie0, nic0._pci_if)
# 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
host1
=
system
.
I40ELinuxHost
(
sys
)
host1
=
system
.
I40ELinuxHost
(
sys
)
pcie1
=
system
.
PCIeHostInterface
(
host1
)
pcie1
=
system
.
PCIeHostInterface
(
host1
)
cfg_disk1
=
system
.
LinuxConfigDiskImage
(
host1
)
host1
.
add_disk
(
cfg_disk1
)
host1
.
add_if
(
pcie0
)
host1
.
add_if
(
pcie0
)
nic1
=
system
.
IntelI40eNIC
(
sys
)
nic1
=
system
.
IntelI40eNIC
(
sys
)
nic1
.
add_ipv4
(
'10.0.0.2'
)
nic1
.
add_ipv4
(
'10.0.0.2'
)
...
@@ -48,7 +54,7 @@ ethchannel0 = system.EthChannel(switch.eth_ifs[0], nic0._eth_if)
...
@@ -48,7 +54,7 @@ ethchannel0 = system.EthChannel(switch.eth_ifs[0], nic0._eth_if)
ethchannel1
=
system
.
EthChannel
(
switch
.
eth_ifs
[
1
],
nic1
.
_eth_if
)
ethchannel1
=
system
.
EthChannel
(
switch
.
eth_ifs
[
1
],
nic1
.
_eth_if
)
# configure the software to run on the host
# configure the software to run on the host
host0
.
add_app
(
system
.
NetperfClient
(
host0
,
nic1
.
ip
))
host0
.
add_app
(
system
.
NetperfClient
(
host0
,
nic1
.
_
ip
))
host1
.
add_app
(
system
.
NetperfServer
(
host1
))
host1
.
add_app
(
system
.
NetperfServer
(
host1
))
"""
"""
...
...
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