Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
codes
codes
Commits
bbae9bca
Commit
bbae9bca
authored
Apr 16, 2018
by
Lee Savoie
Browse files
Fix error that caused default to fcfs scheduler
parent
64789c54
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networks/model-net/model-net-lp.c
View file @
bbae9bca
...
...
@@ -238,6 +238,24 @@ static void base_read_config(const char * anno, model_net_base_params *p){
&
packet_size_l
);
packet_size
=
packet_size_l
;
if
(
ret
>
0
){
int
i
;
for
(
i
=
0
;
i
<
MAX_SCHEDS
;
i
++
){
if
(
strcmp
(
sched_names
[
i
],
sched
)
==
0
){
p
->
sched_params
.
type
=
i
;
break
;
}
}
if
(
i
==
MAX_SCHEDS
){
tw_error
(
TW_LOC
,
"Unknown value for PARAMS:modelnet-scheduler : "
"%s"
,
sched
);
}
}
else
{
// default: FCFS
p
->
sched_params
.
type
=
MN_SCHED_FCFS
;
}
p
->
num_queues
=
1
;
ret
=
configuration_get_value_int
(
&
config
,
"PARAMS"
,
"num_injection_queues"
,
anno
,
&
p
->
num_queues
);
...
...
@@ -262,24 +280,6 @@ static void base_read_config(const char * anno, model_net_base_params *p){
"setting to %d
\n
"
,
p
->
node_copy_queues
);
}
if
(
ret
>
0
){
int
i
;
for
(
i
=
0
;
i
<
MAX_SCHEDS
;
i
++
){
if
(
strcmp
(
sched_names
[
i
],
sched
)
==
0
){
p
->
sched_params
.
type
=
i
;
break
;
}
}
if
(
i
==
MAX_SCHEDS
){
tw_error
(
TW_LOC
,
"Unknown value for PARAMS:modelnet-scheduler : "
"%s"
,
sched
);
}
}
else
{
// default: FCFS
p
->
sched_params
.
type
=
MN_SCHED_FCFS
;
}
// get scheduler-specific parameters
if
(
p
->
sched_params
.
type
==
MN_SCHED_PRIO
){
// prio scheduler uses default parameters
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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