From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRLYD-000890-9h for qemu-devel@nongnu.org; Wed, 02 Oct 2013 08:29:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRLY7-0003cc-Fc for qemu-devel@nongnu.org; Wed, 02 Oct 2013 08:29:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRLY7-0003cQ-86 for qemu-devel@nongnu.org; Wed, 02 Oct 2013 08:29:03 -0400 Message-ID: <524C118A.90106@redhat.com> Date: Wed, 02 Oct 2013 06:28:58 -0600 From: Eric Blake MIME-Version: 1.0 References: <1380709396-6063-1-git-send-email-ottlik@fzi.de> In-Reply-To: <1380709396-6063-1-git-send-email-ottlik@fzi.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qVUsFLKBO2Ha13XXJ4OPNOux4imfdkxvI" Subject: Re: [Qemu-devel] [PATCH v6 0/5] Do not set SO_REUSEADDR on Windows List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sebastian Ottlik Cc: jan.kiszka@siemens.com, aliguori@us.ibm.com, qemu-devel@nongnu.org, stefanha@redhat.com, sw@weilnetz.de This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qVUsFLKBO2Ha13XXJ4OPNOux4imfdkxvI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 10/02/2013 04:23 AM, Sebastian Ottlik wrote: > This patchset disables most uses of SO_REUSEADDR on Windows and replace= s 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 most cases. It m= ay even > lead to situations were system behaviour is unspecified. More informati= on on > this can be found at: > http://msdn.microsoft.com/en-us/library/windows/desktop/ms740621.aspx >=20 > I originally encountered this issue when accidentally launching two QEM= U > instances with identical GDB ports at the same time. In which case QEMU= won't > fail as one might expect. >=20 > Note that patch #4 fails checkpatch.pl. This is intentional (see v3 cha= nges). >=20 > v6 Changes: > - dropped error output and the silent parameter in favor of an assertio= n >=20 > Actually I wanted to remove the return value from the function too, a= s the > assertion pretty much states that the function will not fail and thus= always > return 0. However this would make the code a little ugly to prevent u= nused > variable warnings if NDEBUG is set (see patch 1) and also would requi= re some > ugly changes to slirp/socket.c (see patch 4). Thus I decided to keep = it. >=20 > - Rebased to current master (a684f3cf9b9b9c3cb82be87aafc463de8974610c) >=20 Series: Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --qVUsFLKBO2Ha13XXJ4OPNOux4imfdkxvI 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/ iQEcBAEBCAAGBQJSTBGKAAoJEKeha0olJ0NqXMoH/ienOMaJ8QWRTqZWgQTAuxHm 2OWjcjX+ezdiwZwjgWuKnxL6EBUZw23ICBRmUyYAdpx0AozosNNmg4tuoqYFAZxX oNGNpfLzf5ztGCrVz1YwZlY1CWSPNT3DR9xpwv2S9pWkTfEhaOecrxraQg7LhXdz R4W60zsRv54wYQWyFb+yGav7thJ5eEWrOWrebka1b6VoDgbfCZM8bqpWnZsLJNn2 ETXnzrm9qw+XKdZ6wc3ddER2CBdgmNEU/fifQKHaXCWVcjZbczb2cS1eoePIExbJ SK7ufC9w2fSfY85mlnnyDL26dBLk2ZcVFDKJK59VWBmQ2UlmoAx+R3V2bGj4W5E= =Q3mW -----END PGP SIGNATURE----- --qVUsFLKBO2Ha13XXJ4OPNOux4imfdkxvI--