!185 [sync] PR-183: do not update cwnd when send dataack

From: @openeuler-sync-bot 
Reviewed-by: @wu-changsheng 
Signed-off-by: @wu-changsheng
This commit is contained in:
openeuler-ci-bot 2022-12-21 11:30:36 +00:00 committed by Gitee
commit 9f6321f957
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 15 additions and 9 deletions

View File

@ -1,16 +1,16 @@
From 710841b579e1be0f6428cb71e4ebb4c90694d9b3 Mon Sep 17 00:00:00 2001
From fe99dca0fa972f3c934a91e587380f140e093306 Mon Sep 17 00:00:00 2001
From: kircher <majun65@huawei.com>
Date: Tue, 20 Dec 2022 19:06:35 +0800
Date: Wed, 21 Dec 2022 17:34:17 +0800
Subject: [PATCH] add dataack when recv too many acks with data
---
src/core/tcp_in.c | 19 +++++++++++++++++++
src/core/tcp_in.c | 22 ++++++++++++++++++++++
src/include/lwip/tcp.h | 1 +
src/include/lwipopts.h | 2 ++
3 files changed, 22 insertions(+)
3 files changed, 25 insertions(+)
diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c
index a5aebb4..88b6428 100644
index a5aebb4..9e84889 100644
--- a/src/core/tcp_in.c
+++ b/src/core/tcp_in.c
@@ -1259,6 +1259,7 @@ tcp_receive(struct tcp_pcb *pcb)
@ -21,7 +21,7 @@ index a5aebb4..88b6428 100644
LWIP_ASSERT("tcp_receive: invalid pcb", pcb != NULL);
LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED);
@@ -1336,11 +1337,28 @@ tcp_receive(struct tcp_pcb *pcb)
@@ -1336,11 +1337,31 @@ tcp_receive(struct tcp_pcb *pcb)
}
}
}
@ -33,7 +33,10 @@ index a5aebb4..88b6428 100644
+ found_dataack = 1;
+ ++pcb->dataacks;
+ if (pcb->dataacks > MAX_DATA_ACK_NUM) {
+ tcp_rexmit_fast(pcb);
+ if (tcp_rexmit(pcb) == ERR_OK) {
+ pcb->rtime = 0;
+ pcb->dataacks = 0;
+ }
+ }
+ }
+ }
@ -50,7 +53,7 @@ index a5aebb4..88b6428 100644
} else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
/* We come here when the ACK acknowledges new data. */
tcpwnd_size_t acked;
@@ -1366,6 +1384,7 @@ tcp_receive(struct tcp_pcb *pcb)
@@ -1366,6 +1387,7 @@ tcp_receive(struct tcp_pcb *pcb)
/* Reset the fast retransmit variables. */
pcb->dupacks = 0;
pcb->lastack = ackno;

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: 23
Release: 24
License: BSD
URL: http://savannah.nongnu.org/projects/lwip/
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
@ -135,6 +135,9 @@ cd %{_builddir}/%{name}-%{version}/src
%{_libdir}/liblwip.a
%changelog
* Wed Dec 21 2022 kircher<majun65@huawei.com> - 2.1.2-24
- do not update cwnd when send dataack
* Tue Dec 20 2022 kircher<majun65@huawei.com> - 2.1.2-23
- fix dataack is always lower than 256