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 0B001A04B5; Thu, 29 Oct 2020 20:17:08 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 56FE2C95E; Thu, 29 Oct 2020 20:17:05 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id EFFCAC94C for ; Thu, 29 Oct 2020 20:17:03 +0100 (CET) IronPort-SDR: hIjCUjLcBs4+3fQpeEAQA9WCGuBWYWQoSH1sF0m2YLGnZMfXQSO7hDefsymIb+chnRRLmBzhuZ HJzIzGJc2ckg== X-IronPort-AV: E=McAfee;i="6000,8403,9789"; a="253201649" X-IronPort-AV: E=Sophos;i="5.77,430,1596524400"; d="scan'208";a="253201649" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2020 12:17:01 -0700 IronPort-SDR: +HTwDXNprvgNMkldXmhgjZCVB3cE2ONN/YBKoUF0InIm3OdaLzvLI+L+SZzEKLoyDSzx37KzQh eIQoSEKRwR8A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,430,1596524400"; d="scan'208";a="536785801" Received: from silpixa00393944.ir.intel.com ([10.237.213.150]) by orsmga005.jf.intel.com with ESMTP; 29 Oct 2020 12:17:00 -0700 From: Hariprasad Govindharajan To: dev@dpdk.org Cc: ferruh.yigit@intel.com, anatoly.burakov@intel.com, bluca@debian.org, Hariprasad Govindharajan Date: Thu, 29 Oct 2020 19:16:57 +0000 Message-Id: <1603999017-43206-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] [DPDK_KMODS v5] linux/igb_uio: add Makefile to build the kernel module 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" With DPDK 20.11 release, the igb_uio module is no more part of DPDK. There are use cases where this module is required, for example while testing the virtual ports in OvS, the virtual ports are bound to igb_uio module inside a VM. So, this patch provides a Makefile which can be used to build this module and use as needed. Since there is no more dependency on DPDK headers, this module can be built simply by running make in the source dir Signed-off-by: Hariprasad Govindharajan --- This patch will be part of dpdk-kmods repo https://git.dpdk.org/dpdk-kmods/ --- v5: Removed the DPDK dependency v4: Corrected the indentation v3: Edited the commit message and corrected the mistakes in the variable definition v2: Added more information to the commit message --- linux/igb_uio/Makefile | 7 +++++++ linux/igb_uio/igb_uio.c | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 linux/igb_uio/Makefile diff --git a/linux/igb_uio/Makefile b/linux/igb_uio/Makefile new file mode 100644 index 0000000..09ae5d9 --- /dev/null +++ b/linux/igb_uio/Makefile @@ -0,0 +1,7 @@ +KSRC ?= /lib/modules/`uname -r`/build + +all: + make -C $(KSRC)/ M=$(PWD) + +clean: + make -C $(KSRC)/ M=$(PWD) clean diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c index 039f5a5..34a605b 100644 --- a/linux/igb_uio/igb_uio.c +++ b/linux/igb_uio/igb_uio.c @@ -15,7 +15,25 @@ #include #include -#include +/** + * These enums and MACRO definitions are copied from the + * file rte_pci_dev_features.h + */ + +/* interrupt mode */ + +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" -- 2.7.4