From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 32CC71B3B5 for ; Thu, 7 Feb 2019 14:28:22 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8DD60C01DE1B; Thu, 7 Feb 2019 13:28:21 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.33.36.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id B4983600D7; Thu, 7 Feb 2019 13:28:20 +0000 (UTC) From: Kevin Traynor To: Ferruh Yigit Cc: dpdk stable Date: Thu, 7 Feb 2019 13:25:54 +0000 Message-Id: <20190207132614.20538-48-ktraynor@redhat.com> In-Reply-To: <20190207132614.20538-1-ktraynor@redhat.com> References: <20190207132614.20538-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 07 Feb 2019 13:28:21 +0000 (UTC) Subject: [dpdk-stable] patch 'kni: fix build for igb_ndo_bridge_setlink in Linux 5.0' has been queued to LTS release 18.11.1 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: Thu, 07 Feb 2019 13:28:22 -0000 Hi, FYI, your patch has been queued to LTS release 18.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/14/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Kevin Traynor --- >>From 0e8edbe360e002847ab1e795b68692e4fa14115a 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 --- 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 @@ -2208,5 +2208,10 @@ static int igb_ndo_fdb_dump(struct sk_buff *skb, 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, 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 @@ -3943,4 +3943,5 @@ 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 */ -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-02-07 13:19:56.676020010 +0000 +++ 0048-kni-fix-build-for-igb_ndo_bridge_setlink-in-Linux-5..patch 2019-02-07 13:19:55.000000000 +0000 @@ -1,4 +1,4 @@ -From 18cb8293e312bc3bd67211a5a540676f1c667d88 Mon Sep 17 00:00:00 2001 +From 0e8edbe360e002847ab1e795b68692e4fa14115a 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.