[Qemu-devel] [PATCH v6 3/5] net: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-10-02 Thread Sebastian Ottlik
sockets listen on the same ip and port and we should set SO_REUSEADDR on windows. Signed-off-by: Sebastian Ottlik --- net/socket.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/net/socket.c b/net/socket.c index e61309d..fb21e20 100644 --- a/net

[Qemu-devel] [PATCH v6 5/5] util: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-10-02 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik --- util/qemu-sockets.c |6 +++--- 1 file

[Qemu-devel] [PATCH v6 4/5] slirp: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-10-02 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik --- slirp/misc.c |3 +-- slirp/socket.c

[Qemu-devel] [PATCH v6 1/5] util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR

2013-10-02 Thread Sebastian Ottlik
NDEBUG is defined. Signed-off-by: Sebastian Ottlik --- include/qemu/sockets.h |1 + util/oslib-posix.c | 12 util/oslib-win32.c | 10 ++ 3 files changed, 23 insertions(+) diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index c5174d7..45588d7

[Qemu-devel] [PATCH v6 2/5] gdbstub: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-10-02 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik --- gdbstub.c |6 ++ 1 file changed, 2

[Qemu-devel] [PATCH v6 0/5] Do not set SO_REUSEADDR on Windows

2013-10-02 Thread Sebastian Ottlik
This patchset disables most uses of SO_REUSEADDR on Windows and replaces it with calls to the new function socket_set_fast_reuse. On Windows systems the default behaviour is equivalent to SO_REUSEADDR on other operating systems. SO_REUSEADDR can still be set but results in undesired behaviour in mo

Re: [Qemu-devel] [PATCH v5 0/5] Do not set SO_REUSEADDR on Windows

2013-10-01 Thread Sebastian Ottlik
On 23.09.2013 12:33, Sebastian Ottlik wrote: On 18.09.2013 18:58, Stefan Weil wrote: Am 16.09.2013 17:10, schrieb Sebastian Ottlik: On 16.09.2013 16:55, Paolo Bonzini wrote: Il 16/09/2013 16:23, Sebastian Ottlik ha scritto: - Added the silent flag to socket_set_fast_reuse controlling error

Re: [Qemu-devel] [PATCH v5 0/5] Do not set SO_REUSEADDR on Windows

2013-09-23 Thread Sebastian Ottlik
On 18.09.2013 18:58, Stefan Weil wrote: Am 16.09.2013 17:10, schrieb Sebastian Ottlik: On 16.09.2013 16:55, Paolo Bonzini wrote: Il 16/09/2013 16:23, Sebastian Ottlik ha scritto: - Added the silent flag to socket_set_fast_reuse controlling error reporting One location where SO_REUSEADDR

Re: [Qemu-devel] [PATCH v5 0/5] Do not set SO_REUSEADDR on Windows

2013-09-16 Thread Sebastian Ottlik
On 16.09.2013 16:55, Paolo Bonzini wrote: Il 16/09/2013 16:23, Sebastian Ottlik ha scritto: - Added the silent flag to socket_set_fast_reuse controlling error reporting One location where SO_REUSEADDR was set would report errors if setting the option failed. Keeping the reporting code

[Qemu-devel] [PATCH v5 1/5] util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR

2013-09-16 Thread Sebastian Ottlik
setting SO_REUSEADDR do not report errors, this behaviour can be controlled with the silent flag. Signed-off-by: Sebastian Ottlik --- include/qemu/sockets.h |1 + util/oslib-posix.c | 14 ++ util/oslib-win32.c | 10 ++ 3 files changed, 25 insertions(+) diff

[Qemu-devel] [PATCH v5 2/5] gdbstub: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-16 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik --- gdbstub.c |6 ++ 1 file changed, 2

[Qemu-devel] [PATCH v5 4/5] slirp: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-16 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik --- slirp/misc.c |3 +-- slirp/socket.c

[Qemu-devel] [PATCH v5 5/5] util: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-16 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik --- util/qemu-sockets.c |6 +++--- 1 file

[Qemu-devel] [PATCH v5 3/5] net: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-16 Thread Sebastian Ottlik
sockets listen on the same ip and port and we should set SO_REUSEADDR on windows. Signed-off-by: Sebastian Ottlik --- net/socket.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/net/socket.c b/net/socket.c index e61309d..e1c7b27 100644 --- a/net

[Qemu-devel] [PATCH v5 0/5] Do not set SO_REUSEADDR on Windows

2013-09-16 Thread Sebastian Ottlik
This patchset disables most uses of SO_REUSEADDR on Windows and replaces it with calls to the new function socket_set_fast_reuse. On Windows systems the default behaviour is equivalent to SO_REUSEADDR on other operating systems. SO_REUSEADDR can still be set but results in undesired behaviour in mo

Re: [Qemu-devel] [PATCH v4 2/5] gdbstub: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-16 Thread Sebastian Ottlik
On 16.09.2013 16:03, Eric Blake wrote: On 09/16/2013 02:25 AM, Sebastian Ottlik wrote: SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating

[Qemu-devel] [PATCH v4 1/5] util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR

2013-09-16 Thread Sebastian Ottlik
setting SO_REUSEADDR do not report errors, this behaviour can be controlled with the silent flag. Signed-off-by: Sebastian Ottlik --- include/qemu/sockets.h |1 + util/oslib-posix.c | 14 ++ util/oslib-win32.c | 10 ++ 3 files changed, 25 insertions(+) diff

[Qemu-devel] [PATCH v4 5/5] util: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-16 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik --- util/qemu-sockets.c |6 +++--- 1 file

[Qemu-devel] [PATCH v4 0/5] Do not set SO_REUSEADDR on Windows

2013-09-16 Thread Sebastian Ottlik
This patchset disables most uses of SO_REUSEADDR on Windows and replaces it with calls to the new function socket_set_fast_reuse. On Windows systems the default behaviour is equivalent to SO_REUSEADDR on other operating systems. SO_REUSEADDR can still be set but results in undesired behaviour in mo

[Qemu-devel] [PATCH v4 2/5] gdbstub: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-16 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik --- gdbstub.c |6 ++ 1 file changed, 2

[Qemu-devel] [PATCH v4 4/5] slirp: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-16 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik --- slirp/misc.c |3 +-- slirp/socket.c

[Qemu-devel] [PATCH v4 3/5] net: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-16 Thread Sebastian Ottlik
sockets listen on the same ip and port and we should set SO_REUSEADDR on windows. Signed-off-by: Sebastian Ottlik --- net/socket.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/net/socket.c b/net/socket.c index e61309d..7aea015 100644 --- a/net

Re: [Qemu-devel] [PATCH v3 1/5] util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR

2013-09-10 Thread Sebastian Ottlik
On 10.09.2013 18:34, Eric Blake wrote: On 09/10/2013 10:23 AM, Sebastian Ottlik wrote: +if (ret < 0) { +perror("setsockopt(SOL_SOCKET, SO_REUSEADDR)"); +} This would be the first use of perror in this file; I'm not sure if that is the right function, or if

Re: [Qemu-devel] [PATCH v3 1/5] util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR

2013-09-10 Thread Sebastian Ottlik
On 10.09.2013 17:56, Eric Blake wrote: On 09/10/2013 07:26 AM, Sebastian Ottlik wrote: If a socket is closed it remains in TIME_WAIT state for some time. On operating systems using BSD sockets the endpoint of the socket may not be reused while in this state unless SO_REUSEADDR was set on the

[Qemu-devel] [PATCH v3 5/5] util: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-10 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik --- util/qemu-sockets.c |6 +++--- 1 file

[Qemu-devel] [PATCH v3 3/5] net: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-10 Thread Sebastian Ottlik
sockets listen on the same ip and port an we should set SO_REUSEADDR on windows. Signed-off-by: Sebastian Ottlik --- net/socket.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/net/socket.c b/net/socket.c index e61309d..56218ce 100644 --- a/net/socket.c

[Qemu-devel] [PATCH v3 1/5] util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR

2013-09-10 Thread Sebastian Ottlik
the right thing on all operating systems. Signed-off-by: Sebastian Ottlik --- include/qemu/sockets.h |1 + util/oslib-posix.c | 14 ++ util/oslib-win32.c | 10 ++ 3 files changed, 25 insertions(+) diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h

[Qemu-devel] [PATCH v3 2/5] gdbstub: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-10 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik --- gdbstub.c |6 ++ 1 file changed, 2

[Qemu-devel] [PATCH v3 4/5] slirp: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-10 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik --- slirp/misc.c |3 +-- slirp/socket.c

[Qemu-devel] [PATCH v3 0/5] Do not set SO_REUSEADDR on Windows

2013-09-10 Thread Sebastian Ottlik
This patchset disabels all use of SO_REUSEADDR on Windows. On Windows systems the default behaviour is equivalent to SO_REUSEADDR on other operating systems. SO_REUSEADDR can still be set but results in undesired behaviour instead. It may even lead to situations were system behaviour is unspecified

Re: [Qemu-devel] [PATCH v2 0/5] Do not set SO_REUSEADDR on Windows

2013-09-09 Thread Sebastian Ottlik
On 09.09.2013 14:05, Stefan Hajnoczi wrote: On Thu, Sep 05, 2013 at 03:48:16PM +0200, Sebastian Ottlik wrote: On 04.09.2013 19:08, Sebastian Ottlik wrote: This patchset disabels all use of SO_REUSEADDR on Windows. On Windows systems the default behaviour is equivalent to SO_REUSEADDR on other

Re: [Qemu-devel] [PATCH v2 0/5] Do not set SO_REUSEADDR on Windows

2013-09-05 Thread Sebastian Ottlik
On 04.09.2013 19:08, Sebastian Ottlik wrote: This patchset disabels all use of SO_REUSEADDR on Windows. On Windows systems the default behaviour is equivalent to SO_REUSEADDR on other operating systems. SO_REUSEADDR can still be set but results in undesired behaviour instead. It may even lead to

[Qemu-devel] [PATCH v2 1/5] util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR

2013-09-04 Thread Sebastian Ottlik
the right thing on all operating systems. Signed-off-by: Sebastian Ottlik diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index c5174d7..45588d7 100644 --- a/include/qemu/sockets.h +++ b/include/qemu/sockets.h @@ -39,6 +39,7 @@ int socket_set_cork(int fd, int v); int

[Qemu-devel] [PATCH v2 0/5] Do not set SO_REUSEADDR on Windows

2013-09-04 Thread Sebastian Ottlik
This patchset disabels all use of SO_REUSEADDR on Windows. On Windows systems the default behaviour is equivalent to SO_REUSEADDR on other operating systems. SO_REUSEADDR can still be set but results in undesired behaviour instead. It may even lead to situations were system behaviour is unspecified

[Qemu-devel] [PATCH v2 3/5] net: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-04 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik diff --git a/net/socket.c b/net/socket.c index

[Qemu-devel] [PATCH v2 4/5] slirp: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-04 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik diff --git a/slirp/misc.c b/slirp/misc.c index

[Qemu-devel] [PATCH v2 2/5] gdbstub: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-04 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik diff --git a/gdbstub.c b/gdbstub.c index 2b7f22b

[Qemu-devel] [PATCH v2 5/5] util: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-04 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik diff --git a/util/qemu-sockets.c b/util/qemu

[Qemu-devel] [PATCH RFC 4/4] util: do not set SO_REUSEADDR on Windows

2013-09-04 Thread Sebastian Ottlik
SO_REUSEADDR on windows. Signed-off-by: Sebastian Ottlik --- util/qemu-sockets.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index 095716e..b5ea66a 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -154,8 +154,9 @@ int

[Qemu-devel] [PATCH RFC 3/4] slirp: do not set SO_REUSEADDR on Windows

2013-09-04 Thread Sebastian Ottlik
SO_REUSEADDR on windows. Signed-off-by: Sebastian Ottlik --- slirp/misc.c |2 ++ slirp/tcp_subr.c |4 slirp/udp.c |2 ++ 3 files changed, 8 insertions(+) diff --git a/slirp/misc.c b/slirp/misc.c index c0d4899..fe9c1c3 100644 --- a/slirp/misc.c +++ b/slirp/misc.c @@ -212,8

[Qemu-devel] [PATCH RFC 1/4] gdbstub: do not set SO_REUSEADDR on Windows

2013-09-04 Thread Sebastian Ottlik
SO_REUSEADDR on windows. Signed-off-by: Sebastian Ottlik --- gdbstub.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index 2b7f22b..3d60acf 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1565,8 +1565,10 @@ static int gdbserver_open(int port) #endif /* allow fast reuse

[Qemu-devel] [PATCH RFC 2/4] net: do not set SO_REUSEADDR on Windows

2013-09-04 Thread Sebastian Ottlik
SO_REUSEADDR on windows. Signed-off-by: Sebastian Ottlik --- net/socket.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/net/socket.c b/net/socket.c index e61309d..f44ebcb 100644 --- a/net/socket.c +++ b/net/socket.c @@ -262,12 +262,14 @@ static int net_socket_mcast_create(struct sockaddr_in

[Qemu-devel] [PATCH RFC] Do not set SO_REUSEADDR on Windows

2013-09-04 Thread Sebastian Ottlik
This patchset disabels all use of SO_REUSEADDR on Windows. On Windows systems the default behavior is equivalent to SO_REUSEADDR on other operating systems. SO_REUSEADDR can still be set but results in undesired bahvior instead. It may even lead to situations were system behavior is unspecified. Mo

Re: [Qemu-devel] [PATCH RFC] Do not set SO_REUSEADDR on Windows

2013-09-04 Thread Sebastian Ottlik
On 04.09.2013 16:27, Paolo Bonzini wrote: Il 04/09/2013 16:22, Sebastian Ottlik ha scritto: This patchset disabels all use of SO_REUSEADDR on Windows. On Windows systems the default behavior is equivalent to SO_REUSEADDR on other operating systems. SO_REUSEADDR can still be set but results in

[Qemu-devel] [PATCH] target-arm: fix ARMv7M stack alignment on reset

2013-09-04 Thread Sebastian Ottlik
hardware for binaries that rely on this behaviour. This patch fixes this issue by masking the two least significant bits when loading the SP. Signed-off-by: Sebastian Ottlik --- target-arm/cpu.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-arm/cpu.c b/target-arm