From patchwork Thu Oct 29 20:10:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hariprasad Govindharajan X-Patchwork-Id: 82837 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B09AFA04B5; Thu, 29 Oct 2020 21:11:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 87837C9E0; Thu, 29 Oct 2020 21:10:59 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id B4F9BC9D0 for ; Thu, 29 Oct 2020 21:10:57 +0100 (CET) IronPort-SDR: TVsn2ZB9ZDSqhX8jWlIfXVzlMCXzpnkGGwOCGkflfKE0M+OcWocLB+9mZJD83VwLpHiSW50KlH t3o8Ei6u98cw== X-IronPort-AV: E=McAfee;i="6000,8403,9789"; a="165004312" X-IronPort-AV: E=Sophos;i="5.77,430,1596524400"; d="scan'208";a="165004312" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2020 13:10:55 -0700 IronPort-SDR: ZIQvTVJqUD3dnCPxkunUSKXqTKkBZHITr2UnUhNBeIM/BJyp7C8BUGTn2EPksoWJndYZbrb3Ik AkqYIqgVkCIA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,430,1596524400"; d="scan'208";a="319082137" Received: from silpixa00393944.ir.intel.com ([10.237.213.150]) by orsmga003.jf.intel.com with ESMTP; 29 Oct 2020 13:10:54 -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 20:10:50 +0000 Message-Id: <1604002251-43812-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] [prefix=DPDK_KMODS v6 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 Acked-by: Ferruh Yigit --- linux/igb_uio/igb_uio.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c index 039f5a5..84c3071 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" From patchwork Thu Oct 29 20:10:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hariprasad Govindharajan X-Patchwork-Id: 82838 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B6B96A04B5; Thu, 29 Oct 2020 21:11:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 04B49C9D3; Thu, 29 Oct 2020 21:11:10 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 33E79C9F0 for ; Thu, 29 Oct 2020 21:11:00 +0100 (CET) IronPort-SDR: pEHKpHR3nrjg98zd5N4yDtBCSb1PK2biQOLZcDxZfWIzMLZwvzv6YhWhnLAZbBupEq1Mk0ZWR8 UpTH6OZ8g4nA== X-IronPort-AV: E=McAfee;i="6000,8403,9789"; a="165004319" X-IronPort-AV: E=Sophos;i="5.77,430,1596524400"; d="scan'208";a="165004319" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2020 13:10:59 -0700 IronPort-SDR: C+K1DJHyZgk0kR52CR7XwcRFavqcykCN8eI/Pw5h4fV7KWRej8Zlo0VTc1sHQO4lPIbmRZARQA gAxwBQ7aSb/A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,430,1596524400"; d="scan'208";a="319082169" Received: from silpixa00393944.ir.intel.com ([10.237.213.150]) by orsmga003.jf.intel.com with ESMTP; 29 Oct 2020 13:10:58 -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 20:10:51 +0000 Message-Id: <1604002251-43812-2-git-send-email-hariprasad.govindharajan@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1604002251-43812-1-git-send-email-hariprasad.govindharajan@intel.com> References: <1601909255-26251-1-git-send-email-hariprasad.govindharajan@intel.com> <1604002251-43812-1-git-send-email-hariprasad.govindharajan@intel.com> Subject: [dpdk-dev] [prefix=DPDK_KMODS v6 2/2] linux/igb_uio: add Makefile to build the igb_uio 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 Acked-by: Ferruh Yigit --- This patch will be part of dpdk-kmods repo https://git.dpdk.org/dpdk-kmods/ --- v6: split the patch into two patches to create a patchset 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 +++++++ 1 file changed, 7 insertions(+) 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