85 lines
5.5 KiB
Diff
85 lines
5.5 KiB
Diff
diff -uNr iperf-3.14.orig/src/iperf_api.c iperf-3.14/src/iperf_api.c
|
|
--- iperf-3.14.orig/src/iperf_api.c 2023-07-18 08:00:55.256155251 -0500
|
|
+++ iperf-3.14/src/iperf_api.c 2023-07-18 08:06:28.219133437 -0500
|
|
@@ -3308,6 +3308,8 @@
|
|
|
|
temp.rttvar = get_rttvar(&temp);
|
|
temp.pmtu = get_pmtu(&temp);
|
|
+ temp.reorder = get_reorder(&temp);
|
|
+ rp->stream_reorder = temp.reorder;
|
|
}
|
|
}
|
|
} else {
|
|
@@ -3753,7 +3755,7 @@
|
|
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, report_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));
|
|
else
|
|
if (test->role == 's' && !sp->sender) {
|
|
if (test->verbose)
|
|
@@ -4204,7 +4206,7 @@
|
|
if (test->sender_has_retransmits == 1 && sp->sender) {
|
|
/* Interval, TCP with retransmits. */
|
|
if (test->json_output)
|
|
- cJSON_AddItemToArray(json_interval_streams, iperf_json_printf("socket: %d start: %f end: %f seconds: %f bytes: %d bits_per_second: %f retransmits: %d snd_cwnd: %d snd_wnd: %d rtt: %d rttvar: %d pmtu: %d omitted: %b sender: %b", (int64_t) sp->socket, (double) st, (double) et, (double) irp->interval_duration, (int64_t) irp->bytes_transferred, bandwidth * 8, (int64_t) irp->interval_retrans, (int64_t) irp->snd_cwnd, (int64_t) irp->snd_wnd, (int64_t) irp->rtt, (int64_t) irp->rttvar, (int64_t) irp->pmtu, irp->omitted, sp->sender));
|
|
+ cJSON_AddItemToArray(json_interval_streams, iperf_json_printf("socket: %d start: %f end: %f seconds: %f bytes: %d bits_per_second: %f retransmits: %d snd_cwnd: %d snd_wnd: %d rtt: %d rttvar: %d pmtu: %d reorder: %d omitted: %b sender: %b", (int64_t) sp->socket, (double) st, (double) et, (double) irp->interval_duration, (int64_t) irp->bytes_transferred, bandwidth * 8, (int64_t) irp->interval_retrans, (int64_t) irp->snd_cwnd, (int64_t) irp->snd_wnd, (int64_t) irp->rtt, (int64_t) irp->rttvar, (int64_t) irp->pmtu, (int64_t) irp->reorder, irp->omitted, sp->sender));
|
|
else {
|
|
unit_snprintf(cbuf, UNIT_LEN, irp->snd_cwnd, 'A');
|
|
iperf_printf(test, report_bw_retrans_cwnd_format, sp->socket, mbuf, st, et, ubuf, nbuf, irp->interval_retrans, cbuf, irp->omitted?report_omitted:"");
|
|
diff -uNr iperf-3.14.orig/src/iperf_api.h iperf-3.14/src/iperf_api.h
|
|
--- iperf-3.14.orig/src/iperf_api.h 2023-07-18 08:00:55.256155251 -0500
|
|
+++ iperf-3.14/src/iperf_api.h 2023-07-18 08:07:01.564615065 -0500
|
|
@@ -301,6 +301,7 @@
|
|
long get_rtt(struct iperf_interval_results *irp);
|
|
long get_rttvar(struct iperf_interval_results *irp);
|
|
long get_pmtu(struct iperf_interval_results *irp);
|
|
+long get_reorder(struct iperf_interval_results *irp);
|
|
void print_tcpinfo(struct iperf_test *test);
|
|
void build_tcpinfo_message(struct iperf_interval_results *r, char *message);
|
|
|
|
diff -uNr iperf-3.14.orig/src/iperf.h iperf-3.14/src/iperf.h
|
|
--- iperf-3.14.orig/src/iperf.h 2023-07-18 08:00:55.256155251 -0500
|
|
+++ iperf-3.14/src/iperf.h 2023-07-18 08:02:22.627851163 -0500
|
|
@@ -109,6 +109,7 @@
|
|
long rtt;
|
|
long rttvar;
|
|
long pmtu;
|
|
+ long reorder;
|
|
};
|
|
|
|
struct iperf_stream_result
|
|
@@ -120,6 +121,7 @@
|
|
iperf_size_t bytes_sent_omit;
|
|
long stream_prev_total_retrans;
|
|
long stream_retrans;
|
|
+ long stream_reorder;
|
|
long stream_max_rtt;
|
|
long stream_min_rtt;
|
|
long stream_sum_rtt;
|
|
diff -uNr iperf-3.14.orig/src/tcp_info.c iperf-3.14/src/tcp_info.c
|
|
--- iperf-3.14.orig/src/tcp_info.c 2023-07-18 08:00:55.257155236 -0500
|
|
+++ iperf-3.14/src/tcp_info.c 2023-07-18 08:07:45.580936522 -0500
|
|
@@ -218,6 +218,20 @@
|
|
}
|
|
|
|
/*************************************************************/
|
|
+/*
|
|
+ * Return number of reordering events seen.
|
|
+ */
|
|
+long
|
|
+get_reorder(struct iperf_interval_results *irp)
|
|
+{
|
|
+#if defined(linux) && defined(TCP_REPAIR_ON)
|
|
+ return irp->tcpInfo.tcpi_reord_seen;
|
|
+#else
|
|
+ return -1;
|
|
+#endif
|
|
+}
|
|
+
|
|
+/*************************************************************/
|
|
void
|
|
build_tcpinfo_message(struct iperf_interval_results *r, char *message)
|
|
{
|