From patchwork Thu Apr 27 07:35:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jianfeng Tan X-Patchwork-Id: 23950 X-Patchwork-Delegate: yuanhan.liu@linux.intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id DD2B6D040; Thu, 27 Apr 2017 09:35:05 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 40DC9CF9C for ; Thu, 27 Apr 2017 09:34:56 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP; 27 Apr 2017 00:34:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,257,1488873600"; d="scan'208";a="79495858" Received: from dpdk06.sh.intel.com ([10.239.129.195]) by orsmga002.jf.intel.com with ESMTP; 27 Apr 2017 00:34:54 -0700 From: Jianfeng Tan To: dev@dpdk.org Cc: yuanhan.liu@linux.intel.com, maxime.coquelin@redhat.com, thomas@monjalon.net, Jianfeng Tan Date: Thu, 27 Apr 2017 07:35:38 +0000 Message-Id: <1493278539-44617-4-git-send-email-jianfeng.tan@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493278539-44617-1-git-send-email-jianfeng.tan@intel.com> References: <1493182371-34295-1-git-send-email-jianfeng.tan@intel.com> <1493278539-44617-1-git-send-email-jianfeng.tan@intel.com> Subject: [dpdk-dev] [PATCH v2 3/4] net/virtio: remove redundant MSI-X detection X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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;