Re: [Qemu-devel] [PATCH] slirp: disable Nagle in outgoing connections

2018-03-07 Thread Samuel Thibault
Philippe Mathieu-Daudé, on mer. 07 mars 2018 19:57:28 -0300, wrote:
> Reviewed-by: Philippe Mathieu-Daudé 

Thanks!



Re: [Qemu-devel] [PATCH] slirp: disable Nagle in outgoing connections

2018-03-07 Thread Philippe Mathieu-Daudé
On 03/07/2018 07:34 PM, Samuel Thibault wrote:
> Hello,
> 
> Thanks for the Cc.
> 
> I have applied it to my tree.  I don't think there is any reason to
> avoid the same change for ingoing connections?  Could one of your review
> the attached patch doing it?

attached patch:
Reviewed-by: Philippe Mathieu-Daudé 

> 
> Samuel
> 



Re: [Qemu-devel] [PATCH] slirp: disable Nagle in outgoing connections

2018-03-07 Thread Samuel Thibault
Hello,

Thanks for the Cc.

I have applied it to my tree.  I don't think there is any reason to
avoid the same change for ingoing connections?  Could one of your review
the attached patch doing it?

Samuel
commit 99a9a5028e0e15aa3b17d6f884c1e5f48dccea90
Author: Samuel Thibault 
Date:   Wed Mar 7 23:29:41 2018 +0100

slirp: disable Nagle in ingoing connections

This follows 3929766fb3e4 ('slirp: disable Nagle in outgoing connections'):
for the same reasons, ingoing connections should have the Nagle algorithm 
disabled.

Signed-off-by: Samuel Thibault 

diff --git a/slirp/socket.c b/slirp/socket.c
index cb7b5b608d..81f67b5702 100644
--- a/slirp/socket.c
+++ b/slirp/socket.c
@@ -754,6 +754,8 @@ tcp_listen(Slirp *slirp, uint32_t haddr, u_int hport, 
uint32_t laddr,
return NULL;
}
qemu_setsockopt(s, SOL_SOCKET, SO_OOBINLINE, , sizeof(int));
+   opt = 1;
+   qemu_setsockopt(s, IPPROTO_TCP, TCP_NODELAY, , sizeof(int));
 
getsockname(s,(struct sockaddr *),);
so->so_ffamily = AF_INET;


Re: [Qemu-devel] [PATCH] slirp: disable Nagle in outgoing connections

2018-03-07 Thread Kamil Rytarowski
On 07.03.2018 10:38, Philippe Mathieu-Daudé wrote:
> On 03/07/2018 06:13 AM, Kamil Rytarowski wrote:
>> This patch is correct. LLDB expects 1sec for reply, GDB by default 2.
>>
>> Debuggers use this option to disable Nagle algorithm in order to quickly
>> transfer messages between gdb-server and gdb-client. It's also fairy
>> portable across systems.
>>
>> On 04.01.2018 18:56, Andreas Gustafsson wrote:
>>> slirp: disable Nagle in outgoing connections
>>>
>>> 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 
>>
>> Signed-off-by: Kamil Rytarowski 
> 
> I suppose you meant "Reviewed-by: Kamil Rytarowski "
> 

Correct!

> Reviewed-by: Philippe Mathieu-Daudé 
>



signature.asc
Description: OpenPGP digital signature


Re: [Qemu-devel] [PATCH] slirp: disable Nagle in outgoing connections

2018-03-07 Thread Philippe Mathieu-Daudé
On 03/07/2018 06:13 AM, Kamil Rytarowski wrote:
> This patch is correct. LLDB expects 1sec for reply, GDB by default 2.
> 
> Debuggers use this option to disable Nagle algorithm in order to quickly
> transfer messages between gdb-server and gdb-client. It's also fairy
> portable across systems.
> 
> On 04.01.2018 18:56, Andreas Gustafsson wrote:
>> slirp: disable Nagle in outgoing connections
>>
>> 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 
> 
> Signed-off-by: Kamil Rytarowski 

I suppose you meant "Reviewed-by: Kamil Rytarowski "

Reviewed-by: Philippe Mathieu-Daudé 

> 
>> ---
>>  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, , sizeof(opt));
>> +opt = 1;
>> +qemu_setsockopt(s, IPPROTO_TCP, TCP_NODELAY, , sizeof(opt));
>>  
>>  addr = so->fhost.ss;
>>  DEBUG_CALL(" connect()ing")
>>
> 
> 



signature.asc
Description: OpenPGP digital signature


Re: [Qemu-devel] [PATCH] slirp: disable Nagle in outgoing connections

2018-03-07 Thread Kamil Rytarowski
This patch is correct. LLDB expects 1sec for reply, GDB by default 2.

Debuggers use this option to disable Nagle algorithm in order to quickly
transfer messages between gdb-server and gdb-client. It's also fairy
portable across systems.

On 04.01.2018 18:56, Andreas Gustafsson wrote:
> slirp: disable Nagle in outgoing connections
> 
> 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 

Signed-off-by: Kamil Rytarowski 

> ---
>  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, , sizeof(opt));
> +opt = 1;
> +qemu_setsockopt(s, IPPROTO_TCP, TCP_NODELAY, , sizeof(opt));
>  
>  addr = so->fhost.ss;
>  DEBUG_CALL(" connect()ing")
> 




signature.asc
Description: OpenPGP digital signature