From patchwork Thu May 1 04:26:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenchao Xia X-Patchwork-Id: 344412 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AED5C140102 for ; Thu, 1 May 2014 14:34:28 +1000 (EST) Received: from localhost ([::1]:60367 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfihW-0000ij-JY for incoming@patchwork.ozlabs.org; Thu, 01 May 2014 00:34:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WficA-000227-VJ for qemu-devel@nongnu.org; Thu, 01 May 2014 00:29:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wfic1-0002Pl-Ud for qemu-devel@nongnu.org; Thu, 01 May 2014 00:28:54 -0400 Received: from mail-ie0-x22a.google.com ([2607:f8b0:4001:c03::22a]:59283) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wfic1-0002Ph-NT for qemu-devel@nongnu.org; Thu, 01 May 2014 00:28:45 -0400 Received: by mail-ie0-f170.google.com with SMTP id rd18so3035895iec.15 for ; Wed, 30 Apr 2014 21:28:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+XDWgYimDoDiP2lIwfNCDVv2L6HjMwlUhiRo4JRCmyY=; b=oDq+ZGCeiAdR8sNyKnw2cwbF3jhw44sl0HYxQRkzXGeeVZQeCBAacyVd/tGF6iGB2v E+2jAg6tmfSS+ISCO/LB7XtFRHSY+pofw73chi8R1rHtD8wiqZ/xzrkFi6efaGaJ0qmK pMBXHjH8U+Eku9/3/lLRZVT6VayXonsLR8SfdbrNhi16n7DMffaxgNGLn3T17qgD8yAz /GRW80GpVetmtqZjcloiQR0BMaSI+pdZbSQKmIxVYF7OGMYE4YJ4iJnqEUWSB24FOIVk U0Ihw+XwfKfHbbi3YF/8aPVtFYGN/kpQ4/IMnAx6sDCK2cdzuumYaapHsYcPfVNX0FqQ GchQ== X-Received: by 10.43.80.5 with SMTP id zs5mr64120icb.72.1398918525258; Wed, 30 Apr 2014 21:28:45 -0700 (PDT) Received: from localhost.localdomain.localdomain ([118.250.93.201]) by mx.google.com with ESMTPSA id ii7sm4626797igb.17.2014.04.30.21.28.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Apr 2014 21:28:44 -0700 (PDT) From: Wenchao Xia To: qemu-devel@nongnu.org Date: Wed, 30 Apr 2014 21:26:56 -0700 Message-Id: <1398918422-3019-23-git-send-email-wenchaoqemu@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1398918422-3019-1-git-send-email-wenchaoqemu@gmail.com> References: <1398918422-3019-1-git-send-email-wenchaoqemu@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::22a Cc: mdroth@linux.vnet.ibm.com, armbru@redhat.com, Wenchao Xia , lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH V5 22/28] qapi event: convert NIC_RX_FILTER_CHANGED X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Wenchao Xia --- hw/net/virtio-net.c | 13 +++---------- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 33bd233..216d4e1 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -22,7 +22,7 @@ #include "net/vhost_net.h" #include "hw/virtio/virtio-bus.h" #include "qapi/qmp/qjson.h" -#include "monitor/monitor.h" +#include "qapi-event.h" #define VIRTIO_NET_VM_VERSION 11 @@ -196,19 +196,12 @@ static void virtio_net_set_link_status(NetClientState *nc) static void rxfilter_notify(NetClientState *nc) { - QObject *event_data; VirtIONet *n = qemu_get_nic_opaque(nc); if (nc->rxfilter_notify_enabled) { gchar *path = object_get_canonical_path(OBJECT(n->qdev)); - if (n->netclient_name) { - event_data = qobject_from_jsonf("{ 'name': %s, 'path': %s }", - n->netclient_name, path); - } else { - event_data = qobject_from_jsonf("{ 'path': %s }", path); - } - monitor_protocol_event(QEVENT_NIC_RX_FILTER_CHANGED, event_data); - qobject_decref(event_data); + qapi_event_send_nic_rx_filter_changed(!!n->netclient_name, + n->netclient_name, path, NULL); g_free(path); /* disable event notification to avoid events flooding */