Commit 6d86b7a5 authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

experiments: fix qemu and net sim parameters

For qemu the syntax changed, and network simulators dropped the
alternative synchronization protocol parameter.
parent 05f77c2e
...@@ -247,20 +247,15 @@ class QemuHost(HostSim): ...@@ -247,20 +247,15 @@ class QemuHost(HostSim):
else: else:
cmd += ' -cpu host -enable-kvm ' cmd += ' -cpu host -enable-kvm '
di = 0
for dev in self.pcidevs: for dev in self.pcidevs:
cmd += f'-chardev socket,path={env.dev_pci_path(dev)},' cmd += f'-device simbricks-pci,socket={env.dev_pci_path(dev)}'
cmd += f'id=simbrickscd{di} '
cmd += f'-device simbricks-pci,chardev=simbrickscd{di}'
if self.sync: if self.sync:
cmd += ',sync=on' cmd += ',sync=on'
cmd += f',sync-mode={self.sync_mode}'
cmd += f',pci-latency={self.pci_latency}' cmd += f',pci-latency={self.pci_latency}'
cmd += f',sync-period={self.sync_period}' cmd += f',sync-period={self.sync_period}'
else: else:
cmd += ',sync=off' cmd += ',sync=off'
cmd += ' ' cmd += ' '
di += 1
return cmd return cmd
...@@ -444,7 +439,7 @@ class SwitchNet(NetSim): ...@@ -444,7 +439,7 @@ class SwitchNet(NetSim):
def run_cmd(self, env): def run_cmd(self, env):
cmd = env.repodir + '/sims/net/switch/net_switch' cmd = env.repodir + '/sims/net/switch/net_switch'
cmd += f' -m {self.sync_mode} -S {self.sync_period} -E {self.eth_latency}' cmd += f' -S {self.sync_period} -E {self.eth_latency}'
if not self.sync: if not self.sync:
cmd += ' -u' cmd += ' -u'
...@@ -475,7 +470,7 @@ class TofinoNet(NetSim): ...@@ -475,7 +470,7 @@ class TofinoNet(NetSim):
def run_cmd(self, env): def run_cmd(self, env):
cmd = env.repodir + '/sims/tofino/tofino' cmd = env.repodir + '/sims/tofino/tofino'
cmd += f' -m {self.sync_mode} -S {self.sync_period} -E {self.eth_latency} -t {self.tofino_log_path}' cmd += f' -S {self.sync_period} -E {self.eth_latency} -t {self.tofino_log_path}'
if not self.sync: if not self.sync:
cmd += ' -u' cmd += ' -u'
for (_,n) in self.connect_sockets(env): for (_,n) in self.connect_sockets(env):
......
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