[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 10/53] virtio-net: do not reset vlan filtering at set_features
|
From: |
Michael S. Tsirkin |
|
Subject: |
[PULL v2 10/53] virtio-net: do not reset vlan filtering at set_features |
|
Date: |
Wed, 4 Oct 2023 23:42:59 -0400 |
From: Hawkins Jiawei <yin31149@gmail.com>
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>
Reviewed-by: Hawkins Jiawei <yin31149@gmail.com>
Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
Message-Id:
<95af0d013281282f48ad3f47f6ad1ac4ca9e52eb.1690106284.git.yin31149@gmail.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@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 5a0201c423..1c31374334 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -1029,9 +1029,7 @@ static void virtio_net_set_features(VirtIODevice *vdev,
uint64_t features)
vhost_net_save_acked_features(nc->peer);
}
- 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);
}
--
MST
- [PULL v2 02/53] hw/virtio: Propagate page_mask to vhost_vdpa_listener_skipped_section(), (continued)
- [PULL v2 02/53] hw/virtio: Propagate page_mask to vhost_vdpa_listener_skipped_section(), Michael S. Tsirkin, 2023/10/04
- [PULL v2 05/53] hw/virtio/vhost-vdpa: Use target-agnostic qemu_target_page_mask(), Michael S. Tsirkin, 2023/10/04
- [PULL v2 04/53] hw/virtio/vhost-vdpa: Inline TARGET_PAGE_ALIGN() macro, Michael S. Tsirkin, 2023/10/04
- [PULL v2 03/53] hw/virtio: Propagate page_mask to vhost_vdpa_section_end(), Michael S. Tsirkin, 2023/10/04
- [PULL v2 07/53] hw/virtio/meson: Rename softmmu_virtio_ss[] -> system_virtio_ss[], Michael S. Tsirkin, 2023/10/04
- [PULL v2 06/53] hw/virtio: Build vhost-vdpa.o once, Michael S. Tsirkin, 2023/10/04
- [PULL v2 11/53] virtio-net: Expose MAX_VLAN, Michael S. Tsirkin, 2023/10/04
- [PULL v2 08/53] virtio: add vhost-user-base and a generic vhost-user-device, Michael S. Tsirkin, 2023/10/04
- [PULL v2 12/53] vdpa: Restore vlan filtering state, Michael S. Tsirkin, 2023/10/04
- [PULL v2 13/53] vdpa: Allow VIRTIO_NET_F_CTRL_VLAN in SVQ, Michael S. Tsirkin, 2023/10/04
- [PULL v2 10/53] virtio-net: do not reset vlan filtering at set_features,
Michael S. Tsirkin <=
- [PULL v2 09/53] hw/virtio: add config support to vhost-user-device, Michael S. Tsirkin, 2023/10/04
- [PULL v2 16/53] vdpa: export vhost_vdpa_set_vring_ready, Michael S. Tsirkin, 2023/10/04
- [PULL v2 14/53] virtio: don't zero out memory region cache for indirect descriptors, Michael S. Tsirkin, 2023/10/04
- [PULL v2 17/53] vdpa: rename vhost_vdpa_net_load to vhost_vdpa_net_cvq_load, Michael S. Tsirkin, 2023/10/04
- [PULL v2 15/53] vdpa: use first queue SVQ state for CVQ default, Michael S. Tsirkin, 2023/10/04
- [PULL v2 19/53] vdpa: remove net cvq migration blocker, Michael S. Tsirkin, 2023/10/04
- [PULL v2 18/53] vdpa: move vhost_vdpa_set_vring_ready to the caller, Michael S. Tsirkin, 2023/10/04
- [PULL v2 21/53] qmp: remove virtio_list, search QOM tree instead, Michael S. Tsirkin, 2023/10/04
- [PULL v2 20/53] vhost: Add count argument to vhost_svq_poll(), Michael S. Tsirkin, 2023/10/04
- [PULL v2 23/53] vhost-user: move VhostUserProtocolFeature definition to header file, Michael S. Tsirkin, 2023/10/04