All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for mst/pci] output nc->name in NIC_RX_FILTER_CHANGED event
@ 2013-06-24  6:34 Amos Kong
  2013-06-26  3:15 ` Amos Kong
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Amos Kong @ 2013-06-24  6:34 UTC (permalink / raw)
  To: mst; +Cc: qemu-devel

netclient 'name' entry in event is useful for management to know
which device is changed. n->netclient_name is not always set.
This patch changes to use nc->name. If we don't assign 'id',
qemu will set a generated name to nc->name.

Signed-off-by: Amos Kong <akong@redhat.com>
---
 hw/net/virtio-net.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index c88403a..e4d9752 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -200,14 +200,9 @@ static void rxfilter_notify(NetClientState *nc)
     VirtIONet *n = qemu_get_nic_opaque(nc);
 
     if (nc->rxfilter_notify_enabled) {
-        if (n->netclient_name) {
-            event_data = qobject_from_jsonf("{ 'name': %s, 'path': %s }",
-                                    n->netclient_name,
-                                    object_get_canonical_path(OBJECT(n->qdev)));
-        } else {
-            event_data = qobject_from_jsonf("{ 'path': %s }",
-                                    object_get_canonical_path(OBJECT(n->qdev)));
-        }
+        event_data = qobject_from_jsonf("{ 'name': %s, 'path': %s }",
+                           nc->name,
+                           object_get_canonical_path(OBJECT(n->qdev)));
         monitor_protocol_event(QEVENT_NIC_RX_FILTER_CHANGED, event_data);
         qobject_decref(event_data);
 
-- 
1.8.1.4

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

end of thread, other threads:[~2013-08-02  1:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-24  6:34 [Qemu-devel] [PATCH for mst/pci] output nc->name in NIC_RX_FILTER_CHANGED event Amos Kong
2013-06-26  3:15 ` Amos Kong
2013-06-26 10:07   ` Markus Armbruster
2013-07-01  2:55     ` Amos Kong
2013-07-01  8:19       ` Markus Armbruster
2013-08-01 13:30       ` Andreas Färber
2013-08-01 14:16         ` Amos Kong
2013-06-26 10:02 ` Markus Armbruster
2013-07-01  2:58   ` Amos Kong
2013-08-01  8:59 ` Michael S. Tsirkin
2013-08-01 11:53   ` Amos Kong

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.