[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 2/9] slirp: disable Nagle in outgoing connections
From: |
Samuel Thibault |
Subject: |
[Qemu-devel] [PULL 2/9] slirp: disable Nagle in outgoing connections |
Date: |
Thu, 31 May 2018 21:22:30 +0200 |
From: Andreas Gustafsson <address@hidden>
When setting up an outgoing user mode networking TCP connection,
disable the Nagle algorithm in the host-side connection. Either the
guest is already doing Nagle, in which case there is no point in doing
it twice, or it has chosen to disable it, in which case we should
respect that choice.
This change speeds up GDB remote debugging over TCP over user mode
networking (with GDB runing on the guest) by multiple orders of
magnitude, and has been part of the local patches applied by pkgsrc
since 2012 with no reported ill effects.
Signed-off-by: Andreas Gustafsson <address@hidden>
Reviewed-by: Kamil Rytarowski <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>
---
slirp/tcp_subr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
index da0d53743f..8d0f94b75f 100644
--- a/slirp/tcp_subr.c
+++ b/slirp/tcp_subr.c
@@ -416,6 +416,8 @@ int tcp_fconnect(struct socket *so, unsigned short af)
socket_set_fast_reuse(s);
opt = 1;
qemu_setsockopt(s, SOL_SOCKET, SO_OOBINLINE, &opt, sizeof(opt));
+ opt = 1;
+ qemu_setsockopt(s, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt));
addr = so->fhost.ss;
DEBUG_CALL(" connect()ing")
--
2.17.0
- [Qemu-devel] [PULL 0/9] slirp updates, Samuel Thibault, 2018/05/31
- [Qemu-devel] [PULL 5/9] net/slirp: Convert atoi to qemu_strtoi to allow error checking, Samuel Thibault, 2018/05/31
- [Qemu-devel] [PULL 8/9] slirp/ncsi: add a "Get Parameters" response, Samuel Thibault, 2018/05/31
- [Qemu-devel] [PULL 7/9] slirp/ncsi: fix "Get Version ID" payload length, Samuel Thibault, 2018/05/31
- [Qemu-devel] [PULL 6/9] slirp: Send window updates to guest after window was closed, Samuel Thibault, 2018/05/31
- [Qemu-devel] [PULL 4/9] slirp/debug: Print IP addresses in human readable form, Samuel Thibault, 2018/05/31
- [Qemu-devel] [PULL 1/9] slirp: Add domainname option to slirp's DHCP server, Samuel Thibault, 2018/05/31
- [Qemu-devel] [PULL 2/9] slirp: disable Nagle in outgoing connections,
Samuel Thibault <=
- [Qemu-devel] [PULL 9/9] slirp/ncsi: add checksum support, Samuel Thibault, 2018/05/31
- [Qemu-devel] [PULL 3/9] slirp: disable Nagle in ingoing connections, Samuel Thibault, 2018/05/31
- Re: [Qemu-devel] [PULL 0/9] slirp updates, no-reply, 2018/05/31