mirror of
https://passt.top/passt
synced 2024-12-22 13:45:32 +00:00
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>
This commit is contained in:
parent
a7eb8bb2f6
commit
7ecf693297
7
tcp.c
7
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);
|
||||
|
Loading…
Reference in New Issue
Block a user