From d0c16bc851174213452d611830a1623767445bcf Mon Sep 17 00:00:00 2001 From: Lemmy Huang Date: Thu, 8 Jun 2023 15:36:28 +0800 Subject: [PATCH] optimize: avoid too many empty acks in tcp_input Signed-off-by: Lemmy Huang (cherry picked from commit 8b6ec7eae6cb65020d25400113bf777d63f49436) --- ...oid-too-many-empty-acks-in-tcp_input.patch | 30 +++++++++++++++++++ lwip.spec | 7 ++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0063-optimize-avoid-too-many-empty-acks-in-tcp_input.patch diff --git a/0063-optimize-avoid-too-many-empty-acks-in-tcp_input.patch b/0063-optimize-avoid-too-many-empty-acks-in-tcp_input.patch new file mode 100644 index 0000000..0fa456e --- /dev/null +++ b/0063-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 c788d4d..2550cb6 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.3 -Release: 65 +Release: 67 License: BSD URL: http://savannah.nongnu.org/projects/lwip/ Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip @@ -74,6 +74,7 @@ Patch9058: 0059-fix-last_unsent-last_unacked.patch Patch9059: 0060-lwip-add-udp-multicast.patch Patch9060: 0061-fix-pbuf-leak-in-udp-connection.patch Patch9061: 0062-drop-netbuf-in-recv_udp-to-fix-mem-overflow.patch +Patch9062: 0063-optimize-avoid-too-many-empty-acks-in-tcp_input.patch BuildRequires: gcc-c++ dos2unix dpdk-devel @@ -152,6 +153,7 @@ find %{_builddir}/%{name}-%{version} -type f -exec dos2unix -q {} \; %patch9059 -p1 %patch9060 -p1 %patch9061 -p1 +%patch9062 -p1 %build cd %{_builddir}/%{name}-%{version}/src @@ -167,6 +169,9 @@ cd %{_builddir}/%{name}-%{version}/src %{_libdir}/liblwip.a %changelog +* Thu Jun 07 2023 Lemmy Huang - 2.1.3-67 +- optimize: avoid too many empty acks in tcp_input + * Tue Jun 06 2023 jiangheng - 2.1.3-66 - revert cleancode series patches