From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLZP2-0003L3-Gk for qemu-devel@nongnu.org; Mon, 16 Sep 2013 10:03:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLZOy-00080z-31 for qemu-devel@nongnu.org; Mon, 16 Sep 2013 10:03:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLZOx-00080g-SK for qemu-devel@nongnu.org; Mon, 16 Sep 2013 10:03:44 -0400 Message-ID: <52370FBA.8020009@redhat.com> Date: Mon, 16 Sep 2013 08:03:38 -0600 From: Eric Blake MIME-Version: 1.0 References: <1379319907-14950-1-git-send-email-ottlik@fzi.de> <1379319907-14950-3-git-send-email-ottlik@fzi.de> In-Reply-To: <1379319907-14950-3-git-send-email-ottlik@fzi.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="E6GCr0vGcgusWRXd6xUxuOXnlTriX1b2c" Subject: Re: [Qemu-devel] [PATCH v4 2/5] gdbstub: call socket_set_fast_reuse instead of setting SO_REUSEADDR List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sebastian Ottlik Cc: Jan Kiszka , Anthony Liguori , qemu-devel@nongnu.org, Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --E6GCr0vGcgusWRXd6xUxuOXnlTriX1b2c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/16/2013 02:25 AM, Sebastian Ottlik wrote: > SO_REUSEADDR should be avoided on Windows but is desired on other opera= ting > systems. So instead of setting it we call socket_set_fast_reuse that wi= ll result > in the appropriate behaviour on all operating systems. >=20 > Signed-off-by: Sebastian Ottlik > --- > gdbstub.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) >=20 > 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; > =20 > fd =3D 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 > =20 > - /* allow fast reuse */ > - val =3D 1; > - qemu_setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); > + socket_set_fast_reuse(fd, false); Changed from silent to noisy. Intentional? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --E6GCr0vGcgusWRXd6xUxuOXnlTriX1b2c Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSNw+6AAoJEKeha0olJ0NqbIcH/0VV6MsT7DGBOKiiRxtA/qcp q8yQIVvyBgV8qWpkkzDyeLOsnKj0bEgglVcNe2dkP4XY7lMzWs1Q4ByyuOWqbl8i 3sgkJVcJhOCR6OtgRH7I9ksynb5rD9fMq6KX9Y9Mv35TiLQTeNmZqDVHmbzxBHJo gIp1rsCU4YLcmiym21IQ5qshI5XwCwPZJk7TWnIprXVIA7zUISk07dxez5Oulgmd xhYmuDY7SfPgGrsdyxZhtT9qvVUgp3+bJyDruS+/iCDDpR68l7TnyzOerTjnSE3k fW6w2+IgiM6b770XeyXTX9yWfrrWNV5sDkkKDjU0wvuzIiJvmKD+K6MiNy/VItI= =9pF2 -----END PGP SIGNATURE----- --E6GCr0vGcgusWRXd6xUxuOXnlTriX1b2c--