From patchwork Wed May 15 12:12:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: fred.konrad@greensocs.com X-Patchwork-Id: 244055 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D29DE2C007A for ; Wed, 15 May 2013 22:13:38 +1000 (EST) Received: from localhost ([::1]:60163 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcaaO-00083h-Tb for incoming@patchwork.ozlabs.org; Wed, 15 May 2013 08:13:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcaZp-0007v9-K8 for qemu-devel@nongnu.org; Wed, 15 May 2013 08:13:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcaZn-00053z-B4 for qemu-devel@nongnu.org; Wed, 15 May 2013 08:13:01 -0400 Received: from ns232118.ovh.net ([178.33.234.66]:47398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcaZn-00053f-1V for qemu-devel@nongnu.org; Wed, 15 May 2013 08:12:59 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ns232118.ovh.net (Postfix) with ESMTP id C41DB21CCD; Wed, 15 May 2013 14:12:40 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at Received: from ns232118.ovh.net ([127.0.0.1]) by localhost (ns232118.ovh.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8KRiSKve_ujC; Wed, 15 May 2013 14:12:39 +0200 (CEST) Received: by ns232118.ovh.net (Postfix, from userid 998) id 1801A21CBB; Wed, 15 May 2013 14:12:39 +0200 (CEST) Received: from compaq.katmai.xl.cx.katmai.xl.cx (lan31-11-83-155-143-136.fbx.proxad.net [83.155.143.136]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: fred.konrad@greensocs.com) by ns232118.ovh.net (Postfix) with ESMTPSA id 95C4821CCE; Wed, 15 May 2013 14:12:38 +0200 (CEST) From: fred.konrad@greensocs.com To: qemu-devel@nongnu.org, aliguori@us.ibm.com Date: Wed, 15 May 2013 14:12:50 +0200 Message-Id: <1368619970-23892-3-git-send-email-fred.konrad@greensocs.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1368619970-23892-1-git-send-email-fred.konrad@greensocs.com> References: <1368619970-23892-1-git-send-email-fred.konrad@greensocs.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 178.33.234.66 Cc: peter.maydell@linaro.org, matrixs.zero@gmail.com, mark.burton@greensocs.com, stefanha@redhat.com, cornelia.huck@de.ibm.com, akong@redhat.com, fred.konrad@greensocs.com Subject: [Qemu-devel] [PATCH for-1.5 2/2] virtio-net-x: forward the netclient name and type. 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 From: KONRAD Frederic This forwards the name and the type of virtio-net-x to fix the bad behaviour of "info network" command. Signed-off-by: KONRAD Frederic --- hw/s390x/s390-virtio-bus.c | 3 +++ hw/s390x/virtio-ccw.c | 3 +++ hw/virtio/virtio-pci.c | 3 +++ 3 files changed, 9 insertions(+) diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c index 5a3d97c..a1cdfb0 100644 --- a/hw/s390x/s390-virtio-bus.c +++ b/hw/s390x/s390-virtio-bus.c @@ -152,10 +152,13 @@ static int s390_virtio_device_init(VirtIOS390Device *dev, VirtIODevice *vdev) static int s390_virtio_net_init(VirtIOS390Device *s390_dev) { + DeviceState *qdev = DEVICE(s390_dev); VirtIONetS390 *dev = VIRTIO_NET_S390(s390_dev); DeviceState *vdev = DEVICE(&dev->vdev); virtio_net_set_config_size(&dev->vdev, s390_dev->host_features); + virtio_net_set_netclient_name(&dev->vdev, qdev->id, + object_get_typename(OBJECT(qdev))); qdev_set_parent_bus(vdev, BUS(&s390_dev->bus)); if (qdev_init(vdev) < 0) { return -1; diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 76e6d32..5f5e267 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -550,10 +550,13 @@ static int virtio_ccw_exit(VirtioCcwDevice *dev) static int virtio_ccw_net_init(VirtioCcwDevice *ccw_dev) { + DeviceState *qdev = DEVICE(ccw_dev); VirtIONetCcw *dev = VIRTIO_NET_CCW(ccw_dev); DeviceState *vdev = DEVICE(&dev->vdev); virtio_net_set_config_size(&dev->vdev, ccw_dev->host_features[0]); + virtio_net_set_netclient_name(&dev->vdev, qdev->id, + object_get_typename(OBJECT(qdev))); qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus)); if (qdev_init(vdev) < 0) { return -1; diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 113fbd9..70d2c6b 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -1398,10 +1398,13 @@ static Property virtio_net_properties[] = { static int virtio_net_pci_init(VirtIOPCIProxy *vpci_dev) { + DeviceState *qdev = DEVICE(vpci_dev); VirtIONetPCI *dev = VIRTIO_NET_PCI(vpci_dev); DeviceState *vdev = DEVICE(&dev->vdev); virtio_net_set_config_size(&dev->vdev, vpci_dev->host_features); + virtio_net_set_netclient_name(&dev->vdev, qdev->id, + object_get_typename(OBJECT(qdev))); qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus)); if (qdev_init(vdev) < 0) { return -1;