diff options
author | Christian Ehrhardt <christian.ehrhardt@canonical.com> | 2019-02-07 15:58:39 +0100 |
---|---|---|
committer | Christian Ehrhardt <christian.ehrhardt@canonical.com> | 2019-02-07 15:58:39 +0100 |
commit | 103378860f5a9545f0fa4978a9960a99215d3fd7 (patch) | |
tree | cbf740d55cc6b429c956ad9e5530fdda232ec06f /debian/patches/0002-kni-fix-build-for-igb_ndo_bridge_setlink-in-Linux-5..patch | |
parent | 72e31215a4438d5b6d67cc336a88a89a90c6482a (diff) |
- d/p/*kni-fix-build*: fix build with kernel 5.0 (LP: #1814919)
Change-Id: I60e76656f450ecd0ef296521ff6e6023d8f8202e
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'debian/patches/0002-kni-fix-build-for-igb_ndo_bridge_setlink-in-Linux-5..patch')
-rw-r--r-- | debian/patches/0002-kni-fix-build-for-igb_ndo_bridge_setlink-in-Linux-5..patch | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/debian/patches/0002-kni-fix-build-for-igb_ndo_bridge_setlink-in-Linux-5..patch b/debian/patches/0002-kni-fix-build-for-igb_ndo_bridge_setlink-in-Linux-5..patch new file mode 100644 index 00000000..0339a543 --- /dev/null +++ b/debian/patches/0002-kni-fix-build-for-igb_ndo_bridge_setlink-in-Linux-5..patch @@ -0,0 +1,75 @@ +From 18cb8293e312bc3bd67211a5a540676f1c667d88 Mon Sep 17 00:00:00 2001 +From: Ferruh Yigit <ferruh.yigit@intel.com> +Date: Tue, 22 Jan 2019 15:44:29 +0000 +Subject: [PATCH 2/2] kni: fix build for igb_ndo_bridge_setlink in Linux 5.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Build error seen with Linux kernel 5.0 and +when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled. + +build error: +.../build/build/kernel/linux/kni/igb_main.c:2348:24: + error: initialization of + ‘int (*)(struct net_device *, struct nlmsghdr *, u16, + struct netlink_ext_ack *)’ + {aka ‘int (*)(struct net_device *, struct nlmsghdr *, + short unsigned int, struct netlink_ext_ack *)’} + from incompatible pointer type + ‘int (*)(struct net_device *, struct nlmsghdr *, u16)’ + {aka ‘int (*)(struct net_device *, struct nlmsghdr *, + short unsigned int)’} + [-Werror=incompatible-pointer-types] + .ndo_bridge_setlink = igb_ndo_bridge_setlink, + ^~~~~~~~~~~~~~~~~~~~~~ +.../build/build/kernel/linux/kni/igb_main.c:2348:24: + note: (near initialization for ‘igb_netdev_ops.ndo_bridge_setlink’) + +igb_ndo_bridge_setlink() is changed in Linux kernel version 5.0 +and now requires a new parameter, 'struct netlink_ext_ack *extack'. +Fixed by adding a new parameter with a kernel version check. + +Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> + +Origin: upstream, https://git.dpdk.org/dpdk/commit/?id=18cb8293e312bc3bd67211a5a540676f1c667d88 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1814919 +Last-Update: 2019-02-07 + +--- + kernel/linux/kni/ethtool/igb/igb_main.c | 5 +++++ + kernel/linux/kni/ethtool/igb/kcompat.h | 1 + + 2 files changed, 6 insertions(+) + +diff --git a/kernel/linux/kni/ethtool/igb/igb_main.c b/kernel/linux/kni/ethtool/igb/igb_main.c +index af378d2f2..0b4faeae5 100644 +--- a/kernel/linux/kni/ethtool/igb/igb_main.c ++++ b/kernel/linux/kni/ethtool/igb/igb_main.c +@@ -2207,7 +2207,12 @@ static int igb_ndo_fdb_dump(struct sk_buff *skb, + #ifdef HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS + static int igb_ndo_bridge_setlink(struct net_device *dev, + struct nlmsghdr *nlh, ++#ifdef HAVE_NDO_BRIDGE_SETLINK_EXTACK ++ u16 flags, struct netlink_ext_ack *extack) ++#else + u16 flags) ++#endif ++ + #else + static int igb_ndo_bridge_setlink(struct net_device *dev, + struct nlmsghdr *nlh) +diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h +index 068cfeb52..11b15f3a9 100644 +--- a/kernel/linux/kni/ethtool/igb/kcompat.h ++++ b/kernel/linux/kni/ethtool/igb/kcompat.h +@@ -3942,6 +3942,7 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) + + #if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) ) + #define dev_open(x) dev_open(x, NULL) ++#define HAVE_NDO_BRIDGE_SETLINK_EXTACK + #endif /* >= 5.0.0 */ + + #if defined(timer_setup) && defined(from_timer) +-- +2.17.1 + |