31 lines
820 B
Diff
31 lines
820 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 a952903..59e854c 100644
|
|
--- a/src/core/tcp_in.c
|
|
+++ b/src/core/tcp_in.c
|
|
@@ -1780,11 +1780,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
|
|
|