lwip/0063-optimize-avoid-too-many-empty-acks-in-tcp_input.patch
Lemmy Huang 8b6ec7eae6 optimize: avoid too many empty acks in tcp_input
Signed-off-by: Lemmy Huang <huangliming5@huawei.com>
2023-06-08 15:36:28 +08:00

31 lines
822 B
Diff

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