From 418947bb253989027df4db46253287436792abd9 Mon Sep 17 00:00:00 2001 From: Amos Kong Date: Tue, 5 Nov 2013 09:17:42 +0100 Subject: [PATCH 10/25] virtio-net: fix up HMP NIC info string on reset RH-Author: Amos Kong Message-id: <1383643062-1844-5-git-send-email-akong@redhat.com> Patchwork-id: 55371 O-Subject: [RHEL-7.0 qemu-kvm PATCH 4/4] virtio-net: fix up HMP NIC info string on reset Bugzilla: 1026689 RH-Acked-by: Vlad Yasevich RH-Acked-by: Alex Williamson RH-Acked-by: Xiao Wang RH-Acked-by: Michael S. Tsirkin From: Michael S. Tsirkin Bugzilla: 1026689 When mac is updated on reset, info string has stale data. Fix it up. Signed-off-by: Michael S. Tsirkin (cherry picked from commit 702d66a813dd84afd7c3d1ad8cbdcc8e3449bcd9) --- hw/net/virtio-net.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) Signed-off-by: Miroslav Rezanina --- hw/net/virtio-net.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 9ebcdfe..3290013 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -213,6 +213,7 @@ static void virtio_net_reset(VirtIODevice *vdev) n->mac_table.uni_overflow = 0; memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN); memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac)); + qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); memset(n->vlans, 0, MAX_VLAN >> 3); } -- 1.7.1