From 98dfe1cdf499fd0aa0b123dce31389ab56924baf Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Mon, 4 Oct 2021 22:15:36 +0200 Subject: tcp: Check pending ACK every two thirds of window, not every half ...to spare some syscalls. If it's not enough, the timer will take care of it. Signed-off-by: Stefano Brivio --- tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcp.c b/tcp.c index 181c67c..3d52106 100644 --- a/tcp.c +++ b/tcp.c @@ -2314,7 +2314,7 @@ out: int ack_offset = conn->seq_from_tap - conn->seq_ack_to_tap; if (c->mode == MODE_PASTA || - psh || SEQ_GE(ack_offset, conn->wnd_to_tap / 2) || + psh || SEQ_GE(ack_offset, conn->wnd_to_tap * 2 / 3) || ack_to_tap > ACK_INTERVAL) { tcp_send_to_tap(c, conn, psh ? FORCE_ACK : 0, now); } -- cgit v1.2.3