Skip to content

Commit

Permalink
net/virtio: disable ctrl virtqueue for packed rings
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Freiman <jfreimann@redhat.com>
  • Loading branch information
jensfr committed Feb 6, 2018
1 parent 86eff8c commit 305f4b2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/net/virtio/virtio_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 305f4b2

Please sign in to comment.