Commit 892346ff authored by Hejing Li's avatar Hejing Li
Browse files

e2e_bg_homa: runs, ns3 not synchronized

parent ceaab2d3
......@@ -42,14 +42,8 @@ options = {
'ns3::Ipv4GlobalRouting::RandomEcmpRouting': '1',
}
topology = DCFatTree(
n_spine_sw=1,
n_agg_bl=4,
n_agg_sw=1,
n_agg_racks=4,
h_per_rack=10,
)
experiments = []
for h in types_of_host:
for p in types_of_protocol:
......@@ -69,13 +63,25 @@ for h in types_of_host:
e.checkpoint = True
else:
raise NameError(h)
topology = DCFatTree(
n_spine_sw=1,
n_agg_bl=1,
n_agg_sw=1,
n_agg_racks=1,
h_per_rack=2,
)
add_homa_bg(topology, app_proto='homa')
add_homa_bg(topology, app_proto=p)
net = sim.NS3E2ENet()
net.opt = ' '.join([f'--{o[0]}={o[1]}' for o in options.items()])
net.e2e_global.stop_time = "60s"
net.add_component(topology)
if h == 'qemu':
net.sync = False
else:
net.sync = True
# net.wait = True
e.add_network(net)
......@@ -118,4 +124,4 @@ for h in types_of_host:
net.init_network()
experiments = [e]
experiments.append(e)
......@@ -348,13 +348,21 @@ def add_homa_bg(topo, subnet='10.0.0.0/16', **kwargs):
s_host.queue_size = params['link_queue_size']
if (params['app_proto'] == 'tcp'):
s_app = e2e.E2EMsgGenApplicationTCP('msggen')
s_app.stop_time = params['app_stop_time']
s_app.remotes = remotes
s_host.add_component(s_app)
s_probe = e2e.E2EPeriodicSampleProbe('probe', 'Rx')
s_probe.interval = '1s'
s_probe.file = f'sink-rx-{i}'
s_app.add_component(s_probe)
elif(params['app_proto'] == 'homa'):
s_app = e2e.E2EMsgGenApplication('msggen')
s_app.stop_time = params['app_stop_time']
s_app.remotes = remotes
s_host.add_component(s_app)
s_probe = e2e.E2EPeriodicSampleProbe('probe', 'Rx')
s_probe.interval = '1s'
s_probe.file = f'sink-rx-{i}'
s_app.add_component(s_probe)
s_app.stop_time = params['app_stop_time']
s_app.remotes = remotes
s_host.add_component(s_app)
s_probe = e2e.E2EPeriodicSampleProbe('probe', 'Rx')
s_probe.interval = '1s'
s_probe.file = f'sink-rx-{i}'
s_app.add_component(s_probe)
topo.add_host_r(s_host)
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