qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 0/4] Convert non-blocking connect and fix its


From: Mao Zhongyi
Subject: Re: [Qemu-devel] [PATCH v2 0/4] Convert non-blocking connect and fix its error reporting
Date: Tue, 9 May 2017 09:26:07 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0



On 05/06/2017 12:39 AM, Daniel P. Berrange wrote:
On Wed, Apr 26, 2017 at 04:04:14PM +0800, Mao Zhongyi wrote:
v2:
* PATCH 02 reworking of patch 2 following Markus's suggestion that convert 
error_report()
  in the function called by net_socket_*_init() to Error. Also add many error 
handling
  information.
* PATCH 03 net_socket_mcast_create(), net_socket_fd_init_dgram() and 
net_socket_fd_init()
  use the function such as fprintf, perror to report an error message. Convert 
it to Error.
* PATCH 04 parse_host_port() may fail without reporting an error. Now, fix it 
to set an
  error when it fails.

FYI, I discovered that previous change

  commit 883e4f7624e10b98d16d9adaffb8b1795664d899
  Author: Marc-André Lureau <address@hidden>
  Date:   Sat Jun 18 13:24:02 2016 +0530

    Change net/socket.c to use socket_*() functions

has seriously broken the current code because net_socket_fd_init()
was not called from the right place. Fixing the current code is
somewhat painful, so I've sent a revert of that broken patch.

To demo the problem first run:

  $ ./x86_64-softmmu/qemu-system-x86_64  \
      -device e1000,id=e0,netdev=user.0,mac=DE:AD:BE:EF:AF:04 \
      -netdev socket,id=user.0,listen=:1234

and then run:

   $ ./x86_64-softmmu/qemu-system-x86_64 \
           -device e1000,id=e0,netdev=hn0,mac=DE:AD:BE:EF:AF:05 \
           -netdev socket,id=hn0,connect=localhost:1234

currently the second command fails with

  qemu-system-x86_64: -device e1000,id=e0,netdev=hn0,mac=DE:AD:BE:EF:AF:05: 
Property 'e1000.netdev' can't find value 'hn0'

and my revert fixes that. Just something for you to test with your
new patch series...

Regards,
Daniel

Hi, Daniel

According to your latest advice, run these two commands in my new
patch, the second command reported the same error.

Now, you sent a revert of that broken patch to avoid this problem.
It also means that my first patch based on socket_*() is disabled.
Currently, there is no good way to convert it use QIOchannel. So I
have an idea to use the reverted patch instead of the first of my
series, and then based on the first to fix the rest. Latter I will
convert it to QIOchannel in a separated patch. Do you think that's
ok?

Looking forward to your opinion.

Thanks
Mao






reply via email to

[Prev in Thread] Current Thread [Next in Thread]