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
Xin Wang
codes-dev
Commits
3957a80e
Commit
3957a80e
authored
Jul 28, 2016
by
Noah Wolfe
Committed by
Nikhil
Aug 22, 2016
Browse files
Fixed last_buf_full functionality in switch_buf_update()
parent
cff2f4fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networks/model-net/fattree.c
View file @
3957a80e
...
...
@@ -1571,11 +1571,15 @@ void switch_buf_update(switch_state * s, tw_bf * bf, fattree_message * msg,
int
indx
=
msg
->
vc_index
;
s
->
vc_occupancy
[
indx
]
-=
s
->
params
->
packet_size
;
if
(
bf
->
c3
)
if
(
s
->
last_buf_full
[
indx
]
)
{
s
->
busy_time
[
indx
]
=
msg
->
saved_rcv_time
;
s
->
busy_time_sample
[
indx
]
=
msg
->
saved_sample_time
;
s
->
last_buf_full
[
indx
]
=
msg
->
saved_busy_time
;
bf
->
c3
=
1
;
msg
->
saved_rcv_time
=
s
->
busy_time
[
indx
];
msg
->
saved_busy_time
=
s
->
last_buf_full
[
indx
];
msg
->
saved_sample_time
=
s
->
busy_time_sample
[
indx
];
s
->
busy_time
[
indx
]
+=
(
tw_now
(
lp
)
-
s
->
last_buf_full
[
indx
]);
s
->
busy_time_sample
[
indx
]
+=
(
tw_now
(
lp
)
-
s
->
last_buf_full
[
indx
]);
s
->
last_buf_full
[
indx
]
=
0
.
0
;
}
if
(
s
->
queued_msgs
[
indx
]
!=
NULL
)
{
...
...
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