From 74030b8feacac1aa5fbd82dce807b9a9fd13ee14 Mon Sep 17 00:00:00 2001 From: Lemmy Huang Date: Sat, 10 Jun 2023 19:40:46 +0800 Subject: [PATCH] optimize: avoid too many empty acks in tcp_input Signed-off-by: Lemmy Huang (cherry picked from commit 931f30870bcd21d5b65fbedf039e5fc082ecfdb2) --- ...oid-too-many-empty-acks-in-tcp_input.patch | 30 +++++++++++++++++++ lwip.spec | 7 ++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0060-optimize-avoid-too-many-empty-acks-in-tcp_input.patch diff --git a/0060-optimize-avoid-too-many-empty-acks-in-tcp_input.patch b/0060-optimize-avoid-too-many-empty-acks-in-tcp_input.patch new file mode 100644 index 0000000..0fa456e --- /dev/null +++ b/0060-optimize-avoid-too-many-empty-acks-in-tcp_input.patch @@ -0,0 +1,30 @@ +From 30f5815c847060c5ad4075e81581771b8d0cbb72 Mon Sep 17 00:00:00 2001 +From: Lemmy Huang +Date: Thu, 8 Jun 2023 15:15:07 +0800 +Subject: [PATCH] optimize: avoid too many empty acks in tcp_input + +Signed-off-by: Lemmy Huang +--- + src/core/tcp_in.c | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c +index 7e7d70ab..0abee303 100644 +--- a/src/core/tcp_in.c ++++ b/src/core/tcp_in.c +@@ -1807,11 +1807,7 @@ tcp_receive(struct tcp_pcb *pcb) + + + /* Acknowledge the segment(s). */ +- if (flags & TCP_PSH) { +- tcp_ack_now(pcb); +- } else { +- tcp_ack(pcb); +- } ++ tcp_ack(pcb); + + #if LWIP_TCP_SACK_OUT + if (LWIP_TCP_SACK_VALID(pcb, 0)) { +-- +2.22.0.windows.1 + diff --git a/lwip.spec b/lwip.spec index 534285d..0aed7cc 100644 --- a/lwip.spec +++ b/lwip.spec @@ -4,7 +4,7 @@ Summary: lwip is a small independent implementation of the TCP/IP protocol suite Name: lwip Version: 2.1.2 -Release: 39 +Release: 40 License: BSD URL: http://savannah.nongnu.org/projects/lwip/ Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip @@ -72,6 +72,7 @@ Patch9055: 0056-same-node-gazellectl-a.patch Patch9056: 0057-lwip-send-recv-thread-bind-numa.patch Patch9057: 0058-fix-last_unsent-last_unacked.patch Patch9058: 0059-lwip-add-udp-multicast.patch +Patch9059: 0060-optimize-avoid-too-many-empty-acks-in-tcp_input.patch BuildRequires: gcc-c++ dos2unix dpdk-devel @@ -148,6 +149,7 @@ find %{_builddir}/%{name}-%{version} -type f -exec dos2unix -q {} \; %patch9056 -p1 %patch9057 -p1 %patch9058 -p1 +%patch9059 -p1 %build cd %{_builddir}/%{name}-%{version}/src @@ -163,6 +165,9 @@ cd %{_builddir}/%{name}-%{version}/src %{_libdir}/liblwip.a %changelog +* Sat Jun 10 2023 Lemmy Huang - 2.1.2-40 +- optimize: avoid too many empty acks in tcp_input + * Sat May 13 2023 kircher - 2.1.2-39 - add udp multicast support in lwip