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
e93f9541
Commit
e93f9541
authored
Jan 21, 2022
by
Antoine Kaufmann
Browse files
experiments: add support for FEMU
parent
a614e4a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
experiments/simbricks/nodeconfig.py
experiments/simbricks/nodeconfig.py
+21
-0
experiments/simbricks/simulators.py
experiments/simbricks/simulators.py
+11
-0
No files found.
experiments/simbricks/nodeconfig.py
View file @
e93f9541
...
@@ -281,6 +281,27 @@ class CorundumDCTCPNode(NodeConfig):
...
@@ -281,6 +281,27 @@ class CorundumDCTCPNode(NodeConfig):
f
'ip addr add
{
self
.
ip
}
/
{
self
.
prefix
}
dev eth0'
,
f
'ip addr add
{
self
.
ip
}
/
{
self
.
prefix
}
dev eth0'
,
]
]
class
LinuxFEMUNode
(
NodeConfig
):
def
__init__
(
self
):
self
.
drivers
=
[
'nvme'
]
def
prepare_post_cp
(
self
):
l
=
[
'lspci -vvvv'
]
for
d
in
self
.
drivers
:
if
d
[
0
]
==
'/'
:
l
.
append
(
'insmod '
+
d
)
else
:
l
.
append
(
'modprobe '
+
d
)
return
super
().
prepare_post_cp
()
+
l
class
NVMEFsTest
(
AppConfig
):
def
run_cmds
(
self
,
node
):
return
[
'mount -t proc proc /proc'
,
'mkfs.ext3 /dev/nvme0n1'
,
'mount /dev/nvme0n1 /mnt'
,
'dd if=/dev/urandom of=/mnt/foo bs=1024 count=1024'
]
class
DctcpServer
(
AppConfig
):
class
DctcpServer
(
AppConfig
):
def
run_cmds
(
self
,
node
):
def
run_cmds
(
self
,
node
):
return
[
'iperf -s -w 1M -Z dctcp'
]
return
[
'iperf -s -w 1M -Z dctcp'
]
...
...
experiments/simbricks/simulators.py
View file @
e93f9541
...
@@ -517,6 +517,17 @@ class NS3SequencerNet(NetSim):
...
@@ -517,6 +517,17 @@ class NS3SequencerNet(NetSim):
return
cmd
return
cmd
class
FEMUDev
(
PCIDevSim
):
def
__init__
(
self
):
super
().
__init__
()
def
run_cmd
(
self
,
env
):
cmd
=
'%s%s %s %s'
%
\
(
env
.
repodir
,
'/sims/external/femu/femu-simbricks'
,
env
.
dev_pci_path
(
self
),
env
.
dev_shm_path
(
self
))
return
cmd
def
create_basic_hosts
(
e
,
num
,
name_prefix
,
net
,
nic_class
,
host_class
,
def
create_basic_hosts
(
e
,
num
,
name_prefix
,
net
,
nic_class
,
host_class
,
nc_class
,
app_class
,
ip_start
=
1
,
ip_prefix
=
24
):
nc_class
,
app_class
,
ip_start
=
1
,
ip_prefix
=
24
):
hosts
=
[]
hosts
=
[]
...
...
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