From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id D861B27D for ; Fri, 8 Mar 2019 18:49:42 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 8 Mar 2019 19:49:39 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x28HloBL002625; Fri, 8 Mar 2019 19:49:38 +0200 From: Yongseok Koh To: Ferruh Yigit Cc: dpdk stable Date: Fri, 8 Mar 2019 09:47:43 -0800 Message-Id: <20190308174749.30771-65-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190308174749.30771-1-yskoh@mellanox.com> References: <20190308174749.30771-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'kni: fix build for igb_ndo_bridge_setlink in Linux 5.0' has been queued to LTS release 17.11.6 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: , X-List-Received-Date: Fri, 08 Mar 2019 17:49:43 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objection by 03/13/19. So please shout if anyone has objection. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Yongseok --- >>From 9c0209aa18cd5acffa73c79aa33d7e80f34efd82 Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Tue, 22 Jan 2019 15:44:29 +0000 Subject: [PATCH] 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 [ upstream commit 18cb8293e312bc3bd67211a5a540676f1c667d88 ] 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 --- lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 5 +++++ lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 1 + 2 files changed, 6 insertions(+) diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c index e0f427a30..6d8c2c774 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c @@ -2222,7 +2222,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/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h index 4c6a3c360..0ca7a22a8 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h @@ -3957,6 +3957,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.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-03-08 09:46:43.373629639 -0800 +++ 0065-kni-fix-build-for-igb_ndo_bridge_setlink-in-Linux-5..patch 2019-03-08 09:46:40.369404000 -0800 @@ -1,4 +1,4 @@ -From 18cb8293e312bc3bd67211a5a540676f1c667d88 Mon Sep 17 00:00:00 2001 +From 9c0209aa18cd5acffa73c79aa33d7e80f34efd82 Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Tue, 22 Jan 2019 15:44:29 +0000 Subject: [PATCH] kni: fix build for igb_ndo_bridge_setlink in Linux 5.0 @@ -6,6 +6,8 @@ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +[ upstream commit 18cb8293e312bc3bd67211a5a540676f1c667d88 ] + Build error seen with Linux kernel 5.0 and when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled. @@ -32,15 +34,15 @@ Signed-off-by: Ferruh Yigit --- - kernel/linux/kni/ethtool/igb/igb_main.c | 5 +++++ - kernel/linux/kni/ethtool/igb/kcompat.h | 1 + + lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 5 +++++ + lib/librte_eal/linuxapp/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, +diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c +index e0f427a30..6d8c2c774 100644 +--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c ++++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c +@@ -2222,7 +2222,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, @@ -53,11 +55,11 @@ #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) +diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +index 4c6a3c360..0ca7a22a8 100644 +--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h ++++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +@@ -3957,6 +3957,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)