Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
tsn-measures
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
tsn-measures
Commits
f9c04177
Commit
f9c04177
authored
Jun 11, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't exit when a value is higher than the maximum histogram value
parent
9612d1e6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
9 deletions
+2
-9
packet-exchange/src/client.c
packet-exchange/src/client.c
+0
-1
packet-exchange/src/recv_packet.c
packet-exchange/src/recv_packet.c
+0
-2
packet-exchange/src/send_packet.c
packet-exchange/src/send_packet.c
+0
-2
packet-exchange/src/server.c
packet-exchange/src/server.c
+2
-4
No files found.
packet-exchange/src/client.c
View file @
f9c04177
...
@@ -265,7 +265,6 @@ static void do_tsn_task(struct thread_param *param, char *data, uint64_t next_tx
...
@@ -265,7 +265,6 @@ static void do_tsn_task(struct thread_param *param, char *data, uint64_t next_tx
rtt_us
=
param
->
stats
.
rtt
/
1000
;
rtt_us
=
param
->
stats
.
rtt
/
1000
;
if
(
rtt_us
>
MAX_HIST_VAL
)
{
if
(
rtt_us
>
MAX_HIST_VAL
)
{
fprintf
(
stderr
,
"RTT value higher than MAX_HIST_VAL : %d ( > %d)
\n
"
,
rtt_us
,
MAX_HIST_VAL
);
fprintf
(
stderr
,
"RTT value higher than MAX_HIST_VAL : %d ( > %d)
\n
"
,
rtt_us
,
MAX_HIST_VAL
);
exit
(
EXIT_FAILURE
);
}
}
histograms
[
0
][
rtt_us
]
++
;
histograms
[
0
][
rtt_us
]
++
;
}
}
...
...
packet-exchange/src/recv_packet.c
View file @
f9c04177
...
@@ -175,11 +175,9 @@ static void fill_histograms(packet_info_t *packet_info, int64_t histograms[NB_HI
...
@@ -175,11 +175,9 @@ static void fill_histograms(packet_info_t *packet_info, int64_t histograms[NB_HI
if
(
user_space_time
>
MAX_HIST_VAL
)
{
if
(
user_space_time
>
MAX_HIST_VAL
)
{
fprintf
(
stderr
,
"user_space_time value too high: %"
PRIu64
"us
\n
"
,
user_space_time
);
fprintf
(
stderr
,
"user_space_time value too high: %"
PRIu64
"us
\n
"
,
user_space_time
);
exit
(
EXIT_FAILURE
);
}
}
if
(
kernel_space_time
>
MAX_HIST_VAL
)
{
if
(
kernel_space_time
>
MAX_HIST_VAL
)
{
fprintf
(
stderr
,
"kernel_space_time value too high: %"
PRIu64
"us
\n
"
,
kernel_space_time
);
fprintf
(
stderr
,
"kernel_space_time value too high: %"
PRIu64
"us
\n
"
,
kernel_space_time
);
exit
(
EXIT_FAILURE
);
}
}
histograms
[
0
][
user_space_time
]
++
;
histograms
[
0
][
user_space_time
]
++
;
...
...
packet-exchange/src/send_packet.c
View file @
f9c04177
...
@@ -210,11 +210,9 @@ static void fill_histograms(packet_info_t *packet_info, int64_t histograms[NB_HI
...
@@ -210,11 +210,9 @@ static void fill_histograms(packet_info_t *packet_info, int64_t histograms[NB_HI
if
(
user_space_time
>
MAX_HIST_VAL
)
{
if
(
user_space_time
>
MAX_HIST_VAL
)
{
fprintf
(
stderr
,
"user_space_time value too high: %"
PRIu64
"us
\n
"
,
user_space_time
);
fprintf
(
stderr
,
"user_space_time value too high: %"
PRIu64
"us
\n
"
,
user_space_time
);
exit
(
EXIT_FAILURE
);
}
}
if
(
kernel_space_time
>
MAX_HIST_VAL
)
{
if
(
kernel_space_time
>
MAX_HIST_VAL
)
{
fprintf
(
stderr
,
"kernel_space_time value too high: %"
PRIu64
"us
\n
"
,
kernel_space_time
);
fprintf
(
stderr
,
"kernel_space_time value too high: %"
PRIu64
"us
\n
"
,
kernel_space_time
);
exit
(
EXIT_FAILURE
);
}
}
histograms
[
0
][
user_space_time
]
++
;
histograms
[
0
][
user_space_time
]
++
;
...
...
packet-exchange/src/server.c
View file @
f9c04177
...
@@ -157,14 +157,12 @@ static void *packet_receiving_thread(void *p) {
...
@@ -157,14 +157,12 @@ static void *packet_receiving_thread(void *p) {
if
(
enable_histograms
)
{
if
(
enable_histograms
)
{
dist_to_interval
=
(((
int64_t
)
diff
)
-
param
->
interval
)
/
1000
;
dist_to_interval
=
(((
int64_t
)
diff
)
-
param
->
interval
)
/
1000
;
dist_to_interval
+=
MAX_HIST_VAL
/
2
;
dist_to_interval
+=
MAX_HIST_VAL
/
2
;
if
(
dist_to_interval
>
((
int
)
MAX_HIST_VAL
)
||
dist_to_interval
<
0
)
{
if
(
dist_to_interval
>
((
int
)
MAX_HIST_VAL
)
||
dist_to_interval
<
0
)
fprintf
(
stderr
,
"jitter higher than MAX_HIST_VAL: %"
PRIi64
"
\n
"
,
dist_to_interval
);
fprintf
(
stderr
,
"jitter higher than MAX_HIST_VAL: %"
PRIi64
"
\n
"
,
dist_to_interval
);
exit
(
EXIT_FAILURE
);
else
}
else
{
histograms
[
2
][
dist_to_interval
]
++
;
histograms
[
2
][
dist_to_interval
]
++
;
}
}
}
}
}
previous
=
current
;
previous
=
current
;
prev_packet_id
=
current_packet_id
;
prev_packet_id
=
current_packet_id
;
...
...
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