Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
2ca4e962
Commit
2ca4e962
authored
Jun 20, 2022
by
Hejing Li
Browse files
net_switch: debug prints add more info
parent
ac747b45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
sims/net/switch/net_switch.cc
sims/net/switch/net_switch.cc
+10
-0
No files found.
sims/net/switch/net_switch.cc
View file @
2ca4e962
...
...
@@ -289,6 +289,16 @@ static void sigint_handler(int dummy) {
static
void
sigusr1_handler
(
int
dummy
)
{
fprintf
(
stderr
,
"main_time = %lu
\n
"
,
cur_ts
);
size_t
n
=
ports
.
size
();
for
(
size_t
i
=
0
;
i
<
n
;
i
++
)
{
NetPort
*
p
=
ports
[
i
];
uint64_t
in_timestamp
=
p
->
netif_
.
base
.
in_timestamp
;
uint64_t
out_timestamp
=
p
->
netif_
.
base
.
out_timestamp
;
fprintf
(
stderr
,
"[ ports %lu ]: in_timestamp == %lu
\n
"
,
i
,
in_timestamp
);
fprintf
(
stderr
,
"[ ports %lu ]: out_timestamp == %lu
\n
"
,
i
,
out_timestamp
);
}
}
#ifdef NETSWITCH_STAT
...
...
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