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