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

experiments: use helper functions in gem5 example experiment

parent 4aeb3c90
...@@ -3,40 +3,23 @@ import modes.simulators as sim ...@@ -3,40 +3,23 @@ import modes.simulators as sim
import modes.nodeconfig as node import modes.nodeconfig as node
e = exp.Experiment('gem5-i40e-pair') e = exp.Experiment('gem5-i40e-pair')
e.timeout = 5 * 60 #e.timeout = 5 * 60
e.checkpoint = True e.checkpoint = True
net = sim.SwitchNet() net = sim.SwitchNet()
e.add_network(net) e.add_network(net)
nic_a = sim.I40eNIC() servers = sim.create_basic_hosts(e, 1, 'server', net, sim.I40eNIC, sim.Gem5Host,
nic_a.set_network(net) node.I40eLinuxNode, node.IperfTCPServer)
e.add_nic(nic_a)
host_a = sim.Gem5Host() clients = sim.create_basic_hosts(e, 2, 'client', net, sim.I40eNIC, sim.Gem5Host,
host_a.cpu_type = 'X86KvmCPU' node.I40eLinuxNode, node.IperfTCPClient, ip_start = 2)
host_a.name = 'server'
host_a.node_config = node.I40eLinuxNode()
host_a.node_config.sim = 'gem5' # FIXME
host_a.node_config.ip = '10.0.0.1'
host_a.node_config.app = node.IperfTCPServer()
host_a.add_nic(nic_a)
e.add_host(host_a)
for i in range (0, 1): for h in servers + clients:
nic_b = sim.I40eNIC() h.cpu_type = 'TimingSimpleCPU'
nic_b.set_network(net) h.cpu_type_cp = 'TimingSimpleCPU'
e.add_nic(nic_b)
host_b = sim.Gem5Host() for c in clients:
host_b.cpu_type = 'X86KvmCPU' c.wait = True
host_b.name = 'client.%d' % i c.node_config.app.server_ip = servers[0].node_config.ip
host_b.wait = True
host_b.node_config = node.I40eLinuxNode()
host_b.node_config.sim = 'gem5' # FIXME
host_b.node_config.ip = '10.0.0.%d' % (2 + i)
host_b.node_config.app = node.IperfTCPClient()
host_b.add_nic(nic_b)
e.add_host(host_b)
experiments = [e] experiments = [e]
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