From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 46FB0A04B5; Fri, 30 Oct 2020 00:17:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7FF60CB76; Fri, 30 Oct 2020 00:17:32 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 6DD61CB27 for ; Fri, 30 Oct 2020 00:17:30 +0100 (CET) IronPort-SDR: k0D1rlJ41REdQc9rd5s+83cLck9ixueGsRcJuJuEMrqkUFr1jRgSVrz37pRb/3sDiTIX7ayjJK o9rsmFPtrQbA== X-IronPort-AV: E=McAfee;i="6000,8403,9789"; a="165943400" X-IronPort-AV: E=Sophos;i="5.77,431,1596524400"; d="scan'208";a="165943400" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2020 16:17:28 -0700 IronPort-SDR: bVv7WQ732DTF9O+MdU0ORwsohnvChy22QCBDLl7E9RxNmSY4vcTYsEauEg1mx2bLdxjlBn8FQU NRmt3xn5sZkQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,431,1596524400"; d="scan'208";a="319132433" Received: from silpixa00393944.ir.intel.com ([10.237.213.150]) by orsmga003.jf.intel.com with ESMTP; 29 Oct 2020 16:17:25 -0700 From: Hariprasad Govindharajan To: dev@dpdk.org Cc: ferruh.yigit@intel.com, anatoly.burakov@intel.com, bluca@debian.org, thomas@monjalon.net, david.marchand@redhat.com, Hariprasad Govindharajan Date: Thu, 29 Oct 2020 23:17:21 +0000 Message-Id: <1604013442-44841-1-git-send-email-hariprasad.govindharajan@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1601909255-26251-1-git-send-email-hariprasad.govindharajan@intel.com> References: <1601909255-26251-1-git-send-email-hariprasad.govindharajan@intel.com> Subject: [dpdk-dev] [PATCH DPDK_KMODS v7 1/2] linux/igb_uio: remove DPDK dependency for building igb_uio 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" The igb_uio source code requires interrupt modes defined as MACROS and enums in the header file rte_pci_dev_features.h. Now, the definitions are moved to the igb_uio.c file so that this module can be built without building DPDK Signed-off-by: Hariprasad Govindharajan --- linux/igb_uio/igb_uio.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c index 3cf394b..7ef8170 100644 --- a/linux/igb_uio/igb_uio.c +++ b/linux/igb_uio/igb_uio.c @@ -15,7 +15,21 @@ #include #include -#include +/** + * This enums and macro definitions are copied from the + * file rte_pci_dev_features.h + */ +enum rte_intr_mode { + RTE_INTR_MODE_NONE = 0, + RTE_INTR_MODE_LEGACY, + RTE_INTR_MODE_MSI, + RTE_INTR_MODE_MSIX +}; +#define RTE_INTR_MODE_NONE_NAME "none" +#define RTE_INTR_MODE_LEGACY_NAME "legacy" +#define RTE_INTR_MODE_MSI_NAME "msi" +#define RTE_INTR_MODE_MSIX_NAME "msix" + #include "compat.h" @@ -236,7 +250,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev) } #endif - /* fall back to MSI */ + /* falls through - to MSI */ case RTE_INTR_MODE_MSI: #ifndef HAVE_ALLOC_IRQ_VECTORS if (pci_enable_msi(udev->pdev) == 0) { @@ -255,7 +269,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev) break; } #endif - /* fall back to INTX */ + /* falls through - to INTX */ case RTE_INTR_MODE_LEGACY: if (pci_intx_mask_supported(udev->pdev)) { dev_dbg(&udev->pdev->dev, "using INTX"); @@ -265,7 +279,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev) break; } dev_notice(&udev->pdev->dev, "PCI INTX mask not supported\n"); - /* fall back to no IRQ */ + /* falls through - to no IRQ */ case RTE_INTR_MODE_NONE: udev->mode = RTE_INTR_MODE_NONE; udev->info.irq = UIO_IRQ_NONE; -- 2.7.4