Re: [Qemu-devel] [PATCH for-2.7 2/2] net: make socket connect non-blocking again

2016-08-23 Thread Marc-André Lureau
Hi - Original Message - > On Tue, Aug 23, 2016 at 06:43:54PM +0800, Cao jin wrote: > > Hi, > > I just noticed you still using the old-style non-blocking connect(which > > will > > still block when query DNS), which will be removed (suggested by Daniel), > > but the patch is still on the wa

Re: [Qemu-devel] [PATCH for-2.7 2/2] net: make socket connect non-blocking again

2016-08-23 Thread Daniel P. Berrange
On Tue, Aug 23, 2016 at 06:43:54PM +0800, Cao jin wrote: > Hi, > I just noticed you still using the old-style non-blocking connect(which will > still block when query DNS), which will be removed (suggested by Daniel), > but the patch is still on the way. So I guess maybe you should switch to > QIOC

Re: [Qemu-devel] [PATCH for-2.7 2/2] net: make socket connect non-blocking again

2016-08-23 Thread Cao jin
Hi, I just noticed you still using the old-style non-blocking connect(which will still block when query DNS), which will be removed (suggested by Daniel), but the patch is still on the way. So I guess maybe you should switch to QIOChannel way. FYI: http://lists.nongnu.org/archive/html/qemu-de

[Qemu-devel] [PATCH for-2.7 2/2] net: make socket connect non-blocking again

2016-08-23 Thread Marc-André Lureau
Since commit 7e8449594c929, the socket connect code is blocking, because calling socket_connect() without callback is blocking. Make it non-blocking by adding a callback. Unfortunately, the callback needs many local variables that are not easy to get rid of (it can't easily create the qemu_new_net_