optimize: avoid too many empty acks in tcp_input

Signed-off-by: Lemmy Huang <huangliming5@huawei.com>
(cherry picked from commit 931f30870bcd21d5b65fbedf039e5fc082ecfdb2)
This commit is contained in:
Lemmy Huang 2023-06-10 19:40:46 +08:00 committed by openeuler-sync-bot
parent 6e76b4c09b
commit 74030b8fea
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From 30f5815c847060c5ad4075e81581771b8d0cbb72 Mon Sep 17 00:00:00 2001
From: Lemmy Huang <huangliming5@huawei.com>
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 <huangliming5@huawei.com>
---
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

View File

@ -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 <huangliming5@huawei.com> - 2.1.2-40
- optimize: avoid too many empty acks in tcp_input
* Sat May 13 2023 kircher <majun65@huawei.com> - 2.1.2-39
- add udp multicast support in lwip