From patchwork Wed Jun 15 15:57:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 13842 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 2BBE7CB6A; Wed, 15 Jun 2016 17:57:49 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 83AFDCB66 for ; Wed, 15 Jun 2016 17:57:47 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 15 Jun 2016 08:57:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,476,1459839600"; d="scan'208";a="998252005" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 15 Jun 2016 08:57:45 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u5FFvi7K017473; Wed, 15 Jun 2016 16:57:44 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id u5FFvi71030262; Wed, 15 Jun 2016 16:57:44 +0100 Received: (from fyigit@localhost) by sivswdev02.ir.intel.com with id u5FFviVK030258; Wed, 15 Jun 2016 16:57:44 +0100 From: Ferruh Yigit To: dev@dpdk.org Cc: Rami Rosen , thiagocmartinsc@gmail.com, Ferruh Yigit Date: Wed, 15 Jun 2016 16:57:42 +0100 Message-Id: <1466006262-30228-1-git-send-email-ferruh.yigit@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <9B0331B6EBBD0E4684FBFAEDA55776F92CD5CBC7@HASMSX110.ger.corp.intel.com> References: <9B0331B6EBBD0E4684FBFAEDA55776F92CD5CBC7@HASMSX110.ger.corp.intel.com> Subject: [dpdk-dev] [PATCH] igb_uio: fix build with backported kernel X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Following compile error observed with CentOS 6.8, which uses kernel kernel-devel-2.6.32-642.el6.x86_64: CC eal_thread.o .../build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c: In function 'igbuio_msix_mask_irq': .../build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:157: error: 'PCI_MSIX_ENTRY_CTRL_MASKBIT' undeclared (first use in this function) Reported-by: Thiago Signed-off-by: Ferruh Yigit --- lib/librte_eal/linuxapp/igb_uio/compat.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/librte_eal/linuxapp/igb_uio/compat.h b/lib/librte_eal/linuxapp/igb_uio/compat.h index c1d45a6..0d781e4 100644 --- a/lib/librte_eal/linuxapp/igb_uio/compat.h +++ b/lib/librte_eal/linuxapp/igb_uio/compat.h @@ -24,6 +24,15 @@ #define PCI_MSIX_ENTRY_CTRL_MASKBIT 1 #endif +/* + * for kernels < 2.6.38 and backported patch that moves MSI-X entry definition + * to pci_regs.h Those kernels has PCI_MSIX_ENTRY_SIZE defined but not + * PCI_MSIX_ENTRY_CTRL_MASKBIT + */ +#ifndef PCI_MSIX_ENTRY_CTRL_MASKBIT +#define PCI_MSIX_ENTRY_CTRL_MASKBIT 1 +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34) && \ (!(defined(RHEL_RELEASE_CODE) && \ RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(5, 9)))