peterdelevoryas / rpms / qemu

Forked from rpms/qemu 2 years ago
Clone

Blame qemu-virtio-net-mac-property-is-mandatory.patch

Justin M. Forbes 272dfe
Mac feature bit isn't going to work as all network cards already have a
Justin M. Forbes 272dfe
'mac' property to set the mac address.  Remove it from mask and add in
Justin M. Forbes 272dfe
get_features.
Justin M. Forbes 272dfe
Justin M. Forbes 272dfe
Reported-by: Gerd Hoffmann <kraxel@redhat.com>
Justin M. Forbes 272dfe
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Justin M. Forbes 272dfe
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Justin M. Forbes 272dfe
(cherry picked from commit c9f79a3f79a48de28b4575cb5644bcf45d3754d0)
Justin M. Forbes 272dfe
---
Justin M. Forbes 272dfe
 hw/virtio-net.c |    2 ++
Justin M. Forbes 272dfe
 hw/virtio-net.h |    1 -
Justin M. Forbes 272dfe
 2 files changed, 2 insertions(+), 1 deletions(-)
Justin M. Forbes 272dfe
Justin M. Forbes 272dfe
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
Justin M. Forbes 272dfe
index c2a389f..02d9180 100644
Justin M. Forbes 272dfe
--- a/hw/virtio-net.c
Justin M. Forbes 272dfe
+++ b/hw/virtio-net.c
Justin M. Forbes 272dfe
@@ -151,6 +151,8 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, uint32_t features)
Justin M. Forbes 272dfe
 {
Justin M. Forbes 272dfe
     VirtIONet *n = to_virtio_net(vdev);
Justin M. Forbes 272dfe
 
Justin M. Forbes 272dfe
+    features |= (1 << VIRTIO_NET_F_MAC);
Justin M. Forbes 272dfe
+
Justin M. Forbes 272dfe
     if (peer_has_vnet_hdr(n)) {
Justin M. Forbes 272dfe
         tap_using_vnet_hdr(n->nic->nc.peer, 1);
Justin M. Forbes 272dfe
     } else {
Justin M. Forbes 272dfe
diff --git a/hw/virtio-net.h b/hw/virtio-net.h
Justin M. Forbes 272dfe
index 9130d75..e55119b 100644
Justin M. Forbes 272dfe
--- a/hw/virtio-net.h
Justin M. Forbes 272dfe
+++ b/hw/virtio-net.h
Justin M. Forbes 272dfe
@@ -157,7 +157,6 @@ struct virtio_net_ctrl_mac {
Justin M. Forbes 272dfe
         DEFINE_VIRTIO_COMMON_FEATURES(_state, _field), \
Justin M. Forbes 272dfe
         DEFINE_PROP_BIT("csum", _state, _field, VIRTIO_NET_F_CSUM, true), \
Justin M. Forbes 272dfe
         DEFINE_PROP_BIT("guest_csum", _state, _field, VIRTIO_NET_F_GUEST_CSUM, true), \
Justin M. Forbes 272dfe
-        DEFINE_PROP_BIT("mac", _state, _field, VIRTIO_NET_F_MAC, true), \
Justin M. Forbes 272dfe
         DEFINE_PROP_BIT("gso", _state, _field, VIRTIO_NET_F_GSO, true), \
Justin M. Forbes 272dfe
         DEFINE_PROP_BIT("guest_tso4", _state, _field, VIRTIO_NET_F_GUEST_TSO4, true), \
Justin M. Forbes 272dfe
         DEFINE_PROP_BIT("guest_tso6", _state, _field, VIRTIO_NET_F_GUEST_TSO6, true), \
Justin M. Forbes 272dfe
-- 
Justin M. Forbes 272dfe
1.6.6.144.g5c3af