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
15940ce0
Commit
15940ce0
authored
Aug 25, 2007
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compute a smaller jitter when sending urgent updates.
parent
2391e74a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
babel.c
babel.c
+3
-2
babel.h
babel.h
+1
-1
message.c
message.c
+3
-3
No files found.
babel.c
View file @
15940ce0
...
...
@@ -785,9 +785,10 @@ jitter(struct network *net)
}
unsigned
int
update_jitter
(
struct
network
*
net
)
update_jitter
(
struct
network
*
net
,
int
urgent
)
{
unsigned
interval
=
net
->
hello_interval
*
1000
;
if
(
urgent
)
interval
=
MIN
(
interval
,
1000
);
return
(
interval
/
2
+
random
()
%
interval
);
}
babel.h
View file @
15940ce0
...
...
@@ -102,5 +102,5 @@ extern int max_request_hopcount;
int
network_idle
(
struct
network
*
net
);
int
update_hello_interval
(
struct
network
*
net
);
unsigned
int
jitter
(
struct
network
*
net
);
unsigned
int
update_jitter
(
struct
network
*
net
);
unsigned
int
update_jitter
(
struct
network
*
net
,
int
urgent
);
message.c
View file @
15940ce0
...
...
@@ -520,10 +520,10 @@ flushupdates(void)
}
static
void
schedule_update_flush
(
struct
network
*
net
)
schedule_update_flush
(
struct
network
*
net
,
int
urgent
)
{
int
msecs
;
msecs
=
update_jitter
(
net
);
msecs
=
update_jitter
(
net
,
urgent
);
if
(
update_flush_time
.
tv_sec
!=
0
&&
timeval_minus_msec
(
&
update_flush_time
,
&
now
)
<
msecs
)
return
;
...
...
@@ -598,7 +598,7 @@ send_update(struct network *net, int urgent,
buffer_update
(
net
,
routes
[
i
].
src
->
prefix
,
routes
[
i
].
src
->
plen
);
net
->
update_time
=
now
.
tv_sec
;
}
schedule_update_flush
(
net
);
schedule_update_flush
(
net
,
urgent
);
}
void
...
...
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