pingpong: fix send dup ack in fast timer
(cherry picked from commit 94af3edd00fec7cddf8e1cdd8e83e1b67d4a65b5)
This commit is contained in:
parent
b9e8131f07
commit
e5a7075a0e
51
0169-pingpong-fix-send-dup-ack.patch
Normal file
51
0169-pingpong-fix-send-dup-ack.patch
Normal file
@ -0,0 +1,51 @@
|
||||
From c46244f54dba29e5a3c40ef276022994b7994f82 Mon Sep 17 00:00:00 2001
|
||||
From: jiangheng <jiangheng14@huawei.com>
|
||||
Date: Mon, 30 Sep 2024 18:13:21 +0800
|
||||
Subject: [PATCH] pingpong: fix send dup ack
|
||||
|
||||
---
|
||||
src/core/tcp.c | 11 ++++++-----
|
||||
src/core/tcp_in.c | 3 +--
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/core/tcp.c b/src/core/tcp.c
|
||||
index 4a3c031..849a210 100644
|
||||
--- a/src/core/tcp.c
|
||||
+++ b/src/core/tcp.c
|
||||
@@ -1702,13 +1702,14 @@ tcp_fasttmr_start:
|
||||
if (pcb->last_timer != tcp_timer_ctr) {
|
||||
struct tcp_pcb *next;
|
||||
pcb->last_timer = tcp_timer_ctr;
|
||||
-#if !GAZELLE_TCP_PINGPONG_MODE
|
||||
- /* send delayed ACKs */
|
||||
- if (pcb->flags & TF_ACK_DELAY) {
|
||||
-#else
|
||||
- if (!tcp_in_pingpong(pcb) || TIME_BEFORE(pcb->lrcvtime + TCP_ATO_MS, sys_now())) {
|
||||
+#if GAZELLE_TCP_PINGPONG_MODE
|
||||
+ if (tcp_in_pingpong(pcb) && TIME_BEFORE(pcb->lrcvtime + TCP_ATO_MS, sys_now())) {
|
||||
tcp_exit_pingpong(pcb);
|
||||
+ tcp_set_flags(pcb, TF_ACK_DELAY);
|
||||
+ }
|
||||
#endif
|
||||
+ /* send delayed ACKs */
|
||||
+ if (pcb->flags & TF_ACK_DELAY) {
|
||||
LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n"));
|
||||
MIB2_STATS_INC(mib2.tcpdelayackcnt);
|
||||
tcp_ack_now(pcb);
|
||||
diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c
|
||||
index 1751561..fa2a88b 100644
|
||||
--- a/src/core/tcp_in.c
|
||||
+++ b/src/core/tcp_in.c
|
||||
@@ -1767,8 +1767,7 @@ tcp_receive(struct tcp_pcb *pcb)
|
||||
/* Acknowledge the segment(s). */
|
||||
#if GAZELLE_TCP_PINGPONG_MODE
|
||||
if (tcp_in_pingpong(pcb)) {
|
||||
- tcp_clear_flags(pcb, TF_ACK_NOW);
|
||||
- tcp_set_flags(pcb, TF_ACK_DELAY);
|
||||
+ tcp_clear_flags(pcb, TF_ACK_NOW | TF_ACK_DELAY);
|
||||
} else {
|
||||
tcp_ack(pcb);
|
||||
}
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
|
||||
Name: lwip
|
||||
Version: 2.2.0
|
||||
Release: 58
|
||||
Release: 59
|
||||
License: BSD
|
||||
URL: http://savannah.nongnu.org/projects/lwip/
|
||||
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
|
||||
@ -180,6 +180,7 @@ Patch9164: 0165-LOG-modified-gazelle-log-level-and-add-item-in-mib2.patch
|
||||
Patch9165: 0166-cleancode-rename-log-level.patch
|
||||
Patch9166: 0167-lwip-add-pingpong-mode-support.patch
|
||||
Patch9167: 0168-lwip-adapt-interrupt-mode.patch
|
||||
Patch9168: 0169-pingpong-fix-send-dup-ack.patch
|
||||
|
||||
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
||||
|
||||
@ -209,6 +210,9 @@ cd %{_builddir}/%{name}-%{version}/src
|
||||
%{_libdir}/liblwip.a
|
||||
|
||||
%changelog
|
||||
* Mon Sep 30 2024 jiangheng <jiangheng14@huawei.com> - 2.2.0-59
|
||||
- pingpong: fix send dup ack in fast timer
|
||||
|
||||
* Fri Sep 27 2024 jiangheng <jiangheng14@huawei.com> - 2.2.0-58
|
||||
- adapt for interrupt mode
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user