DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jianfeng Tan <jianfeng.tan@intel.com>
To: dev@dpdk.org
Cc: yuanhan.liu@linux.intel.com, maxime.coquelin@redhat.com,
	thomas@monjalon.net, Jianfeng Tan <jianfeng.tan@intel.com>
Subject: [dpdk-dev] [PATCH v2 3/4] net/virtio: remove redundant MSI-X detection
Date: Thu, 27 Apr 2017 07:35:38 +0000	[thread overview]
Message-ID: <1493278539-44617-4-git-send-email-jianfeng.tan@intel.com> (raw)
In-Reply-To: <1493278539-44617-1-git-send-email-jianfeng.tan@intel.com>

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>
---
 drivers/net/virtio/virtio_pci.c | 27 ---------------------------
 1 file changed, 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;
-- 
2.7.4

  parent reply	other threads:[~2017-04-27  7:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26  4:52 [dpdk-dev] [PATCH 0/3] Some fixes on virtio LSC Jianfeng Tan
2017-04-26  4:52 ` [dpdk-dev] [PATCH 1/3] net/virtio: fix wrong MSI-X for modern devices Jianfeng Tan
2017-04-26  4:52 ` [dpdk-dev] [PATCH 2/3] net/virtio: clean up LSC setting Jianfeng Tan
2017-04-26  5:32   ` Yuanhan Liu
2017-04-26  5:44     ` Tan, Jianfeng
2017-04-26  5:52       ` Yuanhan Liu
2017-04-26  6:00         ` Tan, Jianfeng
2017-04-26 15:11       ` Michael S. Tsirkin
2017-04-27  7:34         ` Tan, Jianfeng
2017-04-26  4:52 ` [dpdk-dev] [PATCH 3/3] net/virtio: fix link status always being down Jianfeng Tan
2017-04-27  7:35 ` [dpdk-dev] [PATCH v2 0/4] fixes and cleanup on virtio LSC Jianfeng Tan
2017-04-27  7:35   ` [dpdk-dev] [PATCH v2 1/4] net/virtio: fix wrong MSI-X for modern devices Jianfeng Tan
2017-04-27  7:35   ` [dpdk-dev] [PATCH v2 2/4] net/virtio: clean up LSC setting Jianfeng Tan
2017-04-27  7:49     ` Yuanhan Liu
2017-04-28  4:48     ` Yuanhan Liu
2017-04-27  7:35   ` Jianfeng Tan [this message]
2017-04-27  7:35   ` [dpdk-dev] [PATCH v2 4/4] net/virtio: fix link status always being down Jianfeng Tan
2017-04-28  4:41   ` [dpdk-dev] [PATCH v2 0/4] fixes and cleanup on virtio LSC Yuanhan Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1493278539-44617-4-git-send-email-jianfeng.tan@intel.com \
    --to=jianfeng.tan@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=thomas@monjalon.net \
    --cc=yuanhan.liu@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).