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
603bdbe3
Commit
603bdbe3
authored
Aug 11, 2014
by
Jonathan Jenkins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix packet size determination when using prio scheduler
parent
28d58fe6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
src/models/networks/model-net/model-net-lp.c
src/models/networks/model-net/model-net-lp.c
+17
-12
No files found.
src/models/networks/model-net/model-net-lp.c
View file @
603bdbe3
...
@@ -159,18 +159,6 @@ static void base_read_config(const char * anno, model_net_base_params *p){
...
@@ -159,18 +159,6 @@ static void base_read_config(const char * anno, model_net_base_params *p){
p
->
sched_params
.
type
=
MN_SCHED_FCFS
;
p
->
sched_params
.
type
=
MN_SCHED_FCFS
;
}
}
if
(
p
->
sched_params
.
type
==
MN_SCHED_FCFS_FULL
){
// override packet size to something huge (leave a bit in the unlikely
// case that an op using packet size causes overflow)
packet_size
=
1ull
<<
62
;
}
else
if
(
!
packet_size
&&
p
->
sched_params
.
type
!=
MN_SCHED_FCFS_FULL
)
{
packet_size
=
512
;
fprintf
(
stderr
,
"Warning, no packet size specified, setting packet "
"size to %llu
\n
"
,
packet_size
);
}
// get scheduler-specific parameters
// get scheduler-specific parameters
if
(
p
->
sched_params
.
type
==
MN_SCHED_PRIO
){
if
(
p
->
sched_params
.
type
==
MN_SCHED_PRIO
){
// prio scheduler uses default parameters
// prio scheduler uses default parameters
...
@@ -206,6 +194,23 @@ static void base_read_config(const char * anno, model_net_base_params *p){
...
@@ -206,6 +194,23 @@ static void base_read_config(const char * anno, model_net_base_params *p){
}
}
}
}
if
(
p
->
sched_params
.
type
==
MN_SCHED_FCFS_FULL
||
(
p
->
sched_params
.
type
==
MN_SCHED_PRIO
&&
p
->
sched_params
.
u
.
prio
.
sub_stype
==
MN_SCHED_FCFS_FULL
)){
// override packet size to something huge (leave a bit in the unlikely
// case that an op using packet size causes overflow)
packet_size
=
1ull
<<
62
;
}
else
if
(
!
packet_size
&&
(
p
->
sched_params
.
type
!=
MN_SCHED_FCFS_FULL
||
(
p
->
sched_params
.
type
==
MN_SCHED_PRIO
&&
p
->
sched_params
.
u
.
prio
.
sub_stype
!=
MN_SCHED_FCFS_FULL
))){
packet_size
=
512
;
fprintf
(
stderr
,
"WARNING, no packet size specified, setting packet "
"size to %llu
\n
"
,
packet_size
);
}
p
->
packet_size
=
packet_size
;
p
->
packet_size
=
packet_size
;
}
}
...
...
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