summaryrefslogtreecommitdiff
path: root/drivers/net/virtio/virtio_pci.c
diff options
context:
space:
mode:
authorJianfeng Tan <jianfeng.tan@intel.com>2017-04-27 07:35:38 +0000
committerYuanhan Liu <yuanhan.liu@linux.intel.com>2017-04-28 07:01:22 +0200
commitee1843bd89076c59e50cadbef5c935613f543765 (patch)
tree97cfa12df1d12cfd1d0addd203a8a2593f7e116e /drivers/net/virtio/virtio_pci.c
parenta60a0c15076224b664668c09a96922f9a2c6b142 (diff)
downloaddpdk-next-eventdev-ee1843bd89076c59e50cadbef5c935613f543765.zip
dpdk-next-eventdev-ee1843bd89076c59e50cadbef5c935613f543765.tar.gz
dpdk-next-eventdev-ee1843bd89076c59e50cadbef5c935613f543765.tar.xz
net/virtio: remove redundant MSI-X detection
As we already change to use capability list to detect MSI-X, remove the redundant MSI-X detection in legacy devices. Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Diffstat (limited to 'drivers/net/virtio/virtio_pci.c')
-rw-r--r--drivers/net/virtio/virtio_pci.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index 1e17757..1df26a6 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -279,32 +279,6 @@ legacy_notify_queue(struct virtio_hw *hw, struct virtqueue *vq)
VIRTIO_PCI_QUEUE_NOTIFY);
}
-#ifdef RTE_EXEC_ENV_LINUXAPP
-static int
-legacy_virtio_has_msix(const struct rte_pci_addr *loc)
-{
- DIR *d;
- char dirname[PATH_MAX];
-
- snprintf(dirname, sizeof(dirname),
- "%s/" PCI_PRI_FMT "/msi_irqs", pci_get_sysfs_path(),
- loc->domain, loc->bus, loc->devid, loc->function);
-
- d = opendir(dirname);
- if (d)
- closedir(d);
-
- return d != NULL;
-}
-#else
-static int
-legacy_virtio_has_msix(const struct rte_pci_addr *loc __rte_unused)
-{
- /* nic_uio does not enable interrupts, return 0 (false). */
- return 0;
-}
-#endif
-
const struct virtio_pci_ops legacy_ops = {
.read_dev_cfg = legacy_read_dev_config,
.write_dev_cfg = legacy_write_dev_config,
@@ -725,7 +699,6 @@ vtpci_init(struct rte_pci_device *dev, struct virtio_hw *hw)
}
virtio_hw_internal[hw->port_id].vtpci_ops = &legacy_ops;
- hw->use_msix = legacy_virtio_has_msix(&dev->addr);
hw->modern = 0;
return 0;