From: "Eugenio Pérez" <eperezma@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Harpreet Singh Anand <hanand@xilinx.com>,
Cindy Lu <lulu@redhat.com>,
Liuxiangdong <liuxiangdong5@huawei.com>,
Stefano Garzarella <sgarzare@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Zhu Lingshan <lingshan.zhu@intel.com>,
Gautam Dawar <gdawar@xilinx.com>,
Si-Wei Liu <si-wei.liu@oracle.com>, Eli Cohen <eli@mellanox.com>,
"Gonglei (Arei)" <arei.gonglei@huawei.com>,
Laurent Vivier <lvivier@redhat.com>,
Cornelia Huck <cohuck@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Parav Pandit <parav@mellanox.com>,
Jason Wang <jasowang@redhat.com>
Subject: [PATCH 1/3] virtio-net: do not reset vlan filtering at set_features
Date: Tue, 6 Sep 2022 18:36:19 +0200 [thread overview]
Message-ID: <20220906163621.1144675-2-eperezma@redhat.com> (raw)
In-Reply-To: <20220906163621.1144675-1-eperezma@redhat.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>
---
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
next prev parent reply other threads:[~2022-09-06 16:38 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 16:36 [PATCH 0/3] Vhost-vdpa Shadow Virtqueue VLAN support Eugenio Pérez
2022-09-06 16:36 ` Eugenio Pérez [this message]
2022-09-06 16:36 ` [PATCH 2/3] vdpa: load vlan configuration at NIC startup Eugenio Pérez
2022-09-09 6:38 ` Jason Wang
2022-09-09 6:40 ` Jason Wang
2022-09-09 8:01 ` Eugenio Perez Martin
2022-09-09 8:38 ` Michael S. Tsirkin
2022-09-14 2:22 ` Jason Wang
2022-09-14 11:11 ` Eugenio Perez Martin
2022-09-14 2:20 ` Jason Wang
2022-09-14 11:01 ` Eugenio Perez Martin
2022-09-14 11:32 ` Si-Wei Liu
2022-09-14 13:57 ` Eugenio Perez Martin
2022-09-14 15:43 ` Si-Wei Liu
2022-09-15 2:45 ` Jason Wang
2022-09-16 13:45 ` Eugenio Perez Martin
2022-09-21 23:00 ` Si-Wei Liu
2022-09-29 7:13 ` Michael S. Tsirkin
2022-10-04 22:33 ` Si-Wei Liu
2022-09-15 2:40 ` Jason Wang
2022-09-06 16:36 ` [PATCH 3/3] vdpa: Support VLAN on nic control shadow virtqueue Eugenio Pérez
2022-09-09 6:39 ` Jason Wang
2022-09-09 7:57 ` Eugenio Perez Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220906163621.1144675-2-eperezma@redhat.com \
--to=eperezma@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=cohuck@redhat.com \
--cc=eli@mellanox.com \
--cc=gdawar@xilinx.com \
--cc=hanand@xilinx.com \
--cc=jasowang@redhat.com \
--cc=lingshan.zhu@intel.com \
--cc=liuxiangdong5@huawei.com \
--cc=lulu@redhat.com \
--cc=lvivier@redhat.com \
--cc=mst@redhat.com \
--cc=parav@mellanox.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.com \
--cc=si-wei.liu@oracle.com \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.