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
d40e0807
Commit
d40e0807
authored
Mar 04, 2015
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement reflect-kernel-metric.
Thanks to Pierre Pfister.
parent
0490036f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
3 deletions
+24
-3
CHANGES
CHANGES
+5
-0
babeld.man
babeld.man
+7
-0
configuration.c
configuration.c
+2
-0
route.c
route.c
+9
-2
route.h
route.h
+1
-1
No files found.
CHANGES
View file @
d40e0807
babeld-1.5.2 (unreleased):
* Added support for reflecting metrics as kernel priorities. Thanks to
Pierre Pfister.
4 July 2014: babeld-1.5.1:
* Added support for reading multiple configuration files by specifying
...
...
babeld.man
View file @
d40e0807
...
...
@@ -164,6 +164,13 @@ This specifies the priority value used when installing routes into the
kernel, and is equivalent to the command-line option
.BR \-k .
.TP
.BR reflect-kernel-metric " {" true | false }
Reflect route metrics as kernel priorities. The priority effectively used
is
.B kernel-priority
+
.BR metric .
.TP
.BI allow-duplicates " priority"
This allows duplicating external routes when their kernel priority is
at least
...
...
configuration.c
View file @
d40e0807
...
...
@@ -656,6 +656,8 @@ parse_option(int c, gnc_t gnc, void *closure, char *token)
random_id
=
b
;
else
if
(
strcmp
(
token
,
"daemonise"
)
==
0
)
do_daemonise
=
b
;
else
if
(
strcmp
(
token
,
"reflect-kernel-metric"
)
==
0
)
reflect_kernel_metric
=
b
;
else
abort
();
}
else
if
(
strcmp
(
token
,
"protocol-group"
)
==
0
)
{
...
...
route.c
View file @
d40e0807
...
...
@@ -42,7 +42,7 @@ THE SOFTWARE.
struct
babel_route
**
routes
=
NULL
;
static
int
route_slots
=
0
,
max_route_slots
=
0
;
int
kernel_metric
=
0
;
int
kernel_metric
=
0
,
reflect_kernel_metric
=
0
;
int
allow_duplicates
=
-
1
;
int
diversity_kind
=
DIVERSITY_NONE
;
int
diversity_factor
=
256
;
/* in units of 1/256 */
...
...
@@ -373,7 +373,14 @@ route_stream_done(struct route_stream *stream)
static
int
metric_to_kernel
(
int
metric
)
{
return
metric
<
INFINITY
?
kernel_metric
:
KERNEL_INFINITY
;
if
(
metric
>=
INFINITY
)
{
return
KERNEL_INFINITY
;
}
else
if
(
reflect_kernel_metric
)
{
int
r
=
kernel_metric
+
metric
;
return
r
>=
KERNEL_INFINITY
?
KERNEL_INFINITY
:
r
;
}
else
{
return
kernel_metric
;
}
}
/* This is used to maintain the invariant that the installed route is at
...
...
route.h
View file @
d40e0807
...
...
@@ -47,7 +47,7 @@ struct babel_route {
struct
route_stream
;
extern
struct
babel_route
**
routes
;
extern
int
kernel_metric
,
allow_duplicates
;
extern
int
kernel_metric
,
allow_duplicates
,
reflect_kernel_metric
;
extern
int
diversity_kind
,
diversity_factor
;
extern
int
keep_unfeasible
;
...
...
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