From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 5754468D9 for ; Thu, 8 Sep 2016 19:55:00 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 08 Sep 2016 10:55:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,301,1470726000"; d="scan'208";a="1053237113" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 08 Sep 2016 10:54:58 -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 u88HsvcY002798 for ; Thu, 8 Sep 2016 18:54:58 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id u88Hsv0P010410 for ; Thu, 8 Sep 2016 18:54:57 +0100 Received: (from fyigit@localhost) by sivswdev02.ir.intel.com with id u88Hsvcx010406 for dev@dpdk.org; Thu, 8 Sep 2016 18:54:57 +0100 X-Authentication-Warning: sivswdev02.ir.intel.com: fyigit set sender to ferruh.yigit@intel.com using -f From: Ferruh Yigit To: dev@dpdk.org Date: Thu, 8 Sep 2016 18:54:56 +0100 Message-Id: <1473357296-10375-1-git-send-email-ferruh.yigit@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] kni: fix build with kernel 4.8 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: , X-List-Received-Date: Thu, 08 Sep 2016 17:55:00 -0000 Linux kernel v4.8 removes macro DEFINE_PCI_DEVICE_TABLE Linux: 7e9321599011 ("treewide: remove references to the now unnecessary DEFINE_PCI_DEVICE_TABLE") Added the macro to compatibility headers of the kni ethtool drivers. Signed-off-by: Ferruh Yigit --- lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 7 +++++++ lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h index bdd0806..9560aae 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h @@ -3915,4 +3915,11 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) /* ndo_bridge_getlink adds new filter_mask and vlan_fill parameters */ #define HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK_VLAN_FILL #endif /* >= 4.2.0 */ + +#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0) ) +#ifndef DEFINE_PCI_DEVICE_TABLE +#define DEFINE_PCI_DEVICE_TABLE(_table) const struct pci_device_id _table[] +#endif /* DEFINE_PCI_DEVICE_TABLE */ +#endif /* >= 4.8.0 */ + #endif /* _KCOMPAT_H_ */ diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h index 39ae42c..f5ef857 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h @@ -3140,4 +3140,10 @@ static inline int __kc_pci_vfs_assigned(struct pci_dev *dev) #define SET_ETHTOOL_OPS(netdev, ops) ((netdev)->ethtool_ops = (ops)) #endif /* >= 3.16.0 */ +#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0) ) +#ifndef DEFINE_PCI_DEVICE_TABLE +#define DEFINE_PCI_DEVICE_TABLE(_table) const struct pci_device_id _table[] +#endif /* DEFINE_PCI_DEVICE_TABLE */ +#endif /* >= 4.8.0 */ + #endif /* _KCOMPAT_H_ */ -- 2.7.4