1
0
mirror of https://passt.top/passt synced 2024-12-22 21:55:22 +00:00

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>
This commit is contained in:
Stefano Brivio 2021-10-04 22:15:36 +02:00
parent ffaf1d09f2
commit 98dfe1cdf4

2
tcp.c
View File

@ -2314,7 +2314,7 @@ out:
int ack_offset = conn->seq_from_tap - conn->seq_ack_to_tap; int ack_offset = conn->seq_from_tap - conn->seq_ack_to_tap;
if (c->mode == MODE_PASTA || 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) { ack_to_tap > ACK_INTERVAL) {
tcp_send_to_tap(c, conn, psh ? FORCE_ACK : 0, now); tcp_send_to_tap(c, conn, psh ? FORCE_ACK : 0, now);
} }