|
|
ed5979 |
From b3d728b53abaae0c9884dfb5e9c216b1088196e3 Mon Sep 17 00:00:00 2001
|
|
|
ed5979 |
From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= <eperezma@redhat.com>
|
|
|
ed5979 |
Date: Wed, 21 Dec 2022 12:50:13 +0100
|
|
|
ed5979 |
Subject: [PATCH 2/9] virtio_net: copy VIRTIO_NET_S_ANNOUNCE if device model
|
|
|
ed5979 |
has it
|
|
|
ed5979 |
MIME-Version: 1.0
|
|
|
ed5979 |
Content-Type: text/plain; charset=UTF-8
|
|
|
ed5979 |
Content-Transfer-Encoding: 8bit
|
|
|
ed5979 |
|
|
|
ed5979 |
RH-Author: Eugenio Pérez <eperezma@redhat.com>
|
|
|
ed5979 |
RH-MergeRequest: 137: vDPA net SVQ guest announce support
|
|
|
ed5979 |
RH-Bugzilla: 2141088
|
|
|
ed5979 |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
ed5979 |
RH-Acked-by: Cindy Lu <lulu@redhat.com>
|
|
|
ed5979 |
RH-Acked-by: Jason Wang <jasowang@redhat.com>
|
|
|
ed5979 |
RH-Commit: [2/4] fb04186829eb93bab3c9ececf90fa5b035ffa2ec (eperezmartin/qemu-kvm)
|
|
|
ed5979 |
|
|
|
ed5979 |
Status part of the emulated feature. It will follow device model, so we
|
|
|
ed5979 |
must copy it as long as NIC device model has it set.
|
|
|
ed5979 |
|
|
|
ed5979 |
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
|
|
|
ed5979 |
Message-Id: <20221221115015.1400889-3-eperezma@redhat.com>
|
|
|
ed5979 |
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
ed5979 |
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
ed5979 |
Acked-by: Jason Wang <jasowang@redhat.com>
|
|
|
ed5979 |
(cherry picked from commit 4f93aafc8f9d731c6588f5dc5594c6a1dd1fbe66)
|
|
|
ed5979 |
---
|
|
|
ed5979 |
hw/net/virtio-net.c | 2 ++
|
|
|
ed5979 |
1 file changed, 2 insertions(+)
|
|
|
ed5979 |
|
|
|
ed5979 |
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
|
|
|
ed5979 |
index 5935e55653..948bcf33cf 100644
|
|
|
ed5979 |
--- a/hw/net/virtio-net.c
|
|
|
ed5979 |
+++ b/hw/net/virtio-net.c
|
|
|
ed5979 |
@@ -183,6 +183,8 @@ static void virtio_net_get_config(VirtIODevice *vdev, uint8_t *config)
|
|
|
ed5979 |
memcpy(netcfg.mac, n->mac, ETH_ALEN);
|
|
|
ed5979 |
}
|
|
|
ed5979 |
|
|
|
ed5979 |
+ netcfg.status |= virtio_tswap16(vdev,
|
|
|
ed5979 |
+ n->status & VIRTIO_NET_S_ANNOUNCE);
|
|
|
ed5979 |
memcpy(config, &netcfg, n->config_size);
|
|
|
ed5979 |
}
|
|
|
ed5979 |
}
|
|
|
ed5979 |
--
|
|
|
ed5979 |
2.31.1
|
|
|
ed5979 |
|