update patch file format and spec file

This commit is contained in:
Jonathan Wright 2023-07-18 09:26:56 -05:00
parent c3575bf9d5
commit e718e8b4cf
2 changed files with 61 additions and 39 deletions

View File

@ -1,7 +1,40 @@
diff -uNr iperf-3.14.orig/src/iperf_api.c iperf-3.14/src/iperf_api.c From 641e51cb4a9bb30e499562e5521901ea23631a8c Mon Sep 17 00:00:00 2001
--- iperf-3.14.orig/src/iperf_api.c 2023-07-18 08:00:55.256155251 -0500 From: Jonathan Wright <jonathan@almalinux.org>
+++ iperf-3.14/src/iperf_api.c 2023-07-18 08:06:28.219133437 -0500 Date: Tue, 18 Jul 2023 09:04:48 -0500
@@ -3308,6 +3308,8 @@ Subject: [PATCH] 1278-rebase Report number of reorder_seen
---
src/iperf.h | 2 ++
src/iperf_api.c | 6 ++++--
src/iperf_api.h | 1 +
src/tcp_info.c | 14 ++++++++++++++
4 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/src/iperf.h b/src/iperf.h
index c3ce333..60b4d6e 100644
--- a/src/iperf.h
+++ b/src/iperf.h
@@ -109,6 +109,7 @@ struct iperf_interval_results
long rtt;
long rttvar;
long pmtu;
+ long reorder;
};
struct iperf_stream_result
@@ -120,6 +121,7 @@ struct iperf_stream_result
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 --git a/src/iperf_api.c b/src/iperf_api.c
index a95e024..30ff8d1 100644
--- a/src/iperf_api.c
+++ b/src/iperf_api.c
@@ -3308,6 +3308,8 @@ iperf_stats_callback(struct iperf_test *test)
temp.rttvar = get_rttvar(&temp); temp.rttvar = get_rttvar(&temp);
temp.pmtu = get_pmtu(&temp); temp.pmtu = get_pmtu(&temp);
@ -10,7 +43,7 @@ diff -uNr iperf-3.14.orig/src/iperf_api.c iperf-3.14/src/iperf_api.c
} }
} }
} else { } else {
@@ -3753,7 +3755,7 @@ @@ -3753,7 +3755,7 @@ iperf_print_results(struct iperf_test *test)
if (test->sender_has_retransmits) { if (test->sender_has_retransmits) {
/* Sender summary, TCP and SCTP with retransmits. */ /* Sender summary, TCP and SCTP with retransmits. */
if (test->json_output) if (test->json_output)
@ -19,7 +52,7 @@ diff -uNr iperf-3.14.orig/src/iperf_api.c iperf-3.14/src/iperf_api.c
else else
if (test->role == 's' && !sp->sender) { if (test->role == 's' && !sp->sender) {
if (test->verbose) if (test->verbose)
@@ -4204,7 +4206,7 @@ @@ -4204,7 +4206,7 @@ print_interval_results(struct iperf_test *test, struct iperf_stream *sp, cJSON *
if (test->sender_has_retransmits == 1 && sp->sender) { if (test->sender_has_retransmits == 1 && sp->sender) {
/* Interval, TCP with retransmits. */ /* Interval, TCP with retransmits. */
if (test->json_output) if (test->json_output)
@ -28,10 +61,11 @@ diff -uNr iperf-3.14.orig/src/iperf_api.c iperf-3.14/src/iperf_api.c
else { else {
unit_snprintf(cbuf, UNIT_LEN, irp->snd_cwnd, 'A'); 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:""); 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 diff --git a/src/iperf_api.h b/src/iperf_api.h
--- iperf-3.14.orig/src/iperf_api.h 2023-07-18 08:00:55.256155251 -0500 index 171006a..542d8c9 100644
+++ iperf-3.14/src/iperf_api.h 2023-07-18 08:07:01.564615065 -0500 --- a/src/iperf_api.h
@@ -301,6 +301,7 @@ +++ b/src/iperf_api.h
@@ -301,6 +301,7 @@ long get_snd_wnd(struct iperf_interval_results *irp);
long get_rtt(struct iperf_interval_results *irp); long get_rtt(struct iperf_interval_results *irp);
long get_rttvar(struct iperf_interval_results *irp); long get_rttvar(struct iperf_interval_results *irp);
long get_pmtu(struct iperf_interval_results *irp); long get_pmtu(struct iperf_interval_results *irp);
@ -39,32 +73,15 @@ diff -uNr iperf-3.14.orig/src/iperf_api.h iperf-3.14/src/iperf_api.h
void print_tcpinfo(struct iperf_test *test); void print_tcpinfo(struct iperf_test *test);
void build_tcpinfo_message(struct iperf_interval_results *r, char *message); 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 diff --git a/src/tcp_info.c b/src/tcp_info.c
--- iperf-3.14.orig/src/iperf.h 2023-07-18 08:00:55.256155251 -0500 index 160063c..263e748 100644
+++ iperf-3.14/src/iperf.h 2023-07-18 08:02:22.627851163 -0500 --- a/src/tcp_info.c
@@ -109,6 +109,7 @@ +++ b/src/tcp_info.c
long rtt; @@ -217,6 +217,20 @@ get_pmtu(struct iperf_interval_results *irp)
long rttvar; #endif
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. + * Return number of reordering events seen.
+ */ + */
@ -78,7 +95,9 @@ diff -uNr iperf-3.14.orig/src/tcp_info.c iperf-3.14/src/tcp_info.c
+#endif +#endif
+} +}
+ +
+/*************************************************************/ /*************************************************************/
void void
build_tcpinfo_message(struct iperf_interval_results *r, char *message) build_tcpinfo_message(struct iperf_interval_results *r, char *message)
{ --
2.41.0

View File

@ -5,10 +5,10 @@ Summary: Measurement tool for TCP/UDP bandwidth performance
License: BSD License: BSD
URL: https://github.com/esnet/iperf URL: https://github.com/esnet/iperf
Source0: https://github.com/esnet/iperf/archive/iperf-%{version}.tar.gz Source0: %{url}/archive/%{version}/iperf-%{version}.tar.gz
# PR#1278: Report number of reorder_seen (rhbz#2063959) # PR#1278: Report number of reorder_seen (rhbz#2063959)
# rebased for 3.14 by Jonathan Wright <jonathan@almalinux.org> # Patch0: https://github.com/esnet/iperf/pull/1278-rebase.patch
Patch0: https://github.com/esnet/iperf/pull/1278-rebase.patch Patch0: 1278-rebase.patch
BuildRequires: libuuid-devel BuildRequires: libuuid-devel
BuildRequires: gcc BuildRequires: gcc
BuildRequires: lksctp-tools-devel BuildRequires: lksctp-tools-devel
@ -55,6 +55,9 @@ rm -f %{buildroot}%{_libdir}/libiperf.la
%{_libdir}/*.so %{_libdir}/*.so
%changelog %changelog
* Tue Jul 18 2023 Jonathan Wright <jonathan@almalinux.org> - 3.14-2
- update spec file syntax
* Tue Jul 18 2023 Jonathan Wright <jonathan@almalinux.org> - 3.14-1 * Tue Jul 18 2023 Jonathan Wright <jonathan@almalinux.org> - 3.14-1
- update to 3.14 rhbz#2183634 - update to 3.14 rhbz#2183634
- Security fix for CVE-2023-38403 rhbz#2222204 rhbz#2223495 - Security fix for CVE-2023-38403 rhbz#2222204 rhbz#2223495