From: Mark McLoughlin <markmc@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm <kvm@vger.kernel.org>
Subject: [PATCH] kvm: qemu: virtio-net: set info_str
Date: Tue, 09 Dec 2008 10:58:02 +0000 [thread overview]
Message-ID: <1228820282.26198.6.camel@blaa> (raw)
Currently 'info network' shows no details for a virtio nic.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
qemu/hw/virtio-net.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c
index da2e835..18da625 100644
--- a/qemu/hw/virtio-net.c
+++ b/qemu/hw/virtio-net.c
@@ -403,6 +403,11 @@ PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
n->vc = qemu_new_vlan_client(nd->vlan, virtio_net_receive,
virtio_net_can_receive, n);
+ snprintf(n->vc->info_str, sizeof(n->vc->info_str),
+ "virtio macaddr=%02x:%02x:%02x:%02x:%02x:%02x",
+ n->mac[0], n->mac[1], n->mac[2],
+ n->mac[3], n->mac[4], n->mac[5]);
+
n->tx_timer = qemu_new_timer(vm_clock, virtio_net_tx_timer, n);
n->tx_timer_active = 0;
n->mergeable_rx_bufs = 0;
--
1.6.0.3
next reply other threads:[~2008-12-09 10:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 10:58 Mark McLoughlin [this message]
2008-12-23 17:23 ` [PATCH] kvm: qemu: virtio-net: set info_str Avi Kivity
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=1228820282.26198.6.camel@blaa \
--to=markmc@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.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 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.