-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Report number of reorder_seen #1278
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
Conversation
8b3a23f
to
7146bbf
Compare
Can you please rebase this to the latest upstream master? |
@bmah888 any thoughts on merging this? We've been constantly recreating this change in the Fedora package for a while now. Would be great to see it merged to save us the work on new updates. |
@bmah888 can you take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR and sorry it's taken so long to look at this. I had just a couple minor comments. It looks good so far, althoiugh I haven't tried running with this change yet.
src/iperf_api.c
Outdated
@@ -3753,7 +3755,7 @@ iperf_print_results(struct iperf_test *test) | |||
if (test->sender_has_retransmits) { | |||
/* Sender summary, TCP and SCTP with retransmits. */ | |||
if (test->json_output) | |||
cJSON_AddItemToObject(json_summary_stream, report_sender, iperf_json_printf("socket: %d start: %f end: %f seconds: %f bytes: %d bits_per_second: %f retransmits: %d max_snd_cwnd: %d max_snd_wnd: %d max_rtt: %d min_rtt: %d mean_rtt: %d sender: %b", (int64_t) sp->socket, (double) start_time, (double) sender_time, (double) sender_time, (int64_t) bytes_sent, bandwidth * 8, (int64_t) sp->result->stream_retrans, (int64_t) sp->result->stream_max_snd_cwnd, (int64_t) sp->result->stream_max_snd_wnd, (int64_t) sp->result->stream_max_rtt, (int64_t) sp->result->stream_min_rtt, (int64_t) ((sp->result->stream_count_rtt == 0) ? 0 : sp->result->stream_sum_rtt / sp->result->stream_count_rtt), stream_must_be_sender)); | |||
cJSON_AddItemToObject(json_summary_stream, "sender", iperf_json_printf("socket: %d start: %f end: %f seconds: %f bytes: %d bits_per_second: %f retransmits: %d reorder: %d max_snd_cwnd: %d max_snd_wnd: %d max_rtt: %d min_rtt: %d mean_rtt: %d sender: %b", (int64_t) sp->socket, (double) start_time, (double) sender_time, (double) sender_time, (int64_t) bytes_sent, bandwidth * 8, (int64_t) sp->result->stream_retrans, (int64_t) sp->result->stream_reorder, (int64_t) sp->result->stream_max_snd_cwnd, (int64_t) sp->result->stream_max_snd_wnd, (int64_t) sp->result->stream_max_rtt, (int64_t) sp->result->stream_min_rtt, (int64_t) ((sp->result->stream_count_rtt == 0) ? 0 : sp->result->stream_sum_rtt / sp->result->stream_count_rtt), stream_must_be_sender)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line changes report_sender
to the literal "sender"
(in addition to the two other changes related to this feature). Can it not do that? I realize it's possible that this might be due to code changes during the long time that elapsed since the original PR submission.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think that's unrelated. I rebased my patch and it went away.
c11a596
to
ed72662
Compare
TCP can detect reordering by tracking SACKs and timestamps coming back to the sender. This is useful information for investigating performance issues and testing networks as good networks should generally not reorder packets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This version looks good! Will merge shortly. Thanks for the PR!
Version of iperf3: master
Brief description of code changes (suitable for use as a commit message):
Report reorder_seen Linux TCP statistic in the detailed (JSON) output.