Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
codes
codes
Commits
96306239
Commit
96306239
authored
Jun 19, 2018
by
Misbah Mubarak
Browse files
Merge branch 'model-net-sched-selection-fix' into 'master'
Model net scheduler selection fix See merge request
!48
parents
b186dfb4
00215a99
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networks/model-net/model-net-lp.c
View file @
96306239
...
...
@@ -252,6 +252,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
);
...
...
@@ -276,24 +294,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
...
...
@@ -307,7 +307,7 @@ static void base_read_config(const char * anno, model_net_base_params *p){
ret
=
configuration_get_value
(
&
config
,
"PARAMS"
,
"prio-sched-sub-sched"
,
anno
,
sched
,
MAX_NAME_LENGTH
);
if
(
ret
=
=
0
)
if
(
ret
<
=
0
)
*
sub_stype
=
MN_SCHED_FCFS
;
else
{
int
i
;
...
...
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