Commit c9d58b9a authored by Jialin Li's avatar Jialin Li
Browse files

experiments: update scripts for the new Tofino adapter

parent c398b350
......@@ -52,6 +52,7 @@ for proto_config in proto_configs:
# host
if host_config == 'qemu':
host_class = sim.QemuHost
net.sync = False
elif host_config == 'gt':
host_class = sim.Gem5Host
e.checkpoint = True
......
......@@ -396,7 +396,7 @@ class VRClient(AppConfig):
def run_cmds(self, node):
cmds = []
for ip in self.server_ips:
cmds.append('ping -c 1 ' + ip)
cmds.append('ping -c 5 ' + ip)
cmds.append('/root/nopaxos/bench/client -c /root/nopaxos.config ' +
'-m vr -u 2 -h ' + node.ip)
return cmds
......@@ -415,7 +415,7 @@ class NOPaxosClient(AppConfig):
def run_cmds(self, node):
cmds = []
for ip in self.server_ips:
cmds.append('ping -c 1 ' + ip)
cmds.append('ping -c 5 ' + ip)
cmd = '/root/nopaxos/bench/client -c /root/nopaxos.config ' + \
'-m nopaxos -u 2 -h ' + node.ip
if self.use_ehseq:
......
......@@ -271,9 +271,13 @@ class SwitchNet(NetSim):
return cmd
class TofinoNet(NetSim):
tofino_log_path = '/tmp/model.ldjson'
sync = True
def run_cmd(self, env):
cmd = env.repodir + '/sims/tofino/tofino'
cmd += f' -m {self.sync_mode} -S {self.sync_period} -E {self.eth_latency}'
cmd += f' -m {self.sync_mode} -S {self.sync_period} -E {self.eth_latency} -t {self.tofino_log_path}'
if not self.sync:
cmd += ' -u'
for n in self.nics:
cmd += ' -s ' + env.nic_eth_path(n)
return cmd
......
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