All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP
@ 2010-04-08 20:16 Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 01/22] QObject API: add qdict_to_qstring() function Miguel Di Ciurcio Filho
                   ` (22 more replies)
  0 siblings, 23 replies; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

The VLANClientState structure has the member info_str, a simple string that
is filled with information about NIC devices and used on monitor calls.

There is no coherent formatting of this string by all the NIC devices, 
making it difficult to parse and represent this information over QMP.

Patch 01 adds a new function qdict_to_qstring().

Patch 02 replaces the function qemu_nic_format_info_str by
qemu_nic_format_info_dict, adds a new QDict member to
VLANClientState named info_dict.

Patches 03-21 updates all devices to feed information into the new QDict.

Patch 22 converts the 'info network' monitor command to QObject, enabling QMP
support.

Regards,

Miguel

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

* [Qemu-devel] [PATCH 01/22] QObject API: add qdict_to_qstring() function
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-09 17:26   ` [Qemu-devel] " Luiz Capitulino
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 02/22] net: replace qemu_nic_format_info_str and VLANClientState->info_str by QDicts Miguel Di Ciurcio Filho
                   ` (21 subsequent siblings)
  22 siblings, 1 reply; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

This is a helper function that converts a QDict to a QString, using the format:

key1=value1 SPACE key2=value2 SPACE key3=value3

Handy for debugging and other things.

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 qdict.c |   39 +++++++++++++++++++++++++++++++++++++++
 qdict.h |    3 +++
 2 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/qdict.c b/qdict.c
index aae57bf..ca1a60b 100644
--- a/qdict.c
+++ b/qdict.c
@@ -324,6 +324,45 @@ void qdict_iter(const QDict *qdict,
     }
 }
 
+void qdict_to_qstring_iter(const char *key, QObject *obj, void *opaque)
+{
+    QString *str = opaque;
+    
+    qstring_append(str, key);
+    qstring_append(str, "=");
+    switch (qobject_type(obj)) {
+    case QTYPE_QSTRING:
+        qstring_append(str, qstring_get_str(qobject_to_qstring(obj)));
+        break;
+    case QTYPE_QINT:
+        qstring_append_int(str, qint_get_int(qobject_to_qint(obj)));
+        break;
+    case QTYPE_QBOOL:
+        qstring_append(str, qbool_get_int(qobject_to_qbool(obj)) ? "true" :
+        "false" );
+        break;
+    default:
+        qstring_append(str, "NULL");
+    }
+
+    qstring_append(str, " ");
+}
+
+/**
+ * qdict_to_qstring(): Format a string with the keys and values of a QDict
+ *
+ * Return a pointer to a QString, with the following format:
+ *    key1=value1 SPACE key2=value2 SPACE key3=value3
+ */
+QString *qdict_to_qstring(const QDict *qdict)
+{
+    QString *str;
+    str = qstring_new();
+    qdict_iter(qdict, qdict_to_qstring_iter, str);
+
+    return str;
+}
+
 /**
  * qentry_destroy(): Free all the memory allocated by a QDictEntry
  */
diff --git a/qdict.h b/qdict.h
index 579dcdd..6731555 100644
--- a/qdict.h
+++ b/qdict.h
@@ -3,6 +3,7 @@
 
 #include "qobject.h"
 #include "qlist.h"
+#include "qstring.h"
 #include "qemu-queue.h"
 #include <stdint.h>
 
@@ -43,6 +44,8 @@ int qdict_get_bool(const QDict *qdict, const char *key);
 QList *qdict_get_qlist(const QDict *qdict, const char *key);
 QDict *qdict_get_qdict(const QDict *qdict, const char *key);
 const char *qdict_get_str(const QDict *qdict, const char *key);
+void qdict_to_qstring_iter(const char *key, QObject *obj, void *opaque);
+QString *qdict_to_qstring(const QDict *qdict);
 int64_t qdict_get_try_int(const QDict *qdict, const char *key,
                           int64_t err_value);
 const char *qdict_get_try_str(const QDict *qdict, const char *key);
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 02/22] net: replace qemu_nic_format_info_str and VLANClientState->info_str by QDicts
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 01/22] QObject API: add qdict_to_qstring() function Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-09 17:41   ` [Qemu-devel] " Luiz Capitulino
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 03/22] net: dp8393x: replace qemu_format_nic_info_str by qemu_format_nic_info_dict Miguel Di Ciurcio Filho
                   ` (20 subsequent siblings)
  22 siblings, 1 reply; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

There is no standard format when formatting info_str, so it is difficult
to extract information and transmit it over QMP.

This patch changes info_str from a simple string to a QDict.

Patches that convert the devices to this new format will follow.

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 net.c |   14 ++++++++++----
 net.h |    4 ++--
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/net.c b/net.c
index 3ede738..ad01732 100644
--- a/net.c
+++ b/net.c
@@ -35,6 +35,8 @@
 #include "sysemu.h"
 #include "qemu-common.h"
 #include "qemu_socket.h"
+#include "qdict.h"
+#include "qstring.h"
 #include "hw/qdev.h"
 
 static QTAILQ_HEAD(, VLANState) vlans;
@@ -164,13 +166,17 @@ int parse_host_port(struct sockaddr_in *saddr, const char *str)
     return 0;
 }
 
-void qemu_format_nic_info_str(VLANClientState *vc, uint8_t macaddr[6])
+void qemu_format_nic_info_dict(VLANClientState *vc, uint8_t macaddr[6])
 {
-    snprintf(vc->info_str, sizeof(vc->info_str),
-             "model=%s,macaddr=%02x:%02x:%02x:%02x:%02x:%02x",
-             vc->model,
+    vc->info_dict = qdict_new();
+    char mac[18];
+
+    snprintf(mac, 18, "%02x:%02x:%02x:%02x:%02x:%02x",
              macaddr[0], macaddr[1], macaddr[2],
              macaddr[3], macaddr[4], macaddr[5]);
+
+    qdict_put(vc->info_dict, "macaddr", qstring_from_str(mac));
+    qdict_put(vc->info_dict, "model", qstring_from_str(vc->model));
 }
 
 void qemu_macaddr_default_if_unset(MACAddr *macaddr)
diff --git a/net.h b/net.h
index 16f19c5..b744294 100644
--- a/net.h
+++ b/net.h
@@ -65,7 +65,7 @@ struct VLANClientState {
     NetQueue *send_queue;
     char *model;
     char *name;
-    char info_str[256];
+    QDict *info_dict;
     unsigned receive_disabled : 1;
 };
 
@@ -110,7 +110,7 @@ ssize_t qemu_send_packet_async(VLANClientState *vc, const uint8_t *buf,
                                int size, NetPacketSent *sent_cb);
 void qemu_purge_queued_packets(VLANClientState *vc);
 void qemu_flush_queued_packets(VLANClientState *vc);
-void qemu_format_nic_info_str(VLANClientState *vc, uint8_t macaddr[6]);
+void qemu_format_nic_info_dict(VLANClientState *vc, uint8_t macaddr[6]);
 void qemu_macaddr_default_if_unset(MACAddr *macaddr);
 int qemu_show_nic_models(const char *arg, const char *const *models);
 void qemu_check_nic_model(NICInfo *nd, const char *model);
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 03/22] net: dp8393x: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 01/22] QObject API: add qdict_to_qstring() function Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 02/22] net: replace qemu_nic_format_info_str and VLANClientState->info_str by QDicts Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 04/22] net: e1000: " Miguel Di Ciurcio Filho
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 hw/dp8393x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/dp8393x.c b/hw/dp8393x.c
index e65e4d1..ebb41a2 100644
--- a/hw/dp8393x.c
+++ b/hw/dp8393x.c
@@ -904,7 +904,7 @@ void dp83932_init(NICInfo *nd, target_phys_addr_t base, int it_shift,
 
     s->nic = qemu_new_nic(&net_dp83932_info, &s->conf, nd->model, nd->name, s);
 
-    qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
+    qemu_format_nic_info_dict(&s->nic->nc, s->conf.macaddr.a);
     qemu_register_reset(nic_reset, s);
     nic_reset(s);
 
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 04/22] net: e1000: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (2 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 03/22] net: dp8393x: replace qemu_format_nic_info_str by qemu_format_nic_info_dict Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 05/22] net: eepro100: " Miguel Di Ciurcio Filho
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 hw/e1000.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/e1000.c b/hw/e1000.c
index fd3059a..7cbff0d 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -1125,7 +1125,7 @@ static int pci_e1000_init(PCIDevice *pci_dev)
     d->nic = qemu_new_nic(&net_e1000_info, &d->conf,
                           d->dev.qdev.info->name, d->dev.qdev.id, d);
 
-    qemu_format_nic_info_str(&d->nic->nc, macaddr);
+    qemu_format_nic_info_dict(&d->nic->nc, macaddr);
     return 0;
 }
 
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 05/22] net: eepro100: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (3 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 04/22] net: e1000: " Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-09 17:42   ` [Qemu-devel] " Luiz Capitulino
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 06/22] net: ne2000: " Miguel Di Ciurcio Filho
                   ` (17 subsequent siblings)
  22 siblings, 1 reply; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 hw/eepro100.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/hw/eepro100.c b/hw/eepro100.c
index 7db6fb5..329fe15 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -47,6 +47,8 @@
 #include "pci.h"
 #include "net.h"
 #include "eeprom93xx.h"
+#include "qdict.h"
+#include "qstring.h"
 
 #define KiB 1024
 
@@ -1978,8 +1980,9 @@ static int nic_init(PCIDevice *pci_dev, uint32_t device)
     s->nic = qemu_new_nic(&net_eepro100_info, &s->conf,
                           pci_dev->qdev.info->name, pci_dev->qdev.id, s);
 
-    qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
-    TRACE(OTHER, logout("%s\n", s->nic->nc.info_str));
+    qemu_format_nic_info_dict(&s->nic->nc, s->conf.macaddr.a);
+    TRACE(OTHER, logout("%s\n",
+        qstring_get_str(qdict_to_qstring(s->nic->nc.info_dic))));
 
     qemu_register_reset(nic_reset, s);
 
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 06/22] net: ne2000: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (4 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 05/22] net: eepro100: " Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 07/22] net: pcnet: " Miguel Di Ciurcio Filho
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 hw/ne2000-isa.c |    2 +-
 hw/ne2000.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/ne2000-isa.c b/hw/ne2000-isa.c
index 03a5a1f..d5403d9 100644
--- a/hw/ne2000-isa.c
+++ b/hw/ne2000-isa.c
@@ -84,7 +84,7 @@ static int isa_ne2000_initfn(ISADevice *dev)
 
     s->nic = qemu_new_nic(&net_ne2000_isa_info, &s->c,
                           dev->qdev.info->name, dev->qdev.id, s);
-    qemu_format_nic_info_str(&s->nic->nc, s->c.macaddr.a);
+    qemu_format_nic_info_dict(&s->nic->nc, s->c.macaddr.a);
 
     return 0;
 }
diff --git a/hw/ne2000.c b/hw/ne2000.c
index 78fe14f..6a91ec0 100644
--- a/hw/ne2000.c
+++ b/hw/ne2000.c
@@ -737,7 +737,7 @@ static int pci_ne2000_init(PCIDevice *pci_dev)
 
     s->nic = qemu_new_nic(&net_ne2000_info, &s->c,
                           pci_dev->qdev.info->name, pci_dev->qdev.id, s);
-    qemu_format_nic_info_str(&s->nic->nc, s->c.macaddr.a);
+    qemu_format_nic_info_dict(&s->nic->nc, s->c.macaddr.a);
 
     if (!pci_dev->qdev.hotplugged) {
         static int loaded = 0;
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 07/22] net: pcnet: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (5 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 06/22] net: ne2000: " Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 08/22] net: lan9118: " Miguel Di Ciurcio Filho
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 hw/pcnet.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/pcnet.c b/hw/pcnet.c
index 5e63eb5..7df39c4 100644
--- a/hw/pcnet.c
+++ b/hw/pcnet.c
@@ -1897,7 +1897,7 @@ int pcnet_common_init(DeviceState *dev, PCNetState *s, NetClientInfo *info)
 
     qemu_macaddr_default_if_unset(&s->conf.macaddr);
     s->nic = qemu_new_nic(info, &s->conf, dev->info->name, dev->id, s);
-    qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
+    qemu_format_nic_info_dict(&s->nic->nc, s->conf.macaddr.a);
     return 0;
 }
 
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 08/22] net: lan9118: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (6 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 07/22] net: pcnet: " Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 09/22] net: mcf_fec: " Miguel Di Ciurcio Filho
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 hw/lan9118.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/lan9118.c b/hw/lan9118.c
index 16d3330..07f9429 100644
--- a/hw/lan9118.c
+++ b/hw/lan9118.c
@@ -232,7 +232,7 @@ static void lan9118_update(lan9118_state *s)
 
 static void lan9118_mac_changed(lan9118_state *s)
 {
-    qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
+    qemu_format_nic_info_dict(&s->nic->nc, s->conf.macaddr.a);
 }
 
 static void lan9118_reload_eeprom(lan9118_state *s)
@@ -1130,7 +1130,7 @@ static int lan9118_init1(SysBusDevice *dev)
 
     s->nic = qemu_new_nic(&net_lan9118_info, &s->conf,
                           dev->qdev.info->name, dev->qdev.id, s);
-    qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
+    qemu_format_nic_info_dict(&s->nic->nc, s->conf.macaddr.a);
     s->eeprom[0] = 0xa5;
     for (i = 0; i < 6; i++) {
         s->eeprom[i + 1] = s->conf.macaddr.a[i];
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 09/22] net: mcf_fec: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (7 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 08/22] net: lan9118: " Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 10/22] net: mipsnet: " Miguel Di Ciurcio Filho
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 hw/mcf_fec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/mcf_fec.c b/hw/mcf_fec.c
index 4e7fbed..1e592d2 100644
--- a/hw/mcf_fec.c
+++ b/hw/mcf_fec.c
@@ -476,5 +476,5 @@ void mcf_fec_init(NICInfo *nd, target_phys_addr_t base, qemu_irq *irq)
 
     s->nic = qemu_new_nic(&net_mcf_fec_info, &s->conf, nd->model, nd->name, s);
 
-    qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
+    qemu_format_nic_info_dict(&s->nic->nc, s->conf.macaddr.a);
 }
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 10/22] net: mipsnet: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (8 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 09/22] net: mcf_fec: " Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 11/22] net: rtl8139: " Miguel Di Ciurcio Filho
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 hw/mipsnet.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/mipsnet.c b/hw/mipsnet.c
index a066f63..96bb588 100644
--- a/hw/mipsnet.c
+++ b/hw/mipsnet.c
@@ -280,7 +280,7 @@ void mipsnet_init (int base, qemu_irq irq, NICInfo *nd)
         s->nic = qemu_new_nic(&net_mipsnet_info, &s->conf,
                               nd->model, nd->name, s);
 
-        qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
+        qemu_format_nic_info_dict(&s->nic->nc, s->conf.macaddr.a);
     }
 
     mipsnet_reset(s);
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 11/22] net: rtl8139: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (9 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 10/22] net: mipsnet: " Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 12/22] net: smc91c111: " Miguel Di Ciurcio Filho
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 hw/rtl8139.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index 72e2242..ee4fc5d 100644
--- a/hw/rtl8139.c
+++ b/hw/rtl8139.c
@@ -3382,7 +3382,7 @@ static int pci_rtl8139_init(PCIDevice *dev)
 
     s->nic = qemu_new_nic(&net_rtl8139_info, &s->conf,
                           dev->qdev.info->name, dev->qdev.id, s);
-    qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
+    qemu_format_nic_info_dict(&s->nic->nc, s->conf.macaddr.a);
 
     s->cplus_txbuffer = NULL;
     s->cplus_txbuffer_len = 0;
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 12/22] net: smc91c111: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (10 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 11/22] net: rtl8139: " Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 13/22] net: stellaris_enet: " Miguel Di Ciurcio Filho
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 hw/smc91c111.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/smc91c111.c b/hw/smc91c111.c
index c1a88c9..767fc19 100644
--- a/hw/smc91c111.c
+++ b/hw/smc91c111.c
@@ -721,7 +721,7 @@ static int smc91c111_init1(SysBusDevice *dev)
 
     s->nic = qemu_new_nic(&net_smc91c111_info, &s->conf,
                           dev->qdev.info->name, dev->qdev.id, s);
-    qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
+    qemu_format_nic_info_dict(&s->nic->nc, s->conf.macaddr.a);
     /* ??? Save/restore.  */
     return 0;
 }
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 13/22] net: stellaris_enet: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (11 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 12/22] net: smc91c111: " Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 14/22] net: usb-net: " Miguel Di Ciurcio Filho
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 hw/stellaris_enet.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/stellaris_enet.c b/hw/stellaris_enet.c
index d1d755e..cf28670 100644
--- a/hw/stellaris_enet.c
+++ b/hw/stellaris_enet.c
@@ -416,7 +416,7 @@ static int stellaris_enet_init(SysBusDevice *dev)
 
     s->nic = qemu_new_nic(&net_stellaris_enet_info, &s->conf,
                           dev->qdev.info->name, dev->qdev.id, s);
-    qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
+    qemu_format_nic_info_dict(&s->nic->nc, s->conf.macaddr.a);
 
     stellaris_enet_reset(s);
     register_savevm("stellaris_enet", -1, 1,
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 14/22] net: usb-net: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (12 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 13/22] net: stellaris_enet: " Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 15/22] net: virtio-net: " Miguel Di Ciurcio Filho
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 hw/usb-net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/usb-net.c b/hw/usb-net.c
index ff0ca44..1583425 100644
--- a/hw/usb-net.c
+++ b/hw/usb-net.c
@@ -1454,7 +1454,7 @@ static int usb_net_initfn(USBDevice *dev)
     qemu_macaddr_default_if_unset(&s->conf.macaddr);
     s->nic = qemu_new_nic(&net_usbnet_info, &s->conf,
                           s->dev.qdev.info->name, s->dev.qdev.id, s);
-    qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
+    qemu_format_nic_info_dict(&s->nic->nc, s->conf.macaddr.a);
     snprintf(s->usbstring_mac, sizeof(s->usbstring_mac),
              "%02x%02x%02x%02x%02x%02x",
              0x40,
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 15/22] net: virtio-net: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (13 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 14/22] net: usb-net: " Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 16/22] net: xilinx_ethlite: " Miguel Di Ciurcio Filho
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 hw/virtio-net.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 970ba06..482a176 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -89,7 +89,7 @@ static void virtio_net_set_config(VirtIODevice *vdev, const uint8_t *config)
 
     if (memcmp(netcfg.mac, n->mac, ETH_ALEN)) {
         memcpy(n->mac, netcfg.mac, ETH_ALEN);
-        qemu_format_nic_info_str(&n->nic->nc, n->mac);
+        qemu_format_nic_info_dict(&n->nic->nc, n->mac);
     }
 }
 
@@ -916,7 +916,7 @@ VirtIODevice *virtio_net_init(DeviceState *dev, NICConf *conf)
 
     n->nic = qemu_new_nic(&net_virtio_info, conf, dev->info->name, dev->id, n);
 
-    qemu_format_nic_info_str(&n->nic->nc, conf->macaddr.a);
+    qemu_format_nic_info_dict(&n->nic->nc, conf->macaddr.a);
 
     n->tx_timer = qemu_new_timer(vm_clock, virtio_net_tx_timer, n);
     n->tx_timer_active = 0;
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 16/22] net: xilinx_ethlite: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (14 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 15/22] net: virtio-net: " Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 17/22] net: dump: " Miguel Di Ciurcio Filho
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 hw/xilinx_ethlite.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/xilinx_ethlite.c b/hw/xilinx_ethlite.c
index 37e33ec..345aea7 100644
--- a/hw/xilinx_ethlite.c
+++ b/hw/xilinx_ethlite.c
@@ -230,7 +230,7 @@ static int xilinx_ethlite_init(SysBusDevice *dev)
     qemu_macaddr_default_if_unset(&s->conf.macaddr);
     s->nic = qemu_new_nic(&net_xilinx_ethlite_info, &s->conf,
                           dev->qdev.info->name, dev->qdev.id, s);
-    qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
+    qemu_format_nic_info_dict(&s->nic->nc, s->conf.macaddr.a);
     return 0;
 }
 
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 17/22] net: dump: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (15 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 16/22] net: xilinx_ethlite: " Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 18/22] net: slirp: " Miguel Di Ciurcio Filho
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 net/dump.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/dump.c b/net/dump.c
index 6db7ecf..dea7f7d 100644
--- a/net/dump.c
+++ b/net/dump.c
@@ -27,6 +27,9 @@
 #include "sysemu.h"
 #include "qemu-error.h"
 #include "qemu-log.h"
+#include "qdict.h"
+#include "qstring.h"
+#include "qint.h"
 
 typedef struct DumpState {
     VLANClientState nc;
@@ -128,8 +131,9 @@ static int net_dump_init(VLANState *vlan, const char *device,
 
     nc = qemu_new_net_client(&net_dump_info, vlan, NULL, device, name);
 
-    snprintf(nc->info_str, sizeof(nc->info_str),
-             "dump to %s (len=%d)", filename, len);
+    nc->info_dict = qdict_new();
+    qdict_put(nc->info_dict, "filename", qstring_from_str(filename));
+    qdict_put(nc->info_dict, "len", qint_from_int(len));
 
     s = DO_UPCAST(DumpState, nc, nc);
 
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 18/22] net: slirp: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (16 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 17/22] net: dump: " Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-09 17:42   ` [Qemu-devel] " Luiz Capitulino
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 19/22] net: socket: " Miguel Di Ciurcio Filho
                   ` (4 subsequent siblings)
  22 siblings, 1 reply; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 net/slirp.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/net/slirp.c b/net/slirp.c
index b41c60a..4036b92 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -32,6 +32,8 @@
 #include "monitor.h"
 #include "sysemu.h"
 #include "qemu_socket.h"
+#include "qdict.h"
+#include "qstring.h"
 #include "slirp/libslirp.h"
 
 static int get_str_sep(char *buf, int buf_size, const char **pp, int sep)
@@ -240,8 +242,9 @@ static int net_slirp_init(VLANState *vlan, const char *model,
 
     nc = qemu_new_net_client(&net_slirp_info, vlan, NULL, model, name);
 
-    snprintf(nc->info_str, sizeof(nc->info_str),
-             "net=%s, restricted=%c", inet_ntoa(net), restricted ? 'y' : 'n');
+    nc->info_dict = qdict_new();
+    qdict_put(nc->info_dict, "net", qstring_from_str(inet_ntoa(net)));
+    qdict_put(nc->info_dict, "restricted", qstring_from_str( restricted ? "y" : "n"));
 
     s = DO_UPCAST(SlirpState, nc, nc);
 
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 19/22] net: socket: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (17 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 18/22] net: slirp: " Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-09 17:47   ` [Qemu-devel] " Luiz Capitulino
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 20/22] net: tap: replace qemu_format_nic_info_str by info_dict Miguel Di Ciurcio Filho
                   ` (3 subsequent siblings)
  22 siblings, 1 reply; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 net/socket.c |   47 ++++++++++++++++++++++++++++++++++-------------
 1 files changed, 34 insertions(+), 13 deletions(-)

diff --git a/net/socket.c b/net/socket.c
index 1c4e153..3521e21 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -28,6 +28,10 @@
 #include "net.h"
 #include "qemu-char.h"
 #include "qemu-common.h"
+#include "qdict.h"
+#include "qstring.h"
+#include "qbool.h"
+#include "qint.h"
 #include "qemu-error.h"
 #include "qemu-option.h"
 #include "qemu_socket.h"
@@ -266,11 +270,16 @@ static NetSocketState *net_socket_fd_init_dgram(VLANState *vlan,
     }
 
     nc = qemu_new_net_client(&net_dgram_socket_info, vlan, NULL, model, name);
-
-    snprintf(nc->info_str, sizeof(nc->info_str),
-	    "socket: fd=%d (%s mcast=%s:%d)",
-	    fd, is_connected ? "cloned" : "",
-	    inet_ntoa(saddr.sin_addr), ntohs(saddr.sin_port));
+    
+    nc->info_dict = qdict_new();
+    qdict_put(nc->info_dict, "fd", qint_from_int(fd));
+    
+    char mcast_addr[22];
+    snprintf(mcast_addr, strlen(mcast_addr), "%s:%d",
+                     inet_ntoa(saddr.sin_addr),
+                     ntohs(saddr.sin_port));
+    qdict_put(nc->info_dict, "mcast", qstring_from_str(mcast_addr));
+    qdict_put(nc->info_dict, "cloned", qbool_from_int(is_connected));
 
     s = DO_UPCAST(NetSocketState, nc, nc);
 
@@ -306,8 +315,9 @@ static NetSocketState *net_socket_fd_init_stream(VLANState *vlan,
     NetSocketState *s;
 
     nc = qemu_new_net_client(&net_socket_info, vlan, NULL, model, name);
+    nc->info_dict = qdict_new();
 
-    snprintf(nc->info_str, sizeof(nc->info_str), "socket: fd=%d", fd);
+    qdict_put(nc->info_dict, "fd", qint_from_int(fd));
 
     s = DO_UPCAST(NetSocketState, nc, nc);
 
@@ -366,9 +376,12 @@ static void net_socket_accept(void *opaque)
     if (!s1) {
         closesocket(fd);
     } else {
-        snprintf(s1->nc.info_str, sizeof(s1->nc.info_str),
-                 "socket: connection from %s:%d",
+        char connection_from[22];
+        s1->nc.info_dict = qdict_new();
+
+        snprintf(connection_from, strlen(connection_from), "%s:%d", 
                  inet_ntoa(saddr.sin_addr), ntohs(saddr.sin_port));
+        qdict_put(s1->nc.info_dict, "connection_from", qstring_from_str(connection_from));
     }
 }
 
@@ -459,9 +472,13 @@ static int net_socket_connect_init(VLANState *vlan,
     s = net_socket_fd_init(vlan, model, name, fd, connected);
     if (!s)
         return -1;
-    snprintf(s->nc.info_str, sizeof(s->nc.info_str),
-             "socket: connect to %s:%d",
+
+    char connect_to[22];
+    s->nc.info_dict = qdict_new();
+
+    snprintf(connect_to, strlen(connect_to), "%s:%d", 
              inet_ntoa(saddr.sin_addr), ntohs(saddr.sin_port));
+    qdict_put(s->nc.info_dict, "connect_to", qstring_from_str(connect_to));
     return 0;
 }
 
@@ -487,10 +504,14 @@ static int net_socket_mcast_init(VLANState *vlan,
         return -1;
 
     s->dgram_dst = saddr;
+    
+    s->nc.info_dict = qdict_new();
+    char mcast_addr[22];
+    snprintf(mcast_addr, strlen(mcast_addr), "%s:%d",
+                     inet_ntoa(saddr.sin_addr),
+                     ntohs(saddr.sin_port));
+    qdict_put(s->nc.info_dict, "mcast", qstring_from_str(mcast_addr));
 
-    snprintf(s->nc.info_str, sizeof(s->nc.info_str),
-             "socket: mcast=%s:%d",
-             inet_ntoa(saddr.sin_addr), ntohs(saddr.sin_port));
     return 0;
 
 }
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 20/22] net: tap: replace qemu_format_nic_info_str by info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (18 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 19/22] net: socket: " Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-09 17:48   ` [Qemu-devel] " Luiz Capitulino
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 21/22] net: vde: " Miguel Di Ciurcio Filho
                   ` (2 subsequent siblings)
  22 siblings, 1 reply; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 net/tap-win32.c |    9 ++++++---
 net/tap.c       |   18 +++++++++++++-----
 2 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/net/tap-win32.c b/net/tap-win32.c
index 74348da..8e0ad2d 100644
--- a/net/tap-win32.c
+++ b/net/tap-win32.c
@@ -32,6 +32,8 @@
 #include "net.h"
 #include "sysemu.h"
 #include "qemu-error.h"
+#include "qdict.h"
+#include "qstring.h"
 #include <stdio.h>
 #include <windows.h>
 #include <winioctl.h>
@@ -688,10 +690,11 @@ static int tap_win32_init(VLANState *vlan, const char *model,
 
     nc = qemu_new_net_client(&net_tap_win32_info, vlan, NULL, model, name);
 
-    s = DO_UPCAST(TAPState, nc, nc);
+    nc->info_dict = qdict_new();
 
-    snprintf(s->nc.info_str, sizeof(s->nc.info_str),
-             "tap: ifname=%s", ifname);
+    qdict_put(nc->info_dict, "ifname", qstring_to_str(ifname));
+    
+    s = DO_UPCAST(TAPState, nc, nc);
 
     s->handle = handle;
 
diff --git a/net/tap.c b/net/tap.c
index 303d69f..8ba7eed 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -39,6 +39,9 @@
 #include "qemu-char.h"
 #include "qemu-common.h"
 #include "qemu-error.h"
+#include "qdict.h"
+#include "qint.h"
+#include "qstring.h"
 
 #include "net/tap-linux.h"
 
@@ -447,18 +450,23 @@ int net_init_tap(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan
     }
 
     if (qemu_opt_get(opts, "fd")) {
-        snprintf(s->nc.info_str, sizeof(s->nc.info_str), "fd=%d", fd);
+        if (s->nc.info_dict == NULL)
+            s->nc.info_dict = qdict_new();
+
+        qdict_put(s->nc.info_dict, "fd", qint_from_int(fd));
     } else {
         const char *ifname, *script, *downscript;
+        if (s->nc.info_dict == NULL)
+            s->nc.info_dict = qdict_new();
 
         ifname     = qemu_opt_get(opts, "ifname");
         script     = qemu_opt_get(opts, "script");
         downscript = qemu_opt_get(opts, "downscript");
 
-        snprintf(s->nc.info_str, sizeof(s->nc.info_str),
-                 "ifname=%s,script=%s,downscript=%s",
-                 ifname, script, downscript);
-
+        qdict_put(s->nc.info_dict, "ifname", qstring_from_str(ifname));
+        qdict_put(s->nc.info_dict, "script", qstring_from_str(script));
+        qdict_put(s->nc.info_dict, "downscript", qstring_from_str(downscript));
+        
         if (strcmp(downscript, "no") != 0) {
             snprintf(s->down_script, sizeof(s->down_script), "%s", downscript);
             snprintf(s->down_script_arg, sizeof(s->down_script_arg), "%s", ifname);
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 21/22] net: vde: replace qemu_format_nic_info_str by info_dict
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (19 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 20/22] net: tap: replace qemu_format_nic_info_str by info_dict Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 22/22] monitor/net: Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
  2010-04-09 17:25 ` [Qemu-devel] Re: [PATCH 0/22] " Luiz Capitulino
  22 siblings, 0 replies; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 net/vde.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/net/vde.c b/net/vde.c
index 0b46fa6..f582878 100644
--- a/net/vde.c
+++ b/net/vde.c
@@ -31,6 +31,9 @@
 #include "qemu-char.h"
 #include "qemu-common.h"
 #include "qemu-option.h"
+#include "qdict.h"
+#include "qstring.h"
+#include "qint.h"
 #include "sysemu.h"
 
 typedef struct VDEState {
@@ -99,8 +102,10 @@ static int net_vde_init(VLANState *vlan, const char *model,
 
     nc = qemu_new_net_client(&net_vde_info, vlan, NULL, model, name);
 
-    snprintf(nc->info_str, sizeof(nc->info_str), "sock=%s,fd=%d",
-             sock, vde_datafd(vde));
+    nc->info_dict = qdict_new();
+
+    qdict_put(nc->info_dict, "sock", qstring_from_str(sock));
+    qdict_put(nc->info_dict, "fd", qint_from_int(vde_datafd(vde)));
 
     s = DO_UPCAST(VDEState, nc, nc);
 
-- 
1.7.0.3

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

* [Qemu-devel] [PATCH 22/22] monitor/net: Convert do_info_network() to QObject/QMP
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (20 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 21/22] net: vde: " Miguel Di Ciurcio Filho
@ 2010-04-08 20:16 ` Miguel Di Ciurcio Filho
  2010-04-09 17:52   ` [Qemu-devel] " Luiz Capitulino
  2010-04-09 17:25 ` [Qemu-devel] Re: [PATCH 0/22] " Luiz Capitulino
  22 siblings, 1 reply; 31+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-04-08 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lcapitulino

Each device is represented by a QDict. The returned QObject is a QList
of all devices.

This commit slightly changes the monitor output when 'info network' is used.

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 monitor.c |    3 +-
 net.c     |  133 ++++++++++++++++++++++++++++++++++++++++++++++++++++++------
 net.h     |    6 ++-
 3 files changed, 126 insertions(+), 16 deletions(-)

diff --git a/monitor.c b/monitor.c
index 822dc27..0b3fdfc 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2604,7 +2604,8 @@ static const mon_cmd_t info_cmds[] = {
         .args_type  = "",
         .params     = "",
         .help       = "show the network state",
-        .mhandler.info = do_info_network,
+        .user_print = do_info_network_print,
+        .mhandler.info_new = do_info_network,
     },
     {
         .name       = "chardev",
diff --git a/net.c b/net.c
index ad01732..c59ae5b 100644
--- a/net.c
+++ b/net.c
@@ -33,10 +33,10 @@
 #include "net/util.h"
 #include "monitor.h"
 #include "sysemu.h"
+#include "qstring.h"
 #include "qemu-common.h"
 #include "qemu_socket.h"
-#include "qdict.h"
-#include "qstring.h"
+#include "qemu-objects.h"
 #include "hw/qdev.h"
 
 static QTAILQ_HEAD(, VLANState) vlans;
@@ -174,7 +174,7 @@ void qemu_format_nic_info_dict(VLANClientState *vc, uint8_t macaddr[6])
     snprintf(mac, 18, "%02x:%02x:%02x:%02x:%02x:%02x",
              macaddr[0], macaddr[1], macaddr[2],
              macaddr[3], macaddr[4], macaddr[5]);
-
+            
     qdict_put(vc->info_dict, "macaddr", qstring_from_str(mac));
     qdict_put(vc->info_dict, "model", qstring_from_str(vc->model));
 }
@@ -1224,26 +1224,131 @@ void net_set_boot_mask(int net_boot_mask)
     }
 }
 
-void do_info_network(Monitor *mon)
+void vlan_devices_iter(QObject *obj, void *opaque)
+{
+
+    Monitor *mon = opaque;
+    QDict *net_device = qobject_to_qdict(obj);
+        
+    if (!qdict_haskey(net_device, "vlan"))
+        return;
+
+    monitor_printf(mon, "  %s: vlan=%d ", qdict_get_str(net_device, "name"),
+        (int)qdict_get_int(net_device, "vlan"));
+    monitor_printf(mon,
+        qstring_get_str(qdict_to_qstring(qdict_get_qdict(net_device, "info"))));
+    
+    monitor_printf(mon, " \n");
+}
+
+void non_vlan_devices_iter(QObject *obj, void *opaque)
+{
+
+    Monitor *mon = opaque;
+    QDict *net_device = qobject_to_qdict(obj);
+    
+    if (qdict_haskey(net_device, "vlan"))
+        return;
+    
+    monitor_printf(mon, "  %s: ", qdict_get_str(net_device, "name"));
+    
+    if (qdict_haskey(net_device, "peer"))
+        monitor_printf(mon, "peer=%s ", qdict_get_str(net_device, "peer"));
+    
+    monitor_printf(mon,
+        qstring_get_str(qdict_to_qstring(qdict_get_qdict(net_device, "info"))));
+    
+    monitor_printf(mon, "\n");
+        
+}
+
+void do_info_network_print(Monitor *mon, const QObject *ret_data)
+{
+    QList *qlist;
+    
+    qlist = qobject_to_qlist(ret_data);
+    
+    monitor_printf(mon, "Devices on VLANs:\n");
+
+    qlist_iter(qlist, vlan_devices_iter, mon);
+
+    monitor_printf(mon, "Devices not on any VLAN:\n");
+    
+    qlist_iter(qlist, non_vlan_devices_iter, mon);
+    
+}
+
+/**
+ * do_network_info(): Network information
+ *
+ * Each network device information is stored in a QDict and the
+ * returned QObject is a QList of all devices.
+ *
+ * The QDict contains the following:
+ *
+ * - "name": device name
+ * - "vlan": only present if the device is attached to a VLAN, it is the id
+ * of the VLAN
+ * - "info": it is a QDict containing any of the following: 
+ *          - "model": type of the device
+ *          - "macaddr": MAC address
+ *          - "script": path to script used to configure the device
+ *          - "downscript": path to script used to deconfigure the device
+ *          - "fd": handle to the device
+ *          - "ifname": name of the host device connected to the guest device
+ *          - "mcast": multicast address
+ *          - "cloned": true if the device is multicast clone
+ *          - "connection_from": IP/port pair of an incomming connection
+ *          - "connect_to": IP/port pair of an outgoing connection
+ *
+ * Example:
+ *
+ * [ { "name": "tap.0", "vlan": 0, 
+       "info": { "script": "/etc/kvm/kvm-ifup", "downscript": "/etc/qemu-ifdown", 
+       "ifname": "tap0" } }, 
+     { "name": "e1000.0", "vlan": 1,
+      "info": { "model": "e1000", "macaddr": "52:54:00:12:34:56" } } ]
+ */
+void do_info_network(Monitor *mon, QObject **ret_data)
 {
     VLANState *vlan;
     VLANClientState *vc;
-
+    QDict *net_device;
+    QList *device_list;
+    device_list = qlist_new();
+        
     QTAILQ_FOREACH(vlan, &vlans, next) {
-        monitor_printf(mon, "VLAN %d devices:\n", vlan->id);
-
+        QObject *obj;
+        
         QTAILQ_FOREACH(vc, &vlan->clients, next) {
-            monitor_printf(mon, "  %s: %s\n", vc->name, vc->info_str);
+
+            obj = qobject_from_jsonf("{ 'vlan': %d, 'name': %s }", vlan->id, vc->name);
+            net_device = qobject_to_qdict(obj);
+            
+            QINCREF(vc->info_dict);
+            qdict_put(net_device, "info", vc->info_dict);
+
+            qlist_append(device_list, qobject_to_qdict(obj));
+
         }
     }
-    monitor_printf(mon, "Devices not on any VLAN:\n");
+
     QTAILQ_FOREACH(vc, &non_vlan_clients, next) {
-        monitor_printf(mon, "  %s: %s", vc->name, vc->info_str);
-        if (vc->peer) {
-            monitor_printf(mon, " peer=%s", vc->peer->name);
-        }
-        monitor_printf(mon, "\n");
+        QObject *obj;
+        
+        obj = qobject_from_jsonf("{ 'name': %s", vc->name);
+        net_device = qobject_to_qdict(obj);
+
+        QINCREF(vc->info_dict);
+        qdict_put(net_device, "info", vc->info_dict);
+
+        if (vc->peer)
+            qdict_put(net_device, "peer", qstring_from_str(vc->peer->name));
+
+        qlist_append(device_list, net_device);
     }
+
+    *ret_data = QOBJECT(device_list);
 }
 
 void do_set_link(Monitor *mon, const QDict *qdict)
diff --git a/net.h b/net.h
index b744294..d1cf6ab 100644
--- a/net.h
+++ b/net.h
@@ -6,6 +6,7 @@
 #include "qemu-common.h"
 #include "qdict.h"
 #include "qemu-option.h"
+#include "qobject.h"
 #include "net/queue.h"
 
 struct MACAddr {
@@ -117,7 +118,10 @@ void qemu_check_nic_model(NICInfo *nd, const char *model);
 int qemu_find_nic_model(NICInfo *nd, const char * const *models,
                         const char *default_model);
 
-void do_info_network(Monitor *mon);
+void vlan_devices_iter(QObject *obj, void *opaque);
+void non_vlan_devices_iter(QObject *obj, void *opaque);
+void do_info_network_print(Monitor *mon, const QObject *ret_data);
+void do_info_network(Monitor *mon, QObject **ret_data);
 void do_set_link(Monitor *mon, const QDict *qdict);
 
 /* NIC info */
-- 
1.7.0.3

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

* [Qemu-devel] Re: [PATCH 0/22] Convert do_info_network() to QObject/QMP
  2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
                   ` (21 preceding siblings ...)
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 22/22] monitor/net: Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
@ 2010-04-09 17:25 ` Luiz Capitulino
  22 siblings, 0 replies; 31+ messages in thread
From: Luiz Capitulino @ 2010-04-09 17:25 UTC (permalink / raw)
  To: Miguel Di Ciurcio Filho; +Cc: qemu-devel, armbru

On Thu,  8 Apr 2010 17:16:17 -0300
Miguel Di Ciurcio Filho <miguel.filho@gmail.com> wrote:

> The VLANClientState structure has the member info_str, a simple string that
> is filled with information about NIC devices and used on monitor calls.
> 
> There is no coherent formatting of this string by all the NIC devices, 
> making it difficult to parse and represent this information over QMP.
> 
> Patch 01 adds a new function qdict_to_qstring().
> 
> Patch 02 replaces the function qemu_nic_format_info_str by
> qemu_nic_format_info_dict, adds a new QDict member to
> VLANClientState named info_dict.
> 
> Patches 03-21 updates all devices to feed information into the new QDict.
> 
> Patch 22 converts the 'info network' monitor command to QObject, enabling QMP
> support.

 This series has a number of small things to improve, but seems the right
approach to me and in general looks very good. I'll followup individual
patches.

 Two issues:

 1. The following sequence triggers an assert()

	(qemu) netdev_add user,id=foo
	(qemu) info network

    The netdev_add command is available in my tree (see below).

 2. The last patch conflicts with patches from Markus, you can
    rebase against my tree to solve that:

	git://repo.or.cz/qemu/qmp-unstable.git

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

* [Qemu-devel] Re: [PATCH 01/22] QObject API: add qdict_to_qstring() function
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 01/22] QObject API: add qdict_to_qstring() function Miguel Di Ciurcio Filho
@ 2010-04-09 17:26   ` Luiz Capitulino
  0 siblings, 0 replies; 31+ messages in thread
From: Luiz Capitulino @ 2010-04-09 17:26 UTC (permalink / raw)
  To: Miguel Di Ciurcio Filho; +Cc: qemu-devel, armbru

On Thu,  8 Apr 2010 17:16:18 -0300
Miguel Di Ciurcio Filho <miguel.filho@gmail.com> wrote:

> This is a helper function that converts a QDict to a QString, using the format:
> 
> key1=value1 SPACE key2=value2 SPACE key3=value3
> 
> Handy for debugging and other things.
> 
> Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
> ---
>  qdict.c |   39 +++++++++++++++++++++++++++++++++++++++
>  qdict.h |    3 +++
>  2 files changed, 42 insertions(+), 0 deletions(-)
> 
> diff --git a/qdict.c b/qdict.c
> index aae57bf..ca1a60b 100644
> --- a/qdict.c
> +++ b/qdict.c
> @@ -324,6 +324,45 @@ void qdict_iter(const QDict *qdict,
>      }
>  }
>  
> +void qdict_to_qstring_iter(const char *key, QObject *obj, void *opaque)
> +{
> +    QString *str = opaque;
> +    
> +    qstring_append(str, key);
> +    qstring_append(str, "=");
> +    switch (qobject_type(obj)) {
> +    case QTYPE_QSTRING:
> +        qstring_append(str, qstring_get_str(qobject_to_qstring(obj)));
> +        break;
> +    case QTYPE_QINT:
> +        qstring_append_int(str, qint_get_int(qobject_to_qint(obj)));
> +        break;
> +    case QTYPE_QBOOL:
> +        qstring_append(str, qbool_get_int(qobject_to_qbool(obj)) ? "true" :
> +        "false" );
> +        break;
> +    default:
> +        qstring_append(str, "NULL");
> +    }
> +
> +    qstring_append(str, " ");
> +}
> +
> +/**
> + * qdict_to_qstring(): Format a string with the keys and values of a QDict
> + *
> + * Return a pointer to a QString, with the following format:
> + *    key1=value1 SPACE key2=value2 SPACE key3=value3
> + */

 It's a good idea to mention that nested lists and dicts are not
supported.

> +QString *qdict_to_qstring(const QDict *qdict)
> +{
> +    QString *str;
> +    str = qstring_new();
> +    qdict_iter(qdict, qdict_to_qstring_iter, str);
> +
> +    return str;
> +}
> +
>  /**
>   * qentry_destroy(): Free all the memory allocated by a QDictEntry
>   */
> diff --git a/qdict.h b/qdict.h
> index 579dcdd..6731555 100644
> --- a/qdict.h
> +++ b/qdict.h
> @@ -3,6 +3,7 @@
>  
>  #include "qobject.h"
>  #include "qlist.h"
> +#include "qstring.h"
>  #include "qemu-queue.h"
>  #include <stdint.h>
>  
> @@ -43,6 +44,8 @@ int qdict_get_bool(const QDict *qdict, const char *key);
>  QList *qdict_get_qlist(const QDict *qdict, const char *key);
>  QDict *qdict_get_qdict(const QDict *qdict, const char *key);
>  const char *qdict_get_str(const QDict *qdict, const char *key);
> +void qdict_to_qstring_iter(const char *key, QObject *obj, void *opaque);
> +QString *qdict_to_qstring(const QDict *qdict);
>  int64_t qdict_get_try_int(const QDict *qdict, const char *key,
>                            int64_t err_value);
>  const char *qdict_get_try_str(const QDict *qdict, const char *key);

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

* [Qemu-devel] Re: [PATCH 02/22] net: replace qemu_nic_format_info_str and VLANClientState->info_str by QDicts
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 02/22] net: replace qemu_nic_format_info_str and VLANClientState->info_str by QDicts Miguel Di Ciurcio Filho
@ 2010-04-09 17:41   ` Luiz Capitulino
  0 siblings, 0 replies; 31+ messages in thread
From: Luiz Capitulino @ 2010-04-09 17:41 UTC (permalink / raw)
  To: Miguel Di Ciurcio Filho; +Cc: qemu-devel, armbru

On Thu,  8 Apr 2010 17:16:19 -0300
Miguel Di Ciurcio Filho <miguel.filho@gmail.com> wrote:

> There is no standard format when formatting info_str, so it is difficult
> to extract information and transmit it over QMP.
> 
> This patch changes info_str from a simple string to a QDict.
> 
> Patches that convert the devices to this new format will follow.

 This will break the build of each individual patch, which will break
git bisect. Each individual patch should build when applied.

 To fix that, you can add the new function and only drop the current one
when the full conversion is done. The temporary duplication is ok.

 More comments below.

> Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
> ---
>  net.c |   14 ++++++++++----
>  net.h |    4 ++--
>  2 files changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git a/net.c b/net.c
> index 3ede738..ad01732 100644
> --- a/net.c
> +++ b/net.c
> @@ -35,6 +35,8 @@
>  #include "sysemu.h"
>  #include "qemu-common.h"
>  #include "qemu_socket.h"
> +#include "qdict.h"
> +#include "qstring.h"
>  #include "hw/qdev.h"
>  
>  static QTAILQ_HEAD(, VLANState) vlans;
> @@ -164,13 +166,17 @@ int parse_host_port(struct sockaddr_in *saddr, const char *str)
>      return 0;
>  }
>  
> -void qemu_format_nic_info_str(VLANClientState *vc, uint8_t macaddr[6])
> +void qemu_format_nic_info_dict(VLANClientState *vc, uint8_t macaddr[6])
>  {
> -    snprintf(vc->info_str, sizeof(vc->info_str),
> -             "model=%s,macaddr=%02x:%02x:%02x:%02x:%02x:%02x",
> -             vc->model,
> +    vc->info_dict = qdict_new();
> +    char mac[18];
> +
> +    snprintf(mac, 18, "%02x:%02x:%02x:%02x:%02x:%02x",
>               macaddr[0], macaddr[1], macaddr[2],
>               macaddr[3], macaddr[4], macaddr[5]);

 sizeof(mac) is better.

> +
> +    qdict_put(vc->info_dict, "macaddr", qstring_from_str(mac));
> +    qdict_put(vc->info_dict, "model", qstring_from_str(vc->model));
>  }
>  
>  void qemu_macaddr_default_if_unset(MACAddr *macaddr)
> diff --git a/net.h b/net.h
> index 16f19c5..b744294 100644
> --- a/net.h
> +++ b/net.h
> @@ -65,7 +65,7 @@ struct VLANClientState {
>      NetQueue *send_queue;
>      char *model;
>      char *name;
> -    char info_str[256];
> +    QDict *info_dict;

 Isn't VLANClientState freed somewhere? At least in netdev_del it should.. So,
you have to do a QDECREF(info_dict) there.

>      unsigned receive_disabled : 1;
>  };
>  
> @@ -110,7 +110,7 @@ ssize_t qemu_send_packet_async(VLANClientState *vc, const uint8_t *buf,
>                                 int size, NetPacketSent *sent_cb);
>  void qemu_purge_queued_packets(VLANClientState *vc);
>  void qemu_flush_queued_packets(VLANClientState *vc);
> -void qemu_format_nic_info_str(VLANClientState *vc, uint8_t macaddr[6]);
> +void qemu_format_nic_info_dict(VLANClientState *vc, uint8_t macaddr[6]);
>  void qemu_macaddr_default_if_unset(MACAddr *macaddr);
>  int qemu_show_nic_models(const char *arg, const char *const *models);
>  void qemu_check_nic_model(NICInfo *nd, const char *model);

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

* [Qemu-devel] Re: [PATCH 05/22] net: eepro100: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 05/22] net: eepro100: " Miguel Di Ciurcio Filho
@ 2010-04-09 17:42   ` Luiz Capitulino
  0 siblings, 0 replies; 31+ messages in thread
From: Luiz Capitulino @ 2010-04-09 17:42 UTC (permalink / raw)
  To: Miguel Di Ciurcio Filho; +Cc: qemu-devel, armbru

On Thu,  8 Apr 2010 17:16:22 -0300
Miguel Di Ciurcio Filho <miguel.filho@gmail.com> wrote:

> Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
> ---
>  hw/eepro100.c |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/eepro100.c b/hw/eepro100.c
> index 7db6fb5..329fe15 100644
> --- a/hw/eepro100.c
> +++ b/hw/eepro100.c
> @@ -47,6 +47,8 @@
>  #include "pci.h"
>  #include "net.h"
>  #include "eeprom93xx.h"
> +#include "qdict.h"
> +#include "qstring.h"
>  
>  #define KiB 1024
>  
> @@ -1978,8 +1980,9 @@ static int nic_init(PCIDevice *pci_dev, uint32_t device)
>      s->nic = qemu_new_nic(&net_eepro100_info, &s->conf,
>                            pci_dev->qdev.info->name, pci_dev->qdev.id, s);
>  
> -    qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
> -    TRACE(OTHER, logout("%s\n", s->nic->nc.info_str));
> +    qemu_format_nic_info_dict(&s->nic->nc, s->conf.macaddr.a);
> +    TRACE(OTHER, logout("%s\n",
> +        qstring_get_str(qdict_to_qstring(s->nic->nc.info_dic))));

 You have to free the returned qstring.

>  
>      qemu_register_reset(nic_reset, s);
>  

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

* [Qemu-devel] Re: [PATCH 18/22] net: slirp: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 18/22] net: slirp: " Miguel Di Ciurcio Filho
@ 2010-04-09 17:42   ` Luiz Capitulino
  0 siblings, 0 replies; 31+ messages in thread
From: Luiz Capitulino @ 2010-04-09 17:42 UTC (permalink / raw)
  To: Miguel Di Ciurcio Filho; +Cc: qemu-devel, armbru

On Thu,  8 Apr 2010 17:16:35 -0300
Miguel Di Ciurcio Filho <miguel.filho@gmail.com> wrote:

> Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
> ---
>  net/slirp.c |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/net/slirp.c b/net/slirp.c
> index b41c60a..4036b92 100644
> --- a/net/slirp.c
> +++ b/net/slirp.c
> @@ -32,6 +32,8 @@
>  #include "monitor.h"
>  #include "sysemu.h"
>  #include "qemu_socket.h"
> +#include "qdict.h"
> +#include "qstring.h"
>  #include "slirp/libslirp.h"
>  
>  static int get_str_sep(char *buf, int buf_size, const char **pp, int sep)
> @@ -240,8 +242,9 @@ static int net_slirp_init(VLANState *vlan, const char *model,
>  
>      nc = qemu_new_net_client(&net_slirp_info, vlan, NULL, model, name);
>  
> -    snprintf(nc->info_str, sizeof(nc->info_str),
> -             "net=%s, restricted=%c", inet_ntoa(net), restricted ? 'y' : 'n');
> +    nc->info_dict = qdict_new();
> +    qdict_put(nc->info_dict, "net", qstring_from_str(inet_ntoa(net)));
> +    qdict_put(nc->info_dict, "restricted", qstring_from_str( restricted ? "y" : "n"));

 Better to use qbool here.

>  
>      s = DO_UPCAST(SlirpState, nc, nc);
>  

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

* [Qemu-devel] Re: [PATCH 19/22] net: socket: replace qemu_format_nic_info_str by qemu_format_nic_info_dict
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 19/22] net: socket: " Miguel Di Ciurcio Filho
@ 2010-04-09 17:47   ` Luiz Capitulino
  0 siblings, 0 replies; 31+ messages in thread
From: Luiz Capitulino @ 2010-04-09 17:47 UTC (permalink / raw)
  To: Miguel Di Ciurcio Filho; +Cc: qemu-devel, armbru

On Thu,  8 Apr 2010 17:16:36 -0300
Miguel Di Ciurcio Filho <miguel.filho@gmail.com> wrote:

> Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
> ---
>  net/socket.c |   47 ++++++++++++++++++++++++++++++++++-------------
>  1 files changed, 34 insertions(+), 13 deletions(-)
> 
> diff --git a/net/socket.c b/net/socket.c
> index 1c4e153..3521e21 100644
> --- a/net/socket.c
> +++ b/net/socket.c
> @@ -28,6 +28,10 @@
>  #include "net.h"
>  #include "qemu-char.h"
>  #include "qemu-common.h"
> +#include "qdict.h"
> +#include "qstring.h"
> +#include "qbool.h"
> +#include "qint.h"
>  #include "qemu-error.h"
>  #include "qemu-option.h"
>  #include "qemu_socket.h"
> @@ -266,11 +270,16 @@ static NetSocketState *net_socket_fd_init_dgram(VLANState *vlan,
>      }
>  
>      nc = qemu_new_net_client(&net_dgram_socket_info, vlan, NULL, model, name);
> -
> -    snprintf(nc->info_str, sizeof(nc->info_str),
> -	    "socket: fd=%d (%s mcast=%s:%d)",
> -	    fd, is_connected ? "cloned" : "",
> -	    inet_ntoa(saddr.sin_addr), ntohs(saddr.sin_port));
> +    
> +    nc->info_dict = qdict_new();
> +    qdict_put(nc->info_dict, "fd", qint_from_int(fd));
> +    
> +    char mcast_addr[22];
> +    snprintf(mcast_addr, strlen(mcast_addr), "%s:%d",
> +                     inet_ntoa(saddr.sin_addr),
> +                     ntohs(saddr.sin_port));
> +    qdict_put(nc->info_dict, "mcast", qstring_from_str(mcast_addr));

 We should break 'mcast', otherwise QMP clients will have to parse it. Maybe
you can make vnc.c::put_addr_qdict() public and use it (with a better name).

 Note that this is also valid for 'connection_from' and all the others..


> +    qdict_put(nc->info_dict, "cloned", qbool_from_int(is_connected));
>  
>      s = DO_UPCAST(NetSocketState, nc, nc);
>  
> @@ -306,8 +315,9 @@ static NetSocketState *net_socket_fd_init_stream(VLANState *vlan,
>      NetSocketState *s;
>  
>      nc = qemu_new_net_client(&net_socket_info, vlan, NULL, model, name);
> +    nc->info_dict = qdict_new();
>  
> -    snprintf(nc->info_str, sizeof(nc->info_str), "socket: fd=%d", fd);
> +    qdict_put(nc->info_dict, "fd", qint_from_int(fd));
>  
>      s = DO_UPCAST(NetSocketState, nc, nc);
>  
> @@ -366,9 +376,12 @@ static void net_socket_accept(void *opaque)
>      if (!s1) {
>          closesocket(fd);
>      } else {
> -        snprintf(s1->nc.info_str, sizeof(s1->nc.info_str),
> -                 "socket: connection from %s:%d",
> +        char connection_from[22];
> +        s1->nc.info_dict = qdict_new();
> +
> +        snprintf(connection_from, strlen(connection_from), "%s:%d", 
>                   inet_ntoa(saddr.sin_addr), ntohs(saddr.sin_port));
> +        qdict_put(s1->nc.info_dict, "connection_from", qstring_from_str(connection_from));
>      }
>  }
>  
> @@ -459,9 +472,13 @@ static int net_socket_connect_init(VLANState *vlan,
>      s = net_socket_fd_init(vlan, model, name, fd, connected);
>      if (!s)
>          return -1;
> -    snprintf(s->nc.info_str, sizeof(s->nc.info_str),
> -             "socket: connect to %s:%d",
> +
> +    char connect_to[22];
> +    s->nc.info_dict = qdict_new();
> +
> +    snprintf(connect_to, strlen(connect_to), "%s:%d", 
>               inet_ntoa(saddr.sin_addr), ntohs(saddr.sin_port));
> +    qdict_put(s->nc.info_dict, "connect_to", qstring_from_str(connect_to));
>      return 0;
>  }
>  
> @@ -487,10 +504,14 @@ static int net_socket_mcast_init(VLANState *vlan,
>          return -1;
>  
>      s->dgram_dst = saddr;
> +    
> +    s->nc.info_dict = qdict_new();
> +    char mcast_addr[22];
> +    snprintf(mcast_addr, strlen(mcast_addr), "%s:%d",
> +                     inet_ntoa(saddr.sin_addr),
> +                     ntohs(saddr.sin_port));
> +    qdict_put(s->nc.info_dict, "mcast", qstring_from_str(mcast_addr));
>  
> -    snprintf(s->nc.info_str, sizeof(s->nc.info_str),
> -             "socket: mcast=%s:%d",
> -             inet_ntoa(saddr.sin_addr), ntohs(saddr.sin_port));
>      return 0;
>  
>  }

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

* [Qemu-devel] Re: [PATCH 20/22] net: tap: replace qemu_format_nic_info_str by info_dict
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 20/22] net: tap: replace qemu_format_nic_info_str by info_dict Miguel Di Ciurcio Filho
@ 2010-04-09 17:48   ` Luiz Capitulino
  0 siblings, 0 replies; 31+ messages in thread
From: Luiz Capitulino @ 2010-04-09 17:48 UTC (permalink / raw)
  To: Miguel Di Ciurcio Filho; +Cc: qemu-devel, armbru

On Thu,  8 Apr 2010 17:16:37 -0300
Miguel Di Ciurcio Filho <miguel.filho@gmail.com> wrote:

> Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
> ---
>  net/tap-win32.c |    9 ++++++---
>  net/tap.c       |   18 +++++++++++++-----
>  2 files changed, 19 insertions(+), 8 deletions(-)
> 
> diff --git a/net/tap-win32.c b/net/tap-win32.c
> index 74348da..8e0ad2d 100644
> --- a/net/tap-win32.c
> +++ b/net/tap-win32.c
> @@ -32,6 +32,8 @@
>  #include "net.h"
>  #include "sysemu.h"
>  #include "qemu-error.h"
> +#include "qdict.h"
> +#include "qstring.h"
>  #include <stdio.h>
>  #include <windows.h>
>  #include <winioctl.h>
> @@ -688,10 +690,11 @@ static int tap_win32_init(VLANState *vlan, const char *model,
>  
>      nc = qemu_new_net_client(&net_tap_win32_info, vlan, NULL, model, name);
>  
> -    s = DO_UPCAST(TAPState, nc, nc);
> +    nc->info_dict = qdict_new();
>  
> -    snprintf(s->nc.info_str, sizeof(s->nc.info_str),
> -             "tap: ifname=%s", ifname);
> +    qdict_put(nc->info_dict, "ifname", qstring_to_str(ifname));

 qstring_from_str() is better.

> +    
> +    s = DO_UPCAST(TAPState, nc, nc);
>  
>      s->handle = handle;
>  
> diff --git a/net/tap.c b/net/tap.c
> index 303d69f..8ba7eed 100644
> --- a/net/tap.c
> +++ b/net/tap.c
> @@ -39,6 +39,9 @@
>  #include "qemu-char.h"
>  #include "qemu-common.h"
>  #include "qemu-error.h"
> +#include "qdict.h"
> +#include "qint.h"
> +#include "qstring.h"
>  
>  #include "net/tap-linux.h"
>  
> @@ -447,18 +450,23 @@ int net_init_tap(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan
>      }
>  
>      if (qemu_opt_get(opts, "fd")) {
> -        snprintf(s->nc.info_str, sizeof(s->nc.info_str), "fd=%d", fd);
> +        if (s->nc.info_dict == NULL)
> +            s->nc.info_dict = qdict_new();
> +
> +        qdict_put(s->nc.info_dict, "fd", qint_from_int(fd));
>      } else {
>          const char *ifname, *script, *downscript;
> +        if (s->nc.info_dict == NULL)
> +            s->nc.info_dict = qdict_new();
>  
>          ifname     = qemu_opt_get(opts, "ifname");
>          script     = qemu_opt_get(opts, "script");
>          downscript = qemu_opt_get(opts, "downscript");
>  
> -        snprintf(s->nc.info_str, sizeof(s->nc.info_str),
> -                 "ifname=%s,script=%s,downscript=%s",
> -                 ifname, script, downscript);
> -
> +        qdict_put(s->nc.info_dict, "ifname", qstring_from_str(ifname));
> +        qdict_put(s->nc.info_dict, "script", qstring_from_str(script));
> +        qdict_put(s->nc.info_dict, "downscript", qstring_from_str(downscript));
> +        
>          if (strcmp(downscript, "no") != 0) {
>              snprintf(s->down_script, sizeof(s->down_script), "%s", downscript);
>              snprintf(s->down_script_arg, sizeof(s->down_script_arg), "%s", ifname);

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

* [Qemu-devel] Re: [PATCH 22/22] monitor/net: Convert do_info_network() to QObject/QMP
  2010-04-08 20:16 ` [Qemu-devel] [PATCH 22/22] monitor/net: Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
@ 2010-04-09 17:52   ` Luiz Capitulino
  0 siblings, 0 replies; 31+ messages in thread
From: Luiz Capitulino @ 2010-04-09 17:52 UTC (permalink / raw)
  To: Miguel Di Ciurcio Filho; +Cc: qemu-devel, armbru

On Thu,  8 Apr 2010 17:16:39 -0300
Miguel Di Ciurcio Filho <miguel.filho@gmail.com> wrote:

> Each device is represented by a QDict. The returned QObject is a QList
> of all devices.
> 
> This commit slightly changes the monitor output when 'info network' is used.
> 
> Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
> ---
>  monitor.c |    3 +-
>  net.c     |  133 ++++++++++++++++++++++++++++++++++++++++++++++++++++++------
>  net.h     |    6 ++-
>  3 files changed, 126 insertions(+), 16 deletions(-)
> 
> diff --git a/monitor.c b/monitor.c
> index 822dc27..0b3fdfc 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -2604,7 +2604,8 @@ static const mon_cmd_t info_cmds[] = {
>          .args_type  = "",
>          .params     = "",
>          .help       = "show the network state",
> -        .mhandler.info = do_info_network,
> +        .user_print = do_info_network_print,
> +        .mhandler.info_new = do_info_network,
>      },
>      {
>          .name       = "chardev",
> diff --git a/net.c b/net.c
> index ad01732..c59ae5b 100644
> --- a/net.c
> +++ b/net.c
> @@ -33,10 +33,10 @@
>  #include "net/util.h"
>  #include "monitor.h"
>  #include "sysemu.h"
> +#include "qstring.h"
>  #include "qemu-common.h"
>  #include "qemu_socket.h"
> -#include "qdict.h"
> -#include "qstring.h"
> +#include "qemu-objects.h"
>  #include "hw/qdev.h"
>  
>  static QTAILQ_HEAD(, VLANState) vlans;
> @@ -174,7 +174,7 @@ void qemu_format_nic_info_dict(VLANClientState *vc, uint8_t macaddr[6])
>      snprintf(mac, 18, "%02x:%02x:%02x:%02x:%02x:%02x",
>               macaddr[0], macaddr[1], macaddr[2],
>               macaddr[3], macaddr[4], macaddr[5]);
> -
> +            
>      qdict_put(vc->info_dict, "macaddr", qstring_from_str(mac));
>      qdict_put(vc->info_dict, "model", qstring_from_str(vc->model));
>  }
> @@ -1224,26 +1224,131 @@ void net_set_boot_mask(int net_boot_mask)
>      }
>  }
>  
> -void do_info_network(Monitor *mon)
> +void vlan_devices_iter(QObject *obj, void *opaque)
> +{
> +
> +    Monitor *mon = opaque;
> +    QDict *net_device = qobject_to_qdict(obj);
> +        
> +    if (!qdict_haskey(net_device, "vlan"))
> +        return;
> +
> +    monitor_printf(mon, "  %s: vlan=%d ", qdict_get_str(net_device, "name"),
> +        (int)qdict_get_int(net_device, "vlan"));
> +    monitor_printf(mon,
> +        qstring_get_str(qdict_to_qstring(qdict_get_qdict(net_device, "info"))));
> +    
> +    monitor_printf(mon, " \n");
> +}
> +
> +void non_vlan_devices_iter(QObject *obj, void *opaque)
> +{
> +
> +    Monitor *mon = opaque;
> +    QDict *net_device = qobject_to_qdict(obj);
> +    
> +    if (qdict_haskey(net_device, "vlan"))
> +        return;
> +    
> +    monitor_printf(mon, "  %s: ", qdict_get_str(net_device, "name"));
> +    
> +    if (qdict_haskey(net_device, "peer"))
> +        monitor_printf(mon, "peer=%s ", qdict_get_str(net_device, "peer"));
> +    
> +    monitor_printf(mon,
> +        qstring_get_str(qdict_to_qstring(qdict_get_qdict(net_device, "info"))));
> +    
> +    monitor_printf(mon, "\n");
> +        
> +}

 The iterators can be private, I think.

> +
> +void do_info_network_print(Monitor *mon, const QObject *ret_data)
> +{
> +    QList *qlist;
> +    
> +    qlist = qobject_to_qlist(ret_data);
> +    
> +    monitor_printf(mon, "Devices on VLANs:\n");
> +
> +    qlist_iter(qlist, vlan_devices_iter, mon);
> +
> +    monitor_printf(mon, "Devices not on any VLAN:\n");
> +    
> +    qlist_iter(qlist, non_vlan_devices_iter, mon);
> +    
> +}
> +
> +/**
> + * do_network_info(): Network information
> + *
> + * Each network device information is stored in a QDict and the
> + * returned QObject is a QList of all devices.
> + *
> + * The QDict contains the following:
> + *
> + * - "name": device name
> + * - "vlan": only present if the device is attached to a VLAN, it is the id
> + * of the VLAN
> + * - "info": it is a QDict containing any of the following: 
> + *          - "model": type of the device
> + *          - "macaddr": MAC address
> + *          - "script": path to script used to configure the device
> + *          - "downscript": path to script used to deconfigure the device
> + *          - "fd": handle to the device
> + *          - "ifname": name of the host device connected to the guest device
> + *          - "mcast": multicast address
> + *          - "cloned": true if the device is multicast clone
> + *          - "connection_from": IP/port pair of an incomming connection
> + *          - "connect_to": IP/port pair of an outgoing connection

 Any of them are mandatory or all of them are optional, meaning that
they depend on the device? If so, maybe it's better to explain a bit more.

> + *
> + * Example:
> + *
> + * [ { "name": "tap.0", "vlan": 0, 
> +       "info": { "script": "/etc/kvm/kvm-ifup", "downscript": "/etc/qemu-ifdown", 
> +       "ifname": "tap0" } }, 
> +     { "name": "e1000.0", "vlan": 1,
> +      "info": { "model": "e1000", "macaddr": "52:54:00:12:34:56" } } ]
> + */
> +void do_info_network(Monitor *mon, QObject **ret_data)
>  {
>      VLANState *vlan;
>      VLANClientState *vc;
> -
> +    QDict *net_device;
> +    QList *device_list;
> +    device_list = qlist_new();
> +        
>      QTAILQ_FOREACH(vlan, &vlans, next) {
> -        monitor_printf(mon, "VLAN %d devices:\n", vlan->id);
> -
> +        QObject *obj;
> +        
>          QTAILQ_FOREACH(vc, &vlan->clients, next) {
> -            monitor_printf(mon, "  %s: %s\n", vc->name, vc->info_str);
> +
> +            obj = qobject_from_jsonf("{ 'vlan': %d, 'name': %s }", vlan->id, vc->name);
> +            net_device = qobject_to_qdict(obj);
> +            
> +            QINCREF(vc->info_dict);
> +            qdict_put(net_device, "info", vc->info_dict);
> +
> +            qlist_append(device_list, qobject_to_qdict(obj));
> +
>          }
>      }
> -    monitor_printf(mon, "Devices not on any VLAN:\n");
> +
>      QTAILQ_FOREACH(vc, &non_vlan_clients, next) {
> -        monitor_printf(mon, "  %s: %s", vc->name, vc->info_str);
> -        if (vc->peer) {
> -            monitor_printf(mon, " peer=%s", vc->peer->name);
> -        }
> -        monitor_printf(mon, "\n");
> +        QObject *obj;
> +        
> +        obj = qobject_from_jsonf("{ 'name': %s", vc->name);
> +        net_device = qobject_to_qdict(obj);
> +
> +        QINCREF(vc->info_dict);
> +        qdict_put(net_device, "info", vc->info_dict);
> +
> +        if (vc->peer)
> +            qdict_put(net_device, "peer", qstring_from_str(vc->peer->name));
> +
> +        qlist_append(device_list, net_device);
>      }
> +
> +    *ret_data = QOBJECT(device_list);
>  }
>  
>  void do_set_link(Monitor *mon, const QDict *qdict)
> diff --git a/net.h b/net.h
> index b744294..d1cf6ab 100644
> --- a/net.h
> +++ b/net.h
> @@ -6,6 +6,7 @@
>  #include "qemu-common.h"
>  #include "qdict.h"
>  #include "qemu-option.h"
> +#include "qobject.h"
>  #include "net/queue.h"
>  
>  struct MACAddr {
> @@ -117,7 +118,10 @@ void qemu_check_nic_model(NICInfo *nd, const char *model);
>  int qemu_find_nic_model(NICInfo *nd, const char * const *models,
>                          const char *default_model);
>  
> -void do_info_network(Monitor *mon);
> +void vlan_devices_iter(QObject *obj, void *opaque);
> +void non_vlan_devices_iter(QObject *obj, void *opaque);
> +void do_info_network_print(Monitor *mon, const QObject *ret_data);
> +void do_info_network(Monitor *mon, QObject **ret_data);
>  void do_set_link(Monitor *mon, const QDict *qdict);
>  
>  /* NIC info */

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

end of thread, other threads:[~2010-04-09 17:53 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-08 20:16 [Qemu-devel] [PATCH 0/22] Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
2010-04-08 20:16 ` [Qemu-devel] [PATCH 01/22] QObject API: add qdict_to_qstring() function Miguel Di Ciurcio Filho
2010-04-09 17:26   ` [Qemu-devel] " Luiz Capitulino
2010-04-08 20:16 ` [Qemu-devel] [PATCH 02/22] net: replace qemu_nic_format_info_str and VLANClientState->info_str by QDicts Miguel Di Ciurcio Filho
2010-04-09 17:41   ` [Qemu-devel] " Luiz Capitulino
2010-04-08 20:16 ` [Qemu-devel] [PATCH 03/22] net: dp8393x: replace qemu_format_nic_info_str by qemu_format_nic_info_dict Miguel Di Ciurcio Filho
2010-04-08 20:16 ` [Qemu-devel] [PATCH 04/22] net: e1000: " Miguel Di Ciurcio Filho
2010-04-08 20:16 ` [Qemu-devel] [PATCH 05/22] net: eepro100: " Miguel Di Ciurcio Filho
2010-04-09 17:42   ` [Qemu-devel] " Luiz Capitulino
2010-04-08 20:16 ` [Qemu-devel] [PATCH 06/22] net: ne2000: " Miguel Di Ciurcio Filho
2010-04-08 20:16 ` [Qemu-devel] [PATCH 07/22] net: pcnet: " Miguel Di Ciurcio Filho
2010-04-08 20:16 ` [Qemu-devel] [PATCH 08/22] net: lan9118: " Miguel Di Ciurcio Filho
2010-04-08 20:16 ` [Qemu-devel] [PATCH 09/22] net: mcf_fec: " Miguel Di Ciurcio Filho
2010-04-08 20:16 ` [Qemu-devel] [PATCH 10/22] net: mipsnet: " Miguel Di Ciurcio Filho
2010-04-08 20:16 ` [Qemu-devel] [PATCH 11/22] net: rtl8139: " Miguel Di Ciurcio Filho
2010-04-08 20:16 ` [Qemu-devel] [PATCH 12/22] net: smc91c111: " Miguel Di Ciurcio Filho
2010-04-08 20:16 ` [Qemu-devel] [PATCH 13/22] net: stellaris_enet: " Miguel Di Ciurcio Filho
2010-04-08 20:16 ` [Qemu-devel] [PATCH 14/22] net: usb-net: " Miguel Di Ciurcio Filho
2010-04-08 20:16 ` [Qemu-devel] [PATCH 15/22] net: virtio-net: " Miguel Di Ciurcio Filho
2010-04-08 20:16 ` [Qemu-devel] [PATCH 16/22] net: xilinx_ethlite: " Miguel Di Ciurcio Filho
2010-04-08 20:16 ` [Qemu-devel] [PATCH 17/22] net: dump: " Miguel Di Ciurcio Filho
2010-04-08 20:16 ` [Qemu-devel] [PATCH 18/22] net: slirp: " Miguel Di Ciurcio Filho
2010-04-09 17:42   ` [Qemu-devel] " Luiz Capitulino
2010-04-08 20:16 ` [Qemu-devel] [PATCH 19/22] net: socket: " Miguel Di Ciurcio Filho
2010-04-09 17:47   ` [Qemu-devel] " Luiz Capitulino
2010-04-08 20:16 ` [Qemu-devel] [PATCH 20/22] net: tap: replace qemu_format_nic_info_str by info_dict Miguel Di Ciurcio Filho
2010-04-09 17:48   ` [Qemu-devel] " Luiz Capitulino
2010-04-08 20:16 ` [Qemu-devel] [PATCH 21/22] net: vde: " Miguel Di Ciurcio Filho
2010-04-08 20:16 ` [Qemu-devel] [PATCH 22/22] monitor/net: Convert do_info_network() to QObject/QMP Miguel Di Ciurcio Filho
2010-04-09 17:52   ` [Qemu-devel] " Luiz Capitulino
2010-04-09 17:25 ` [Qemu-devel] Re: [PATCH 0/22] " Luiz Capitulino

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.