-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integers not being displayed properly for 'sender_has_retransmits' and possibly other items. #1435
Comments
The use case is very specific but the reporting will be generic. I'm surprised this hasn't been seen more often. |
Would it be better if variables like sender_has_retransmits were initialised to 0 instead? Then if there were no retransmits, at least it would display 0. I'm not sure at this time if there are any further side effects by doing this. |
The "sender_has_retransmits" and "retransmits" related variables values are -1 as required. The problem is only in the printing of these values, as numbers from Submitted a PR #1539 with a fix. |
Excellent! I'm glad that there is a better solution. |
NOTE: The iperf3 issue tracker is for registering bugs, enhancement
requests, or submissions of code. It is not a means for asking
questions about building or using iperf3. Those are best directed
towards the Discussions section for this project at
https://github.com/esnet/iperf/discussions
or to the iperf3 mailing list at [email protected].
A list of frequently-asked questions
regarding iperf3 can be found at http://software.es.net/iperf/faq.html.
Context
Testing with debug enabled.
Version of iperf3:
V3.12
Hardware:
Custom ARM based RF board as the server and a Raspberry Pi as the client
Operating system (and distribution, if any):
Linux
Please note: iperf3 is supported on Linux, FreeBSD, and macOS.
Support may be provided on a best-effort basis to other UNIX-like
platforms. We cannot provide support for building and/or running
iperf3 on Windows, iOS, or Android.
libraries, cross-compiling, etc.):
Please fill out one of the "Bug Report" or "Enhancement Request"
sections, as appropriate. Note that submissions of bug fixes, new
features, etc. should be done as a pull request at
https://github.com/esnet/iperf/pulls
Bug Report
The code snippet is from iperf_api.c
The item sender_has_retransmits is an int, However, it's reported in Json via cJSON_AddNumberToObject. This function takes a double as the value. Consequently, -1 gets displayed as 18446744073709551615
"retransmits": -1,
or
"retransmits": <ANY_INT_VALUE>,
Actual Behavior
send_results
{
"cpu_util_total": 0.21799147343840383,
"cpu_util_user": 0,
"cpu_util_system": 0.21797719109067146,
"sender_has_retransmits": 18446744073709551615,
"congestion_used": "cubic",
"streams": [{
"id": 1,
"bytes": 0,
"retransmits": 18446744073709551615,
"jitter": 0,
"errors": 0,
"packets": 0,
"start_time": 0,
"end_time": 5.000827
}]
}
Steps to Reproduce
Server: iperf3 --server -1 -p 5201 --verbose
Client: iperf3 --client 192.168.200.242 --port 5201 --bind 10.0.0.2%wwan0 --time 5 --verbose --reverse -d
This was spotted when the -d option was used.
Perhaps a function with...
cJSON_AddDoubleToObject
cJSON_AddIntToObject
Enhancement Request
Current behavior
Desired behavior
Implementation notes
The text was updated successfully, but these errors were encountered: