summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2019-10-21 13:16:32 +0200
committerKevin Traynor <ktraynor@redhat.com>2019-10-22 14:01:46 +0100
commit6c91b0a6422d0e040e6e048310f12421e57a1c7c (patch)
treed80c5a141866402942e5b52ae935c3d25950e894
parent803838922b1f53550a9330a925bc404e591acb95 (diff)
downloaddpdk-stable-6c91b0a6422d0e040e6e048310f12421e57a1c7c.zip
dpdk-stable-6c91b0a6422d0e040e6e048310f12421e57a1c7c.tar.gz
dpdk-stable-6c91b0a6422d0e040e6e048310f12421e57a1c7c.tar.xz
kni: fix kernel 5.4 build - merged pci_aspm.h
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 <linux/pci-aspm.h> 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 <christian.ehrhardt@canonical.com> Acked-by: Luca Boccassi <bluca@debian.org>
-rw-r--r--kernel/linux/kni/ethtool/igb/kcompat.h8
-rw-r--r--kernel/linux/kni/ethtool/ixgbe/kcompat.h8
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 f041a3e..74390aa 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 <linux/pci.h>
+#else
#include <linux/pci-aspm.h>
+#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 419fd1f..64d39a7 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 <linux/pci.h>
+#else
#include <linux/pci-aspm.h>
+#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,