From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4ohi-0001bG-LY for qemu-devel@nongnu.org; Thu, 01 Aug 2013 04:57:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4ohb-0000HG-D6 for qemu-devel@nongnu.org; Thu, 01 Aug 2013 04:57:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47938) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4ohb-0000H3-3l for qemu-devel@nongnu.org; Thu, 01 Aug 2013 04:57:43 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r718vcaa028519 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 1 Aug 2013 04:57:39 -0400 Date: Thu, 1 Aug 2013 11:59:14 +0300 From: "Michael S. Tsirkin" Message-ID: <20130801085914.GA4464@redhat.com> References: <1372055699-13501-1-git-send-email-akong@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1372055699-13501-1-git-send-email-akong@redhat.com> Subject: Re: [Qemu-devel] [PATCH for mst/pci] output nc->name in NIC_RX_FILTER_CHANGED event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: qemu-devel@nongnu.org On Mon, Jun 24, 2013 at 02:34:59PM +0800, Amos Kong wrote: > 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 Just making sure - you don't think this patch is necessary, correct? > --- > 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