From: Eric Blake <eblake@redhat.com>
To: Sebastian Ottlik <ottlik@fzi.de>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 2/5] gdbstub: call socket_set_fast_reuse instead of setting SO_REUSEADDR
Date: Mon, 16 Sep 2013 08:03:38 -0600 [thread overview]
Message-ID: <52370FBA.8020009@redhat.com> (raw)
In-Reply-To: <1379319907-14950-3-git-send-email-ottlik@fzi.de>
[-- Attachment #1: Type: text/plain, Size: 1221 bytes --]
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 systems.
>
> Signed-off-by: Sebastian Ottlik <ottlik@fzi.de>
> ---
> gdbstub.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/gdbstub.c b/gdbstub.c
> index 2b7f22b..f43291a 100644
> --- a/gdbstub.c
> +++ b/gdbstub.c
> @@ -1553,7 +1553,7 @@ static void gdb_accept(void)
> static int gdbserver_open(int port)
> {
> struct sockaddr_in sockaddr;
> - int fd, val, ret;
> + int fd, ret;
>
> fd = socket(PF_INET, SOCK_STREAM, 0);
> if (fd < 0) {
> @@ -1564,9 +1564,7 @@ static int gdbserver_open(int port)
> fcntl(fd, F_SETFD, FD_CLOEXEC);
> #endif
>
> - /* allow fast reuse */
> - val = 1;
> - qemu_setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val));
> + socket_set_fast_reuse(fd, false);
Changed from silent to noisy. Intentional?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
next prev parent reply other threads:[~2013-09-16 14:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-16 8:25 [Qemu-devel] [PATCH v4 0/5] Do not set SO_REUSEADDR on Windows Sebastian Ottlik
2013-09-16 8:25 ` [Qemu-devel] [PATCH v4 1/5] util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR Sebastian Ottlik
2013-09-16 8:25 ` [Qemu-devel] [PATCH v4 2/5] gdbstub: call socket_set_fast_reuse instead of " Sebastian Ottlik
2013-09-16 14:03 ` Eric Blake [this message]
2013-09-16 14:07 ` Sebastian Ottlik
2013-09-16 8:25 ` [Qemu-devel] [PATCH v4 3/5] net: " Sebastian Ottlik
2013-09-16 14:04 ` Eric Blake
2013-09-16 8:25 ` [Qemu-devel] [PATCH v4 4/5] slirp: " Sebastian Ottlik
2013-09-16 8:25 ` [Qemu-devel] [PATCH v4 5/5] util: " Sebastian Ottlik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52370FBA.8020009@redhat.com \
--to=eblake@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=jan.kiszka@siemens.com \
--cc=ottlik@fzi.de \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).