qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] Re: Registering buffers with a qdict
Date: Mon, 10 May 2010 17:14:41 +0300	[thread overview]
Message-ID: <4BE814D1.3050209@redhat.com> (raw)
In-Reply-To: <4BE80D8C.4050609@siemens.com>

On 05/10/2010 04:43 PM, Jan Kiszka wrote:
> Avi Kivity wrote:
>    
>> On 05/10/2010 01:59 PM, Jan Kiszka wrote:
>>      
>>>    From a quick glance at the JSON spec, there is no room for a new type. I
>>> think we have to overload an existing one and convert that into a
>>> QBuffer (typically, we know the actual semantic). Hex string encoding is
>>> most compact, so I went this road.
>>>        
>> Base64 is even more compact.
>>      
> For sure, still room for improvements. There is just no encode() service
> in current qemu, so I went the lazy way so far. :)
>    

Well, if we expose these encoded buffers via QMP, we can't unlazy the 
implementation.  It becomes an ABI, so we better think (and document) 
this through.

>>> But I'm open to change it into a true
>>> type if JSON actually allows it (or we are fine with breaking it).
>>>
>>>        
>> That ruins any possibility of using a standard json encoder/decoder on
>> the other end.
>>
>>      
> That was my concern as well. Such decoders would not able to tell
> strings apart from buffers as that can only be derived from the context.
> Still, they could visualize the result and/or forward it to some libqmp
> for proper interpretation.
>    

That's fine; the documentation for a command that accepts or returns 
buffers would mention that the value is a hex (or base64) encoded string.

-- 
error compiling committee.c: too many arguments to function

      reply	other threads:[~2010-05-10 14:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-07 11:45 [Qemu-devel] Registering buffers with a qdict Jan Kiszka
2010-05-07 13:07 ` [Qemu-devel] " Luiz Capitulino
2010-05-07 14:21   ` Jan Kiszka
2010-05-07 16:59     ` Luiz Capitulino
2010-05-10 10:59       ` Jan Kiszka
2010-05-10 13:26         ` Luiz Capitulino
2010-05-10 13:28         ` Avi Kivity
2010-05-10 13:43           ` Jan Kiszka
2010-05-10 14:14             ` Avi Kivity [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BE814D1.3050209@redhat.com \
    --to=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).