!396 [sync] PR-395: optimize: avoid too many empty acks in tcp_input

From: @openeuler-sync-bot 
Reviewed-by: @LemmyHuang 
Signed-off-by: @LemmyHuang
This commit is contained in:
openeuler-ci-bot 2023-06-08 09:02:17 +00:00 committed by Gitee
commit f006be8c4c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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.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 <huangliming5@huawei.com> - 2.1.3-67
- optimize: avoid too many empty acks in tcp_input
* Tue Jun 06 2023 jiangheng <jiangheng14@huawei.com> - 2.1.3-66
- revert cleancode series patches