Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
PRRT
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
36
Issues
36
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LARN
PRRT
Commits
7f88c93b
Commit
7f88c93b
authored
Mar 21, 2018
by
Andreas Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update BBR.
parent
323cef5f
Pipeline
#2104
failed with stages
in 22 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
8 deletions
+37
-8
prrt/cprrt.pxd
prrt/cprrt.pxd
+2
-0
prrt/proto/bbr.c
prrt/proto/bbr.c
+9
-5
prrt/proto/bbr.h
prrt/proto/bbr.h
+3
-3
prrt/proto/socket.c
prrt/proto/socket.c
+9
-0
prrt/proto/socket.h
prrt/proto/socket.h
+2
-0
prrt/prrt.pyx
prrt/prrt.pyx
+12
-0
No files found.
prrt/cprrt.pxd
View file @
7f88c93b
...
...
@@ -152,6 +152,8 @@ cdef extern from "proto/socket.h":
bint
PrrtSocket_get_filled_pipe
(
PrrtSocket
*
s
)
uint32_t
PrrtSocket_get_cycle_index
(
PrrtSocket
*
s
)
float
PrrtSocket_get_pacing_gain
(
PrrtSocket
*
s
)
uint32_t
PrrtSocket_get_cwnd
(
PrrtSocket
*
s
)
uint32_t
PrrtSocket_get_inflight
(
PrrtSocket
*
s
)
bint
PrrtSocket_get_app_limited
(
PrrtSocket
*
socket
)
...
...
prrt/proto/bbr.c
View file @
7f88c93b
...
...
@@ -2,6 +2,7 @@
#include "../util/dbg.h"
#include "../util/common.h"
#include "receiver.h"
#include <math.h>
prrtByteCount_t
BBR_Inflight
(
BBR
*
bbr
,
float
gain
)
...
...
@@ -9,7 +10,7 @@ prrtByteCount_t BBR_Inflight(BBR* bbr, float gain)
if
(
bbr
->
rtprop
==
Inf
)
return
InitialCwnd
;
/* no valid RTT samples yet */
uint32_t
quanta
=
3
*
bbr
->
send_quantum
;
uint32_t
estimated_bdp
=
(
bbr
->
bw
*
bbr
->
rtprop
)
/
(
1000
*
1000
*
8
);
uint32_t
estimated_bdp
=
(
uint32_t
)
round
(((
double
)
bbr
->
bw
*
bbr
->
rtprop
)
/
(
1000
*
1000
)
);
return
(
uint32_t
)(
gain
*
estimated_bdp
+
quanta
);
}
...
...
@@ -30,7 +31,7 @@ void BBR_UpdateBtlBw(BBR* bbr, PrrtRateSample* rs, PrrtPacketTracking* tracking)
bbr
->
round_start
=
false
;
}
if
((
rs
->
delivery_rate
>=
bbr
->
bw
||
!
rs
->
is_app_limited
)
&&
rs
->
delivery_rate
!=
0
)
{
bbr
->
bw
=
(
uint32_t
)
WindowedFilter_push
(
bbr
->
btlBwFilter
,
(
uint32_t
)(
rs
->
delivery_rate
));
bbr
->
bw
=
(
uint32_t
)
WindowedFilter_push
(
bbr
->
btlBwFilter
,
(
uint32_t
)(
(
float
)
rs
->
delivery_rate
/
8
));
debug
(
DEBUG_BBR
,
"Current BtlBw: %u, RS delivery rate: %u"
,
bbr
->
bw
,
(
uint32_t
)
rs
->
delivery_rate
);
}
}
...
...
@@ -131,10 +132,10 @@ void BBR_EnterProbeRTT(BBR *bbr) {
}
void
BBR_HandleProbeRTT
(
BBR
*
bbr
,
PrrtPacketTracking
*
tracking
)
{
tracking
->
app_limited
=
(
tracking
->
delivered
+
tracking
->
p
ipe
)
?
:
1
;
tracking
->
app_limited
=
(
tracking
->
delivered
+
tracking
->
p
ackets_in_flight
)
?
:
1
;
/* Ignore low rate samples during ProbeRTT: */
prrtTimestamp_t
now
=
PrrtClock_get_current_time_us
();
if
(
bbr
->
probe_rtt_done_stamp
==
0
&&
tracking
->
p
ipe
<=
BBRMinPipeCwnd
)
{
if
(
bbr
->
probe_rtt_done_stamp
==
0
&&
tracking
->
p
ackets_in_flight
<=
BBRMinPipeCwnd
)
{
bbr
->
probe_rtt_done_stamp
=
now
+
ProbeRTTDuration
;
bbr
->
probe_rtt_round_done
=
false
;
bbr
->
next_round_delivered
=
tracking
->
delivered
;
...
...
@@ -211,7 +212,7 @@ void BBR_SetCwnd(BBR* bbr, PrrtPacketTracking* packetTracking)
void
BBR_SetPacingRateWithGain
(
BBR
*
bbr
,
float
pacing_gain
)
{
uint32_t
rate
=
(
uint32_t
)
(
pacing_gain
*
((
float
)
bbr
->
bw
)
/
(
1000
*
1000
*
8
)
);
uint32_t
rate
=
(
uint32_t
)
(
pacing_gain
*
((
float
)
bbr
->
bw
));
debug
(
DEBUG_BBR
,
"Current rate: %u, Pacing gain: %f, BtlBw: %u, Calc Rate: %u, Filled pipe: %u"
,
bbr
->
pacing_rate
,
pacing_gain
,
bbr
->
bw
,
rate
,
bbr
->
filled_pipe
);
if
(
rate
!=
0
&&
(
bbr
->
filled_pipe
||
rate
>
bbr
->
pacing_rate
))
...
...
@@ -312,3 +313,6 @@ uint64_t BBR_getFullBw(BBR* bbr) {
return
bbr
->
full_bw
;
}
prrtByteCount_t
BBR_getInflight
(
BBR
*
bbr
)
{
return
BBR_Inflight
(
bbr
,
bbr
->
pacing_gain
);
}
\ No newline at end of file
prrt/proto/bbr.h
View file @
7f88c93b
...
...
@@ -10,12 +10,11 @@
#include "types/rateSample.h"
#include "../util/windowedFilter.h"
#define MTU 1500
#define RTpropFilterLen 10000000 //10s
#define BBRHighGain ((2885 / 1000) + 1)
#define InitialCwnd
(10 * MTU)
#define InitialCwnd
10
#define BBRGainCycleLen 8
#define BBRMinPipeCwnd
(4 * MTU)
#define BBRMinPipeCwnd
4
#define ProbeRTTDuration 200000 //200ms
#define Inf UINT32_MAX
...
...
@@ -82,5 +81,6 @@ float BBR_getPacingGain(BBR* bbr);
uint32_t
BBR_getCycleIndex
(
BBR
*
bbr
);
bool
BBR_getFilledPipe
(
BBR
*
bbr
);
uint32_t
BBR_getRTProp
(
BBR
*
bbr
);
prrtByteCount_t
BBR_getInflight
(
BBR
*
bbr
);
#endif //PRRT_BBR_H
prrt/proto/socket.c
View file @
7f88c93b
...
...
@@ -624,6 +624,15 @@ uint64_t PrrtSocket_get_full_bw(PrrtSocket *s) {
return
BBR_getFullBw
(
s
->
receiver
->
bbr
);
}
uint32_t
PrrtSocket_get_cwnd
(
PrrtSocket
*
s
)
{
return
BBR_getCwnd
(
s
->
receiver
->
bbr
);
}
uint32_t
PrrtSocket_get_inflight
(
PrrtSocket
*
s
)
{
return
BBR_getInflight
(
s
->
receiver
->
bbr
);
}
float
PrrtSocket_get_pacing_gain
(
PrrtSocket
*
s
)
{
return
BBR_getPacingGain
(
s
->
receiver
->
bbr
);
}
...
...
prrt/proto/socket.h
View file @
7f88c93b
...
...
@@ -143,6 +143,8 @@ uint32_t PrrtSocket_get_bbr_state(PrrtSocket *s);
bool
PrrtSocket_get_app_limited
(
PrrtSocket
*
s
);
uint32_t
PrrtSocket_get_cycle_index
(
PrrtSocket
*
s
);
float
PrrtSocket_get_pacing_gain
(
PrrtSocket
*
s
);
uint32_t
PrrtSocket_get_cwnd
(
PrrtSocket
*
s
);
uint32_t
PrrtSocket_get_inflight
(
PrrtSocket
*
s
);
#endif // PRRT_SOCKET_H
prrt/prrt.pyx
View file @
7f88c93b
...
...
@@ -223,6 +223,18 @@ cdef class PrrtSocket:
raise
Exception
(
"Not a sender."
)
return
cprrt
.
PrrtSocket_get_pacing_gain
(
self
.
_c_socket
)
property
bbr_cwnd
:
def
__get__
(
self
):
if
not
self
.
isSender
:
raise
Exception
(
"Not a sender."
)
return
cprrt
.
PrrtSocket_get_cwnd
(
self
.
_c_socket
)
property
bbr_inflight
:
def
__get__
(
self
):
if
not
self
.
isSender
:
raise
Exception
(
"Not a sender."
)
return
cprrt
.
PrrtSocket_get_inflight
(
self
.
_c_socket
)
property
app_limited
:
def
__get__
(
self
):
if
not
self
.
isSender
:
...
...
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