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
024d2db6
Commit
024d2db6
authored
Jan 21, 2018
by
Juliusz Chroboczek
Committed by
Juliusz Chroboczek
Oct 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add field flush_interval to struct buffered.
parent
7f4bba93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
interface.c
interface.c
+8
-4
interface.h
interface.h
+1
-0
No files found.
interface.c
View file @
024d2db6
...
@@ -132,12 +132,12 @@ flush_interface(char *ifname)
...
@@ -132,12 +132,12 @@ flush_interface(char *ifname)
unsigned
unsigned
jitter
(
struct
interface
*
ifp
,
int
urgent
)
jitter
(
struct
interface
*
ifp
,
int
urgent
)
{
{
unsigned
interval
=
ifp
->
hello
_interval
;
unsigned
interval
=
ifp
->
buf
.
flush
_interval
;
if
(
urgent
)
if
(
urgent
)
interval
=
MIN
(
interval
,
10
0
);
interval
=
MIN
(
interval
,
2
0
);
else
else
interval
=
MIN
(
interval
,
4
000
);
interval
=
MIN
(
interval
,
2
000
);
return
roughly
(
interval
)
/
4
;
return
roughly
(
interval
/
2
)
;
}
}
unsigned
unsigned
...
@@ -403,6 +403,10 @@ interface_up(struct interface *ifp, int up)
...
@@ -403,6 +403,10 @@ interface_up(struct interface *ifp, int up)
IF_CONF
(
ifp
,
update_interval
)
:
IF_CONF
(
ifp
,
update_interval
)
:
ifp
->
hello_interval
*
4
;
ifp
->
hello_interval
*
4
;
/* This must be no more than half the Hello interval, or else
Hellos will arrive late. */
ifp
->
buf
.
flush_interval
=
ifp
->
hello_interval
/
2
;
ifp
->
rtt_decay
=
ifp
->
rtt_decay
=
IF_CONF
(
ifp
,
rtt_decay
)
>
0
?
IF_CONF
(
ifp
,
rtt_decay
)
>
0
?
IF_CONF
(
ifp
,
rtt_decay
)
:
42
;
IF_CONF
(
ifp
,
rtt_decay
)
:
42
;
...
...
interface.h
View file @
024d2db6
...
@@ -82,6 +82,7 @@ struct buffered {
...
@@ -82,6 +82,7 @@ struct buffered {
char
*
buf
;
char
*
buf
;
int
len
;
int
len
;
int
size
;
int
size
;
int
flush_interval
;
struct
timeval
timeout
;
struct
timeval
timeout
;
char
enable_timestamps
;
char
enable_timestamps
;
char
have_id
;
char
have_id
;
...
...
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