Commit e93f9541 authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

experiments: add support for FEMU

parent a614e4a7
...@@ -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']
......
...@@ -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 = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment