From: "Michael S. Tsirkin" <mst@redhat.com>
To: Amos Kong <akong@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for mst/pci] output nc->name in NIC_RX_FILTER_CHANGED event
Date: Thu, 1 Aug 2013 11:59:14 +0300 [thread overview]
Message-ID: <20130801085914.GA4464@redhat.com> (raw)
In-Reply-To: <1372055699-13501-1-git-send-email-akong@redhat.com>
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 <akong@redhat.com>
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
next prev parent reply other threads:[~2013-08-01 8:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2013-08-01 11:53 ` Amos Kong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130801085914.GA4464@redhat.com \
--to=mst@redhat.com \
--cc=akong@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).