When VIRTIO_F_PACKED_RING is set, don't call virtio_disable_intr(). This function accesses data structures which are not available when packed virtqueues are enabled.
Signed-off-by: Jens Freimann <jfreim...@redhat.com> --- drivers/net/virtio/virtio_ethdev.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 825b6c303..76879d87f 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -324,12 +324,11 @@ virtio_init_vring(struct virtqueue *vq) vq->vq_desc_tail_idx = (uint16_t)(vq->vq_nentries - 1); vring_desc_init(vr->desc, size); + /* + * Disable device(host) interrupting guest + */ + virtqueue_disable_intr(vq); } - - /* - * Disable device(host) interrupting guest - */ - virtqueue_disable_intr(vq); } static int @@ -747,7 +746,8 @@ virtio_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id) struct virtnet_rx *rxvq = dev->data->rx_queues[queue_id]; struct virtqueue *vq = rxvq->vq; - virtqueue_disable_intr(vq); + if (!vtpci_packed_queue(vq->hw)) + virtqueue_disable_intr(vq); return 0; } -- 2.14.3