[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/3] virtio-net: do not reset vlan filtering at set_features
From: |
Eugenio Pérez |
Subject: |
[PATCH 1/3] virtio-net: do not reset vlan filtering at set_features |
Date: |
Tue, 6 Sep 2022 18:36:19 +0200 |
This function is called after virtio_load, so all vlan configuration is
lost in migration case.
Just allow all the vlan-tagged packets if vlan is not configured, and
trust device reset to clear all filtered vlans.
Fixes: 0b1eaa8803 ("virtio-net: Do not filter VLANs without F_CTRL_VLAN")
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
hw/net/virtio-net.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 63a8332cd0..c1bea3fd42 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -920,9 +920,7 @@ static void virtio_net_set_features(VirtIODevice *vdev,
uint64_t features)
vhost_net_ack_features(get_vhost_net(nc->peer), features);
}
- if (virtio_has_feature(features, VIRTIO_NET_F_CTRL_VLAN)) {
- memset(n->vlans, 0, MAX_VLAN >> 3);
- } else {
+ if (!virtio_has_feature(features, VIRTIO_NET_F_CTRL_VLAN)) {
memset(n->vlans, 0xff, MAX_VLAN >> 3);
}
--
2.31.1
- [PATCH 0/3] Vhost-vdpa Shadow Virtqueue VLAN support, Eugenio Pérez, 2022/09/06
- [PATCH 1/3] virtio-net: do not reset vlan filtering at set_features,
Eugenio Pérez <=
- [PATCH 2/3] vdpa: load vlan configuration at NIC startup, Eugenio Pérez, 2022/09/06
- Re: [PATCH 2/3] vdpa: load vlan configuration at NIC startup, Jason Wang, 2022/09/09
- Re: [PATCH 2/3] vdpa: load vlan configuration at NIC startup, Jason Wang, 2022/09/09
- Re: [PATCH 2/3] vdpa: load vlan configuration at NIC startup, Eugenio Perez Martin, 2022/09/09
- Re: [PATCH 2/3] vdpa: load vlan configuration at NIC startup, Michael S. Tsirkin, 2022/09/09
- Re: [PATCH 2/3] vdpa: load vlan configuration at NIC startup, Jason Wang, 2022/09/13
- Re: [PATCH 2/3] vdpa: load vlan configuration at NIC startup, Eugenio Perez Martin, 2022/09/14
- Re: [PATCH 2/3] vdpa: load vlan configuration at NIC startup, Jason Wang, 2022/09/13
- Re: [PATCH 2/3] vdpa: load vlan configuration at NIC startup, Eugenio Perez Martin, 2022/09/14
- Re: [PATCH 2/3] vdpa: load vlan configuration at NIC startup, Si-Wei Liu, 2022/09/14