From 305f4b2453448402c1994caef8d8e01923660ff3 Mon Sep 17 00:00:00 2001 From: Jens Freimann Date: Tue, 6 Feb 2018 08:51:49 -0500 Subject: [PATCH] net/virtio: disable ctrl virtqueue for packed rings Signed-off-by: Jens Freiman --- drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 7a6dd1586..bc8cc6051 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1206,6 +1206,13 @@ virtio_negotiate_features(struct virtio_hw *hw, uint64_t req_features) req_features &= ~(1ULL << VIRTIO_NET_F_MTU); } + if (req_features & (1ULL << VIRTIO_F_PACKED)) { + req_features &= ~(1ull << VIRTIO_NET_F_CTRL_MAC_ADDR); + req_features &= ~(1ull << VIRTIO_NET_F_CTRL_VQ); + req_features &= ~(1ull << VIRTIO_NET_F_CTRL_RX); + req_features &= ~(1ull << VIRTIO_NET_F_CTRL_VLAN); + } + /* * Negotiate features: Subset of device feature bits are written back * guest feature bits.