net/virtio: add Rx descriptor check
[dpdk.git] / drivers / net / virtio / virtio_ethdev.c
index 76d5fa9..05cbd1d 100644 (file)
@@ -602,7 +602,7 @@ virtio_dev_close(struct rte_eth_dev *dev)
 
        /* reset the NIC */
        if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
-               vtpci_irq_config(hw, VIRTIO_MSI_NO_VECTOR);
+               VTPCI_OPS(hw)->set_config_irq(hw, VIRTIO_MSI_NO_VECTOR);
        vtpci_reset(hw);
        virtio_dev_free_mbufs(dev);
        virtio_free_queues(hw);
@@ -739,6 +739,7 @@ static const struct eth_dev_ops virtio_eth_dev_ops = {
        .link_update             = virtio_dev_link_update,
        .rx_queue_setup          = virtio_dev_rx_queue_setup,
        .rx_queue_release        = virtio_dev_queue_release,
+       .rx_descriptor_done      = virtio_dev_rx_queue_done,
        .tx_queue_setup          = virtio_dev_tx_queue_setup,
        .tx_queue_release        = virtio_dev_queue_release,
        /* collect stats per queue */
@@ -1520,7 +1521,9 @@ virtio_dev_configure(struct rte_eth_dev *dev)
        }
 
        if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
-               if (vtpci_irq_config(hw, 0) == VIRTIO_MSI_NO_VECTOR) {
+               /* Enable vector (0) for Link State Intrerrupt */
+               if (VTPCI_OPS(hw)->set_config_irq(hw, 0) ==
+                               VIRTIO_MSI_NO_VECTOR) {
                        PMD_DRV_LOG(ERR, "failed to set config vector");
                        return -EBUSY;
                }