Skip to content

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

Merged
merged 1 commit into from
May 30, 2025
Merged

Conversation

kuba-moo
Copy link
Contributor

  • 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.

@jonathanspw
Copy link

Can you please rebase this to the latest upstream master?

@jonathanspw
Copy link

@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.

@k0ste
Copy link

k0ste commented May 19, 2025

@bmah888 can you take a look?

Copy link
Contributor

@bmah888 bmah888 left a 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));
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@kuba-moo kuba-moo force-pushed the report-reorder branch 2 times, most recently from c11a596 to ed72662 Compare May 29, 2025 22:24
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.
Copy link
Contributor

@bmah888 bmah888 left a 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!

@bmah888 bmah888 merged commit 84c49f2 into esnet:master May 30, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants