• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From 30f5815c847060c5ad4075e81581771b8d0cbb72 Mon Sep 17 00:00:00 2001
2From: Lemmy Huang <huangliming5@huawei.com>
3Date: Thu, 8 Jun 2023 15:15:07 +0800
4Subject: [PATCH] optimize: avoid too many empty acks in tcp_input
5
6Signed-off-by: Lemmy Huang <huangliming5@huawei.com>
7---
8 src/core/tcp_in.c | 6 +-----
9 1 file changed, 1 insertion(+), 5 deletions(-)
10
11diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c
12index 7e7d70ab..0abee303 100644
13--- a/src/core/tcp_in.c
14+++ b/src/core/tcp_in.c
15@@ -1807,11 +1807,7 @@ tcp_receive(struct tcp_pcb *pcb)
16
17
18         /* Acknowledge the segment(s). */
19-        if (flags & TCP_PSH) {
20-            tcp_ack_now(pcb);
21-        } else {
22-            tcp_ack(pcb);
23-        }
24+        tcp_ack(pcb);
25
26 #if LWIP_TCP_SACK_OUT
27         if (LWIP_TCP_SACK_VALID(pcb, 0)) {
28--
292.22.0.windows.1
30
31