qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1 00/25] Monitor handlers new structure phase 1
@ 2009-08-03 16:56 Luiz Capitulino
  2009-08-03 16:56 ` [Qemu-devel] [PATCH 01/25] Introduce QEMU dictionary data type Luiz Capitulino
                   ` (25 more replies)
  0 siblings, 26 replies; 33+ messages in thread
From: Luiz Capitulino @ 2009-08-03 16:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: jan.kiszka, aliguori, avi

 Hi there,

 In the long QEMU Monitor Protocol (QMP) thread people have agreed that,
whichever protocol we are going to use, the first step that needs to be
done is to improve current Monitor's code, so that command handlers
support 'structured' input and output.

 Basically, this means that handlers will receive their input through
a dictionary (instead of the ugly args[] array) and will output their
data back to the Monitor instead of directly printing them.

 Once this is done, plugging the protocol should be simple, as handlers
will be part of the common code, working with both the human and (any)
machine protocols.

 I have divided this project in the following phases:

 1. Command handlers receive their arguments through a dictionary
 2. Create a object model for QEMU
 3. Command handlers output their data back to the Monitor
 4. Plug the protocol

 This patchset implements phase 1.

Changelog:

V0 -> V1

- Fix C standard violations
- Various renames (QDict, QDictEntry, etc)
- Remove qemu_ prefix from functions
- Drop qdict_iter() (unused right now)
- Fix some unneeded int to long type changes

^ permalink raw reply	[flat|nested] 33+ messages in thread
* [Qemu-devel] [PATCH 00/25] Monitor handlers new structure phase 1
@ 2009-07-28 22:04 Luiz Capitulino
  2009-07-28 22:04 ` [Qemu-devel] [PATCH 11/25] monitor: Port handler_2 to use the dictionary Luiz Capitulino
  0 siblings, 1 reply; 33+ messages in thread
From: Luiz Capitulino @ 2009-07-28 22:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: jan.kiszka, aliguori, dlaor, avi

 Hi there,

 In the long QEMU Monitor Protocol (QMP) thread people have agreed that,
whichever protocol we are going to use, the first step that needs to be
done is to improve current Monitor's code, so that command handlers
support 'structured' input and output.

 Basically, this means that handlers will receive their input through
a dictionary (instead of the ugly args[] array) and will output their
data back to the Monitor instead of directly printing them.

 Once this is done, plugging the protocol should be simple, as handlers
will be part of the common code, working with both the human and (any)
machine protocols.

 I have divided this project in the following (obvious) phases:

 1. Command handlers receive their arguments through a dictionary
 2. Command handlers output their data back to the Monitor
 3. Plug the protocol

 This patchset implements phase 1. The next phase is already on the
way and I should submit patches as soon as this series is merged.

 Something worth to mention is that I have implemented unit-tests for
most of the new code (dictionary and Monitor's parsing). To this end,
I'm using a unit-test framework called check:

http://check.sourceforge.net

 In this patchset, however, I'm only merging the dictionary suite, because
I have had issues in getting the Monitor's one building (I have an off tree
version that works, though).

 Also, I have some important words regarding the _porting_ of commands:

 o Each patch ports a set of handlers according to their number of
   arguments (this is how the Monitor currently handles them)

 o I'm not 100% confident with regard to the type conversion needed to
   store integers in the dictionary, please review

 o As argments have been moved 'inside' the hanlders, some of them got
   a bit ugly and I didn't want to fix them in this series

 o The porting work (as all this series) has been done in way that the
   tree always builds and works

---

 Makefile            |    6 +
 check-qdict.c       |  289 +++
 configure           |   32 +
 console.h           |    3 +-
 hw/pci-hotplug.c    |   15 +-
 migration.c         |   12 +-
 migration.h         |    9 +-
 monitor.c           |  480 +++--
 monitor.h           |    1 +
 net.c               |   29 +-
 net.h               |   13 +-
 qdict-test-data.txt | 4999 +++++++++++++++++++++++++++++++++++++++++++++++++++
 qemu-dict.c         |  215 +++
 qemu-dict.h         |   36 +
 qemu-monitor.hx     |  109 +-
 savevm.c            |   13 +-
 sysemu.h            |   18 +-
 vl.c                |   13 +-
 18 files changed, 5996 insertions(+), 296 deletions(-)

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

end of thread, other threads:[~2009-08-10 20:59 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-03 16:56 [Qemu-devel] [PATCH v1 00/25] Monitor handlers new structure phase 1 Luiz Capitulino
2009-08-03 16:56 ` [Qemu-devel] [PATCH 01/25] Introduce QEMU dictionary data type Luiz Capitulino
2009-08-03 16:56 ` [Qemu-devel] [PATCH 02/25] net: Fix do_set_link() return type Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 03/25] Add wrappers to functions used by the Monitor Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 04/25] monitor: Document missing supported argument types Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 05/25] monitor: New format for handlers " Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 06/25] monitor: Setup a dictionary with handler arguments Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 07/25] monitor: Export qdict.h header Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 08/25] monitor: New GET_TLONG and GET_TPHYSADDR macros Luiz Capitulino
2009-08-04 17:27   ` Blue Swirl
2009-08-04 19:42     ` Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 09/25] monitor: Port handler_0 to use the dictionary Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 10/25] monitor: Port handler_1 " Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 11/25] monitor: Port handler_2 " Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 12/25] monitor: Port handler_3 " Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 13/25] monitor: Port handler_4 " Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 14/25] monitor: Port handler_5 " Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 15/25] monitor: Port handler_6 " Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 16/25] monitor: Port handler_7 " Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 17/25] monitor: Drop handler_8 and handler_9 handling Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 18/25] monitor: Port handler_10 to use the dictionary Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 19/25] monitor: Split monitor_handle_command() Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 20/25] monitor: Add a new index for str_allocated[] Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 21/25] monitor: Drop args[] from monitor_parse_command() Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 22/25] monitor: Drop 'nb_args' " Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 23/25] Add check support Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 24/25] Introduce dictionary test data file Luiz Capitulino
2009-08-03 16:57 ` [Qemu-devel] [PATCH 25/25] Introduce QDict unit-tests Luiz Capitulino
2009-08-10 20:17 ` [Qemu-devel] [PATCH v1 00/25] Monitor handlers new structure phase 1 Anthony Liguori
2009-08-10 20:42   ` Luiz Capitulino
2009-08-10 20:45     ` Anthony Liguori
2009-08-10 20:59       ` Luiz Capitulino
  -- strict thread matches above, loose matches on Subject: below --
2009-07-28 22:04 [Qemu-devel] [PATCH " Luiz Capitulino
2009-07-28 22:04 ` [Qemu-devel] [PATCH 11/25] monitor: Port handler_2 to use the dictionary Luiz Capitulino

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).