From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: [PATCH] igb_uio: fix build with backported kernel Date: Wed, 15 Jun 2016 16:57:42 +0100 Message-ID: <1466006262-30228-1-git-send-email-ferruh.yigit@intel.com> References: <9B0331B6EBBD0E4684FBFAEDA55776F92CD5CBC7@HASMSX110.ger.corp.intel.com> Cc: Rami Rosen , thiagocmartinsc@gmail.com, Ferruh Yigit To: dev@dpdk.org Return-path: 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) In-Reply-To: <9B0331B6EBBD0E4684FBFAEDA55776F92CD5CBC7@HASMSX110.ger.corp.intel.com> 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))) -- 2.5.5