From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0AD05A0547; Thu, 28 Oct 2021 15:49:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CDDC141147; Thu, 28 Oct 2021 15:49:33 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 8F6084111A for ; Thu, 28 Oct 2021 15:49:32 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10150"; a="230261420" X-IronPort-AV: E=Sophos;i="5.87,190,1631602800"; d="scan'208";a="230261420" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2021 06:49:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,190,1631602800"; d="scan'208";a="487136649" Received: from silpixa00401191.ir.intel.com ([10.55.128.95]) by orsmga007.jf.intel.com with ESMTP; 28 Oct 2021 06:49:31 -0700 From: Anatoly Burakov To: dev@dpdk.org Date: Thu, 28 Oct 2021 13:49:27 +0000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: <25dd76eca01ec57d64be9c0a78ac2752f602984f.1631788595.git.anatoly.burakov@intel.com> References: <25dd76eca01ec57d64be9c0a78ac2752f602984f.1631788595.git.anatoly.burakov@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 1/4] vfio: drop fallback Linux implementation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Currently, VFIO support for Linux is compiled unconditionally, and supported kernel versions start with 4.4, so VFIO is assumed to always be enabled. There is no way of disabling VFIO support at compile time anyway, so just drop the "VFIO not available" fallback code altogether. Signed-off-by: Anatoly Burakov --- Notes: Current minimum support Linux kernel is 4.4, and Meson build file sets the RTE_EAL_VFIO config option to `true` simply because we are compiling for Linux. So, it looks like VFIO support is pretty much assumed on Linux, so i think we can safely drop the fallback dummy implementation from Linux altogether? lib/eal/linux/eal_vfio.c | 110 --------------------------------------- 1 file changed, 110 deletions(-) diff --git a/lib/eal/linux/eal_vfio.c b/lib/eal/linux/eal_vfio.c index aa2087a2da..549b86ae1d 100644 --- a/lib/eal/linux/eal_vfio.c +++ b/lib/eal/linux/eal_vfio.c @@ -20,8 +20,6 @@ #include "eal_private.h" #include "eal_internal_cfg.h" -#ifdef VFIO_PRESENT - #define VFIO_MEM_EVENT_CLB_NAME "vfio_mem_event_clb" /* hot plug/unplug of VFIO groups may cause all DMA maps to be dropped. we can @@ -2201,111 +2199,3 @@ rte_vfio_container_dma_unmap(int container_fd, uint64_t vaddr, uint64_t iova, return container_dma_unmap(vfio_cfg, vaddr, iova, len); } - -#else - -int -rte_vfio_setup_device(__rte_unused const char *sysfs_base, - __rte_unused const char *dev_addr, - __rte_unused int *vfio_dev_fd, - __rte_unused struct vfio_device_info *device_info) -{ - return -1; -} - -int -rte_vfio_release_device(__rte_unused const char *sysfs_base, - __rte_unused const char *dev_addr, __rte_unused int fd) -{ - return -1; -} - -int -rte_vfio_enable(__rte_unused const char *modname) -{ - return -1; -} - -int -rte_vfio_is_enabled(__rte_unused const char *modname) -{ - return -1; -} - -int -rte_vfio_noiommu_is_enabled(void) -{ - return -1; -} - -int -rte_vfio_clear_group(__rte_unused int vfio_group_fd) -{ - return -1; -} - -int -rte_vfio_get_group_num(__rte_unused const char *sysfs_base, - __rte_unused const char *dev_addr, - __rte_unused int *iommu_group_num) -{ - return -1; -} - -int -rte_vfio_get_container_fd(void) -{ - return -1; -} - -int -rte_vfio_get_group_fd(__rte_unused int iommu_group_num) -{ - return -1; -} - -int -rte_vfio_container_create(void) -{ - return -1; -} - -int -rte_vfio_container_destroy(__rte_unused int container_fd) -{ - return -1; -} - -int -rte_vfio_container_group_bind(__rte_unused int container_fd, - __rte_unused int iommu_group_num) -{ - return -1; -} - -int -rte_vfio_container_group_unbind(__rte_unused int container_fd, - __rte_unused int iommu_group_num) -{ - return -1; -} - -int -rte_vfio_container_dma_map(__rte_unused int container_fd, - __rte_unused uint64_t vaddr, - __rte_unused uint64_t iova, - __rte_unused uint64_t len) -{ - return -1; -} - -int -rte_vfio_container_dma_unmap(__rte_unused int container_fd, - __rte_unused uint64_t vaddr, - __rte_unused uint64_t iova, - __rte_unused uint64_t len) -{ - return -1; -} - -#endif /* VFIO_PRESENT */ -- 2.25.1