From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OAOQa-0006Ci-JN for qemu-devel@nongnu.org; Fri, 07 May 2010 10:21:20 -0400 Received: from [140.186.70.92] (port=54376 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OAOQZ-0006Bq-0i for qemu-devel@nongnu.org; Fri, 07 May 2010 10:21:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OAOQX-0005nu-0z for qemu-devel@nongnu.org; Fri, 07 May 2010 10:21:18 -0400 Received: from thoth.sbs.de ([192.35.17.2]:19220) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAOQW-0005na-Mi for qemu-devel@nongnu.org; Fri, 07 May 2010 10:21:16 -0400 Message-ID: <4BE421D9.30502@siemens.com> Date: Fri, 07 May 2010 16:21:13 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4BE3FD3F.4070606@siemens.com> <20100507100758.1050a374@redhat.com> In-Reply-To: <20100507100758.1050a374@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: Registering buffers with a qdict List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-devel Luiz Capitulino wrote: > On Fri, 07 May 2010 13:45:03 +0200 > Jan Kiszka wrote: > >> Hi Luiz, >> >> what is the recommended way of pushing larger buffers (up to 64K so far) >> into a qdict? QLIST of QINT (one per byte) looks a bit heavy. I thought >> about hex-encoding the content first (series of "%02X"), then >> registering it as QSTRING. Or should we introduce a new type, QBUFFER? > > I don't think that hex-encoding the contents is so bad if your use case is > very specific and isolated. The focus will be first on visualizing the buffer (user_print), but who knows what happens once the services is also exposed via QMP. > > On the other hand, I do prefer a QBuffer type, specially because we can > have buffer operations. The q.c files look sufficiently simply, guess I will add a buffer type. Still, hex-encoding is probably the best representation for QMP. Thanks, Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux