aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-10-04 22:15:36 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-10-04 22:21:21 +0200
commit98dfe1cdf499fd0aa0b123dce31389ab56924baf (patch)
treed50975aee1e301ed61b60b43a5e9d94c0c22e6e0
parentffaf1d09f233f8f581593d64b7949b2048270e5a (diff)
downloadpasst-98dfe1cdf499fd0aa0b123dce31389ab56924baf.tar
passt-98dfe1cdf499fd0aa0b123dce31389ab56924baf.tar.gz
passt-98dfe1cdf499fd0aa0b123dce31389ab56924baf.tar.bz2
passt-98dfe1cdf499fd0aa0b123dce31389ab56924baf.tar.lz
passt-98dfe1cdf499fd0aa0b123dce31389ab56924baf.tar.xz
passt-98dfe1cdf499fd0aa0b123dce31389ab56924baf.tar.zst
passt-98dfe1cdf499fd0aa0b123dce31389ab56924baf.zip
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 <sbrivio@redhat.com>
-rw-r--r--tcp.c2
1 files changed, 1 insertions, 1 deletions
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);
}