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 CA2A1A0C41; Thu, 16 Sep 2021 12:36:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AFD304069E; Thu, 16 Sep 2021 12:36:42 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 51C744003F for ; Thu, 16 Sep 2021 12:36:41 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10108"; a="209764354" X-IronPort-AV: E=Sophos;i="5.85,298,1624345200"; d="scan'208";a="209764354" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2021 03:36:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,298,1624345200"; d="scan'208";a="509258147" Received: from silpixa00401191.ir.intel.com ([10.55.128.95]) by fmsmga008.fm.intel.com with ESMTP; 16 Sep 2021 03:36:39 -0700 From: Anatoly Burakov To: dev@dpdk.org Date: Thu, 16 Sep 2021 10:36:37 +0000 Message-Id: <25dd76eca01ec57d64be9c0a78ac2752f602984f.1631788595.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v1 1/2] vfio: make API return values consistent 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, when VFIO support is not compiled, FreeBSD and Linux have different return values. Fix Linux implementation to follow FreeBSD one. 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/eal/linux/eal_vfio.c b/lib/eal/linux/eal_vfio.c index 25add2fa5d..b9e4d3ad3c 100644 --- a/lib/eal/linux/eal_vfio.c +++ b/lib/eal/linux/eal_vfio.c @@ -2111,19 +2111,19 @@ rte_vfio_enable(__rte_unused const char *modname) int rte_vfio_is_enabled(__rte_unused const char *modname) { - return -1; + return 0; } int rte_vfio_noiommu_is_enabled(void) { - return -1; + return 0; } int rte_vfio_clear_group(__rte_unused int vfio_group_fd) { - return -1; + return 0; } int -- 2.25.1