From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKjz9-0007bs-VZ for qemu-devel@nongnu.org; Wed, 27 Mar 2013 02:37:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKjz5-0007Ed-5w for qemu-devel@nongnu.org; Wed, 27 Mar 2013 02:37:23 -0400 Received: from mail-bk0-x236.google.com ([2a00:1450:4008:c01::236]:53610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKjz4-0007EX-VE for qemu-devel@nongnu.org; Wed, 27 Mar 2013 02:37:19 -0400 Received: by mail-bk0-f54.google.com with SMTP id q16so1291084bkw.13 for ; Tue, 26 Mar 2013 23:37:18 -0700 (PDT) Date: Wed, 27 Mar 2013 07:37:15 +0100 From: Stefan Hajnoczi Message-ID: <20130327063715.GC13655@stefanha-thinkpad.redhat.com> References: <1364314072-2474-1-git-send-email-stefanha@redhat.com> <1364314072-2474-2-git-send-email-stefanha@redhat.com> <5151CDE9.2030101@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5151CDE9.2030101@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/4] net: ensure "socket" backend uses non-blocking fds List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Anthony Liguori , Juan Quintela , mprivozn@redhat.com, Corey Bryant , david.pravec@nethost.cz, qemu-devel@nongnu.org, Stefan Hajnoczi On Tue, Mar 26, 2013 at 10:33:45AM -0600, Eric Blake wrote: > On 03/26/2013 10:07 AM, Stefan Hajnoczi wrote: > > There are several code paths in net_init_socket() depending on how the > > socket is created: file descriptor passing, UDP multicast, TCP, or UDP. > > Some of these support both listen and connect. > > > > Not all code paths set the socket to non-blocking. This patch addresses > > the file descriptor passing and UDP cases which were missing > > socket_set_nonblock(fd) calls. > > > > I considered moving socket_set_nonblock(fd) to a central location but it > > turns out the code paths are different enough to require non-blocking at > > different places. > > Is it worth rearranging patch 3 first, so that you don't have to churn > on these newly-added lines? Will do that in v2. Stefan