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 CF5BEA320B for ; Mon, 21 Oct 2019 13:16:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3F4351BEBC; Mon, 21 Oct 2019 13:16:38 +0200 (CEST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by dpdk.org (Postfix) with ESMTP id 575121BEA4 for ; Mon, 21 Oct 2019 13:16:37 +0200 (CEST) Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iMVfx-0006Ac-6Q; Mon, 21 Oct 2019 11:16:37 +0000 From: Christian Ehrhardt To: Luca Boccassi , dpdk stable Cc: Thomas Monjalon , Christian Ehrhardt Date: Mon, 21 Oct 2019 13:16:32 +0200 Message-Id: <20191021111634.15500-2-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191021111634.15500-1-christian.ehrhardt@canonical.com> References: <20191021111634.15500-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH 1/3] kni: fix kernel 5.4 build - merged pci_aspm.h X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Due to kernel change [1] pci-aspm.h no more exists and we need to include just pci.h instead in kernels >=5.4 The failure due to that is just a not-found include: /usr/src/dpdk-rte-kni-18.11.2/ethtool/ixgbe/kcompat.h:2225:10: fatal error: linux/pci-aspm.h: No such file or directory 2225 | #include Fix it by including just pci.h depending on kernel version we build against. Not applying to master branch due to kni ethtool being removed in [2] [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7ce2e76a [2]: https://git.dpdk.org/dpdk/commit/?id=ea6b39b5 Signed-off-by: Christian Ehrhardt --- kernel/linux/kni/ethtool/igb/kcompat.h | 8 ++++++-- kernel/linux/kni/ethtool/ixgbe/kcompat.h | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h index f041a3ebe..74390aa5f 100644 --- a/kernel/linux/kni/ethtool/igb/kcompat.h +++ b/kernel/linux/kni/ethtool/igb/kcompat.h @@ -2413,13 +2413,17 @@ static inline int _kc_skb_is_gso_v6(const struct sk_buff *skb) extern void _kc_pci_disable_link_state(struct pci_dev *dev, int state); #define pci_disable_link_state(p, s) _kc_pci_disable_link_state(p, s) -#else /* < 2.6.26 */ +#else /* < 2.6.26 or > 5.4 */ +#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0) ) +#include +#else #include +#endif #define HAVE_NETDEV_VLAN_FEATURES #ifndef PCI_EXP_LNKCAP_ASPMS #define PCI_EXP_LNKCAP_ASPMS 0x00000c00 /* ASPM Support */ #endif /* PCI_EXP_LNKCAP_ASPMS */ -#endif /* < 2.6.26 */ +#endif /* < 2.6.26 or > 5.4 */ /*****************************************************************************/ #if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) ) static inline void _kc_ethtool_cmd_speed_set(struct ethtool_cmd *ep, diff --git a/kernel/linux/kni/ethtool/ixgbe/kcompat.h b/kernel/linux/kni/ethtool/ixgbe/kcompat.h index 419fd1f13..64d39a7ae 100644 --- a/kernel/linux/kni/ethtool/ixgbe/kcompat.h +++ b/kernel/linux/kni/ethtool/ixgbe/kcompat.h @@ -2221,10 +2221,14 @@ static inline int _kc_skb_is_gso_v6(const struct sk_buff *skb) extern void _kc_pci_disable_link_state(struct pci_dev *dev, int state); #define pci_disable_link_state(p, s) _kc_pci_disable_link_state(p, s) -#else /* < 2.6.26 */ +#else /* < 2.6.26 or > 5.4 */ +#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0) ) +#include +#else #include +#endif #define HAVE_NETDEV_VLAN_FEATURES -#endif /* < 2.6.26 */ +#endif /* < 2.6.26 or > 5.4 */ /*****************************************************************************/ #if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) ) static inline void _kc_ethtool_cmd_speed_set(struct ethtool_cmd *ep, -- 2.23.0