aboutgitcodebugslistschat
path: root/util.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2025-01-17 10:10:10 +0100
committerStefano Brivio <sbrivio@redhat.com>2025-01-21 14:28:37 +0100
commit54bb972cfb2637f64a9718023a2351f8f259abdb (patch)
tree53d71b98e587ec3b278e6983f976c6c28330b090 /util.c
parent8757834d145a06b845aa0bb6bdfd4f93971b8d74 (diff)
downloadpasst-54bb972cfb2637f64a9718023a2351f8f259abdb.tar
passt-54bb972cfb2637f64a9718023a2351f8f259abdb.tar.gz
passt-54bb972cfb2637f64a9718023a2351f8f259abdb.tar.bz2
passt-54bb972cfb2637f64a9718023a2351f8f259abdb.tar.lz
passt-54bb972cfb2637f64a9718023a2351f8f259abdb.tar.xz
passt-54bb972cfb2637f64a9718023a2351f8f259abdb.tar.zst
passt-54bb972cfb2637f64a9718023a2351f8f259abdb.zip
tcp: Disable Nagle's algorithm (set TCP_NODELAY) on all sockets
Following up on 725acd111ba3 ("tcp_splice: Set (again) TCP_NODELAY on both sides"), David argues that, in general, we don't know what kind of TCP traffic we're dealing with, on any side or path. TCP segments might have been delivered to our socket with a PSH flag, but we don't have a way to know about it. Similarly, the guest might send us segments with PSH or URG set, but we don't know if we should generally TCP_CORK sockets and uncork on those flags, because that would assume they're running a Linux kernel (and a particular version of it) matching the kernel that delivers outbound packets for us. Given that we can't make any assumption and everything might very well be interactive traffic, disable Nagle's algorithm on all non-spliced sockets as well. After all, John Nagle himself is nowadays recommending that delayed ACKs should never be enabled together with his algorithm, but we don't have a practical way to ensure that our environment is free from delayed ACKs (TCP_QUICKACK is not really usable for this purpose): https://news.ycombinator.com/item?id=34180239 Suggested-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'util.c')
0 files changed, 0 insertions, 0 deletions