Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
96306239
Commit
96306239
authored
Jun 19, 2018
by
Misbah Mubarak
Browse files
Options
Browse Files
Download
Plain Diff
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
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
src/networks/model-net/model-net-lp.c
src/networks/model-net/model-net-lp.c
+19
-19
No files found.
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