Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
e7521bb1
Commit
e7521bb1
authored
Feb 01, 2024
by
Hejing Li
Browse files
homa ns3 msggen app use tcp
parent
031efdeb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
7 deletions
+34
-7
experiments/pyexps/e2e_bg_homa.py
experiments/pyexps/e2e_bg_homa.py
+1
-1
experiments/simbricks/orchestration/e2e_components.py
experiments/simbricks/orchestration/e2e_components.py
+27
-0
experiments/simbricks/orchestration/e2e_topologies.py
experiments/simbricks/orchestration/e2e_topologies.py
+5
-5
sims/external/ns-3
sims/external/ns-3
+1
-1
No files found.
experiments/pyexps/e2e_bg_homa.py
View file @
e7521bb1
...
@@ -54,7 +54,7 @@ net = sim.NS3E2ENet()
...
@@ -54,7 +54,7 @@ net = sim.NS3E2ENet()
net
.
opt
=
' '
.
join
([
f
'--
{
o
[
0
]
}
=
{
o
[
1
]
}
'
for
o
in
options
.
items
()])
net
.
opt
=
' '
.
join
([
f
'--
{
o
[
0
]
}
=
{
o
[
1
]
}
'
for
o
in
options
.
items
()])
net
.
add_component
(
topology
)
net
.
add_component
(
topology
)
net
.
wait
=
True
net
.
wait
=
True
net
.
init_network
()
e
.
add_network
(
net
)
e
.
add_network
(
net
)
net
.
init_network
()
experiments
=
[
e
]
experiments
=
[
e
]
experiments/simbricks/orchestration/e2e_components.py
View file @
e7521bb1
...
@@ -385,6 +385,33 @@ class E2EMsgGenApplication(E2EApplication):
...
@@ -385,6 +385,33 @@ class E2EMsgGenApplication(E2EApplication):
})
})
return
super
().
ns3_config
()
return
super
().
ns3_config
()
class
E2EMsgGenApplicationTCP
(
E2EApplication
):
def
__init__
(
self
,
idd
:
str
)
->
None
:
super
().
__init__
(
idd
)
self
.
type
=
"MsgGeneratorTCP"
self
.
port
=
3000
self
.
remotes
=
[]
self
.
cdf
=
{
0.5
:
1
,
1.0
:
2
}
self
.
max_msg
=
0
self
.
load
=
0.5
self
.
avg_msg_size_pkts
=
1.0
def
ns3_config
(
self
)
->
str
:
els
=
[
f
'{{
{
p
}
,
{
i
}
}}'
for
p
,
i
in
self
.
cdf
.
items
()]
cdf
=
'+'
.
join
(
els
)
print
(
cdf
)
self
.
mapping
.
update
({
"Port"
:
self
.
port
,
"RemoteClients"
:
','
.
join
(
self
.
remotes
),
"MsgSizeCDF"
:
cdf
,
"MaxMsg"
:
self
.
max_msg
,
"Load"
:
self
.
load
,
"AvgMsgSizePkts"
:
self
.
avg_msg_size_pkts
,
})
return
super
().
ns3_config
()
class
E2EProbe
(
E2EComponent
):
class
E2EProbe
(
E2EComponent
):
...
...
experiments/simbricks/orchestration/e2e_topologies.py
View file @
e7521bb1
...
@@ -346,12 +346,12 @@ def add_homa_bg(topo, subnet='10.42.0.0/16', **kwargs):
...
@@ -346,12 +346,12 @@ def add_homa_bg(topo, subnet='10.42.0.0/16', **kwargs):
s_host
.
data_rate
=
params
[
'link_rate'
]
s_host
.
data_rate
=
params
[
'link_rate'
]
s_host
.
ip
=
ip
+
prefix
s_host
.
ip
=
ip
+
prefix
s_host
.
queue_size
=
params
[
'link_queue_size'
]
s_host
.
queue_size
=
params
[
'link_queue_size'
]
s_app
=
e2e
.
E2EMsgGenApplication
(
'msggen'
)
s_app
=
e2e
.
E2EMsgGenApplication
TCP
(
'msggen'
)
s_app
.
stop_time
=
params
[
'app_stop_time'
]
s_app
.
stop_time
=
params
[
'app_stop_time'
]
s_app
.
remotes
=
remotes
s_app
.
remotes
=
remotes
s_host
.
add_component
(
s_app
)
s_host
.
add_component
(
s_app
)
#s_probe = e2e.E2EPeriodicSampleProbe('probe', 'Rx')
#
s_probe = e2e.E2EPeriodicSampleProbe('probe', 'Rx')
#s_probe.interval = '100ms'
#
s_probe.interval = '100ms'
#s_probe.file = f'sink-rx-{i}'
#
s_probe.file = f'sink-rx-{i}'
#s_app.add_component(s_probe)
#
s_app.add_component(s_probe)
topo
.
add_host_r
(
s_host
)
topo
.
add_host_r
(
s_host
)
ns-3
@
96f18501
Compare
a5ddaf00
...
96f18501
Subproject commit
a5ddaf005d4112e50bcbf30acb9417288c2294de
Subproject commit
96f18501910fb9d952e361427a4b690a0fa8254a
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment