[Libvir] RFC [0/3]: Re-factor QEMU daemon protocol to use XDR

Richard W.M. Jones rjones at redhat.com
Wed Apr 11 12:54:52 UTC 2007

Daniel P. Berrange wrote:
> On Wed, Apr 11, 2007 at 01:01:30PM +0100, Richard W.M. Jones wrote:
>> I don't think those patches got memory allocation / deallocation of XDR 
>> structures right.  Not surprising really since it's totally 
>> undocumented!  In a bid to rectify this, I have documented how to do it 
>> here:
>> http://et.redhat.com/~rjones/xdr_tests/
> Nice. BTW on the subject of record streams - xdrrec_create - while very
> nice looking on the surface, it is utterly useless because the impl
> relies on the underlying FD / socket being in blocking mode. If you use
> non-blocking sockets marshalling/de-marshalling will fail on the first
> -EAGAIN the routines see, and they have no way to restart where they 
> left off. This is why I serialized to/from a xdrmem buffer, and then used
> my own read/write code to send to the socket where I could correctly deal
> with non-blocking mode.

Oh right - that totally passed me by.  When are you using non-blocking 
sockets?  I was under the impression they were all blocking in 
qemu_internal / libvirt_qemud.


Emerging Technologies, Red Hat  http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF     Mobile: +44 7866 314 421

Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.
Registered in England and Wales under Company Registration No. 3798903
Directors: Michael Cunningham (USA), Charlie Peters (USA) and David
Owens (Ireland)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070411/d6f66c4a/attachment-0001.bin>

More information about the libvir-list mailing list