thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-virtio-net-fix-up-HMP-NIC-info-string-on-reset.patch

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