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
c2290e7b
Commit
c2290e7b
authored
Jan 09, 2024
by
Marvin Meiers
Committed by
Antoine Kaufmann
May 08, 2024
Browse files
experiments: use congestion control algorithm enum for ns3 nodes
parent
1dd38d6c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
experiments/pyexps/e2e_cc.py
experiments/pyexps/e2e_cc.py
+2
-1
experiments/pyexps/e2e_split.py
experiments/pyexps/e2e_split.py
+2
-1
experiments/simbricks/orchestration/e2e_components.py
experiments/simbricks/orchestration/e2e_components.py
+6
-3
No files found.
experiments/pyexps/e2e_cc.py
View file @
c2290e7b
...
...
@@ -69,7 +69,6 @@ for congestion_control in types_of_congestion_control:
queue_size
=
int
(
bdp
*
2
**
k_val
)
options
=
{
'ns3::TcpL4Protocol::SocketType'
:
congestion_control
.
ns3
,
'ns3::TcpSocket::SegmentSize'
:
f
'
{
mtu
-
52
}
'
,
'ns3::TcpSocket::SndBufSize'
:
'524288'
,
'ns3::TcpSocket::RcvBufSize'
:
'524288'
,
...
...
@@ -91,6 +90,7 @@ for congestion_control in types_of_congestion_control:
host
.
data_rate
=
f
'
{
link_rate
}
Mbps'
host
.
ip
=
f
'192.168.64.
{
i
}
/24'
host
.
queue_size
=
f
'
{
queue_size
}
B'
host
.
congestion_control
=
congestion_control
app
=
e2e
.
E2EPacketSinkApplication
(
'sink'
)
app
.
local_ip
=
'0.0.0.0:5000'
app
.
stop_time
=
'20s'
...
...
@@ -107,6 +107,7 @@ for congestion_control in types_of_congestion_control:
host
.
data_rate
=
f
'
{
link_rate
}
Mbps'
host
.
ip
=
f
'192.168.64.
{
i
+
num_ns3_hosts
+
num_simbricks_hosts
}
/24'
host
.
queue_size
=
f
'
{
queue_size
}
B'
host
.
congestion_control
=
congestion_control
app
=
e2e
.
E2EBulkSendApplication
(
'sender'
)
app
.
remote_ip
=
f
'192.168.64.
{
i
}
:5000'
app
.
stop_time
=
'20s'
...
...
experiments/pyexps/e2e_split.py
View file @
c2290e7b
...
...
@@ -68,7 +68,6 @@ for congestion_control in types_of_congestion_control:
queue_size
=
int
(
bdp
*
2
**
k_val
)
options
=
{
'ns3::TcpL4Protocol::SocketType'
:
congestion_control
.
ns3
,
'ns3::TcpSocket::SegmentSize'
:
f
'
{
mtu
-
52
}
'
,
'ns3::TcpSocket::SndBufSize'
:
'524288'
,
'ns3::TcpSocket::RcvBufSize'
:
'524288'
,
...
...
@@ -110,6 +109,7 @@ for congestion_control in types_of_congestion_control:
host
.
data_rate
=
f
'
{
link_rate
}
Mbps'
host
.
ip
=
f
'192.168.64.
{
i
}
/24'
host
.
queue_size
=
f
'
{
queue_size
}
B'
host
.
congestion_control
=
congestion_control
app
=
e2e
.
E2EPacketSinkApplication
(
'sink'
)
app
.
local_ip
=
'0.0.0.0:5000'
app
.
stop_time
=
'20s'
...
...
@@ -126,6 +126,7 @@ for congestion_control in types_of_congestion_control:
host
.
data_rate
=
f
'
{
link_rate
}
Mbps'
host
.
ip
=
f
'192.168.64.
{
i
+
num_ns3_hosts
+
num_simbricks_hosts
}
/24'
host
.
queue_size
=
f
'
{
queue_size
}
B'
host
.
congestion_control
=
congestion_control
app
=
e2e
.
E2EBulkSendApplication
(
'sender'
)
app
.
remote_ip
=
f
'192.168.64.
{
i
}
:5000'
app
.
stop_time
=
'20s'
...
...
experiments/simbricks/orchestration/e2e_components.py
View file @
c2290e7b
...
...
@@ -286,16 +286,19 @@ class E2ESimpleNs3Host(E2EHost):
self
.
data_rate
=
""
self
.
queue_size
=
""
self
.
delay
=
""
# todo change this to an enum
self
.
congestion_control
=
""
self
.
congestion_control
:
CongestionControl
=
None
self
.
ip
=
""
def
ns3_config
(
self
)
->
str
:
if
self
.
congestion_control
is
None
:
cc
=
""
else
:
cc
=
self
.
congestion_control
.
ns3
self
.
mapping
.
update
({
"DataRate"
:
self
.
data_rate
,
"QueueSize"
:
self
.
queue_size
,
"Delay"
:
self
.
delay
,
"CongestionControl"
:
self
.
congestion_control
,
"CongestionControl"
:
cc
,
"Ip"
:
self
.
ip
,
})
return
super
().
ns3_config
()
...
...
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