Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
nexedi
babeld
Commits
bf8555b2
Commit
bf8555b2
authored
May 18, 2014
by
Baptiste Jonglez
Committed by
Juliusz Chroboczek
May 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch to TCP conventions for the RTT decay factor
parent
fe538cc4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
babeld.man
babeld.man
+3
-3
interface.c
interface.c
+1
-1
message.c
message.c
+2
-2
No files found.
babeld.man
View file @
bf8555b2
...
@@ -342,9 +342,9 @@ otherwise.
...
@@ -342,9 +342,9 @@ otherwise.
.TP
.TP
.BI rtt\-exponential\-decay " decay"
.BI rtt\-exponential\-decay " decay"
This specifies the decay factor for the exponential moving average of
This specifies the decay factor for the exponential moving average of
RTT samples, in units of 1/256. Must be between
1 and 256
, inclusive.
RTT samples, in units of 1/256. Must be between
0 and 255
, inclusive.
High
er values discard old samples faster. The default is
Low
er values discard old samples faster. The default is
.BR
42
.
.BR
214
.
.TP
.TP
.BI rtt\-min " rtt"
.BI rtt\-min " rtt"
This specifies the minimum RTT, in milliseconds, starting from which
This specifies the minimum RTT, in milliseconds, starting from which
...
...
interface.c
View file @
bf8555b2
...
@@ -307,7 +307,7 @@ interface_up(struct interface *ifp, int up)
...
@@ -307,7 +307,7 @@ interface_up(struct interface *ifp, int up)
ifp
->
rtt_exponential_decay
=
ifp
->
rtt_exponential_decay
=
IF_CONF
(
ifp
,
rtt_exponential_decay
)
>
0
?
IF_CONF
(
ifp
,
rtt_exponential_decay
)
>
0
?
IF_CONF
(
ifp
,
rtt_exponential_decay
)
:
42
;
IF_CONF
(
ifp
,
rtt_exponential_decay
)
:
214
;
ifp
->
rtt_min
=
ifp
->
rtt_min
=
IF_CONF
(
ifp
,
rtt_min
)
>
0
?
IF_CONF
(
ifp
,
rtt_min
)
>
0
?
...
...
message.c
View file @
bf8555b2
...
@@ -618,8 +618,8 @@ parse_packet(const unsigned char *from, struct interface *ifp,
...
@@ -618,8 +618,8 @@ parse_packet(const unsigned char *from, struct interface *ifp,
old_rttcost
=
neighbour_rttcost
(
neigh
);
old_rttcost
=
neighbour_rttcost
(
neigh
);
if
(
valid_rtt
(
neigh
))
{
if
(
valid_rtt
(
neigh
))
{
/* Running exponential average. */
/* Running exponential average. */
smoothed_rtt
=
(
ifp
->
rtt_exponential_decay
*
rtt
smoothed_rtt
=
(
(
256
-
ifp
->
rtt_exponential_decay
)
*
rtt
+
(
256
-
ifp
->
rtt_exponential_decay
)
*
neigh
->
rtt
);
+
ifp
->
rtt_exponential_decay
*
neigh
->
rtt
);
/* Rounding (up or down) to get closer to the sample. */
/* Rounding (up or down) to get closer to the sample. */
neigh
->
rtt
=
(
neigh
->
rtt
>=
rtt
)
?
smoothed_rtt
/
256
:
neigh
->
rtt
=
(
neigh
->
rtt
>=
rtt
)
?
smoothed_rtt
/
256
:
(
smoothed_rtt
+
255
)
/
256
;
(
smoothed_rtt
+
255
)
/
256
;
...
...
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