On 11/9/2017 12:01 PM, Yang, Zhiyong wrote:
static int
+virtio_intr_enable(struct rte_eth_dev *dev) {
+ struct virtio_hw *hw = dev->data->dev_private;
+
+ if (rte_intr_enable(dev->intr_handle) < 0)
+ return -1;
+
+ if (!hw->virtio_user_dev)
+ hw->use_msix = vtpci_msix_detect(RTE_ETH_DEV_TO_PCI(dev));
Maybe we can check hw->use_msix as an additional check; if it does not equal
VIRTIO_MSIX_ENABLE, returns -1.
From my understanding, it is unnecessary.
Functionality of virtio_intr_enable should be generic.
Igb_uio or other can use it. it should be no harm to others.
we add msix detect here in order to just get use_msix status.
Fair enough.
Thanks
Zhiyong