aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-09-16 08:24:00 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-09-16 08:49:58 +0200
commit7ecf6932978786910f510beff99afcbf507645ff (patch)
treeceebfa6fb309d0bf6624fa48c0ed30e03f5b0644
parenta7eb8bb2f6f0cf4612ad932912fd3f681e8ebb2d (diff)
downloadpasst-7ecf6932978786910f510beff99afcbf507645ff.tar
passt-7ecf6932978786910f510beff99afcbf507645ff.tar.gz
passt-7ecf6932978786910f510beff99afcbf507645ff.tar.bz2
passt-7ecf6932978786910f510beff99afcbf507645ff.tar.lz
passt-7ecf6932978786910f510beff99afcbf507645ff.tar.xz
passt-7ecf6932978786910f510beff99afcbf507645ff.tar.zst
passt-7ecf6932978786910f510beff99afcbf507645ff.zip
pasta, tcp: Don't set TCP_CORK on spliced sockets
...throughput isn't everything: this leads (of course) to horrible latency with small, sparse messages. As a consequence, there's no need to set TCP_NODELAY either. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--tcp.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/tcp.c b/tcp.c
index 1ad1050..b398bbe 100644
--- a/tcp.c
+++ b/tcp.c
@@ -2380,19 +2380,14 @@ static int tcp_splice_connect(struct ctx *c, struct tcp_splice_conn *conn,
.sin_addr = { .s_addr = htonl(INADDR_LOOPBACK) },
};
const struct sockaddr *sa;
- int ret, one = 1;
socklen_t sl;
+ int ret;
if (sock_conn < 0)
return -errno;
conn->to = sock_conn;
- setsockopt(conn->from, SOL_TCP, TCP_CORK, &one, sizeof(one));
- setsockopt(conn->from, SOL_TCP, TCP_NODELAY, &one, sizeof(one));
- setsockopt(conn->to, SOL_TCP, TCP_CORK, &one, sizeof(one));
- setsockopt(conn->to, SOL_TCP, TCP_NODELAY, &one, sizeof(one));
-
if (v6) {
sa = (struct sockaddr *)&addr6;
sl = sizeof(addr6);