diff options
| author | Stefano Brivio <sbrivio@redhat.com> | 2025-12-04 07:17:00 +0100 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2025-12-08 09:15:36 +0100 |
| commit | c93515c1bf93f270327cab0082dc03acb9dda625 (patch) | |
| tree | 9bc8fd92a4ded81c91d14cbecbd18548867a95a1 | |
| parent | e0f1330287fad6c09bc140ba47914ba4aed90f98 (diff) | |
| download | passt-c93515c1bf93f270327cab0082dc03acb9dda625.tar passt-c93515c1bf93f270327cab0082dc03acb9dda625.tar.gz passt-c93515c1bf93f270327cab0082dc03acb9dda625.tar.bz2 passt-c93515c1bf93f270327cab0082dc03acb9dda625.tar.lz passt-c93515c1bf93f270327cab0082dc03acb9dda625.tar.xz passt-c93515c1bf93f270327cab0082dc03acb9dda625.tar.zst passt-c93515c1bf93f270327cab0082dc03acb9dda625.zip | |
tcp: Skip redundant ACK on partial sendmsg() failure
...we'll send a duplicate ACK right away in this case, and this
redundant, earlier check is not just useless, but it might actually
be harmful as we'll now send a triple ACK which might cause two
retransmissions.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
| -rw-r--r-- | tcp.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -2027,13 +2027,10 @@ eintr: return -1; } - if (n < (int)(seq_from_tap - conn->seq_from_tap)) { + if (n < (int)(seq_from_tap - conn->seq_from_tap)) partial_send = 1; - conn->seq_from_tap += n; - tcp_send_flag(c, conn, ACK_IF_NEEDED); - } else { - conn->seq_from_tap += n; - } + + conn->seq_from_tap += n; out: if (keep != -1 || partial_send) { |
