qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] net: Make -netdev socket,listen= work
@ 2012-07-20 13:25 Stefan Hajnoczi
  2012-07-20 13:25 ` [Qemu-devel] [PATCH 1/2] net: fix the coding style Stefan Hajnoczi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2012-07-20 13:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Zhi Yong Wu

The socket backend does not support the listen= option with -netdev.  The
problem is how the socket NetClientState lifecycle is implemented: the socket
backend waits for an incoming client connection before creating a
NetClientState.  The guest -device wants a peer= on startup, so QEMU fails with
an error about the non-existent peer.

This series makes -netdev socket,listen= work by creating the NetClientState
right away.  This allows -device peer= to find the socket backend.

This code was written by Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>.  I have only
cleaned up and tested it.  The following work:
 * -net socket,listen=:1234 -net nic,model=virtio
 * -netdev socket,listen=:1234,id=netdev0 -device virtio-net-pci,netdev=netdev0

Zhi Yong Wu (2):
  net: fix the coding style
  net: add the support for -netdev socket, listen

 net/socket.c |   82 +++++++++++++++++++++++++++++++++++-----------------------
 1 file changed, 50 insertions(+), 32 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-31 13:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-20 13:25 [Qemu-devel] [PATCH 0/2] net: Make -netdev socket,listen= work Stefan Hajnoczi
2012-07-20 13:25 ` [Qemu-devel] [PATCH 1/2] net: fix the coding style Stefan Hajnoczi
2012-07-20 13:25 ` [Qemu-devel] [PATCH 2/2] net: add the support for -netdev socket, listen Stefan Hajnoczi
2012-07-31 13:31 ` [Qemu-devel] [PATCH 0/2] net: Make -netdev socket,listen= work Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).