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 B61AA1B49A for ; Thu, 22 Nov 2018 17:52:31 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B1B9D1F566; Thu, 22 Nov 2018 16:52:30 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA8E560E3F; Thu, 22 Nov 2018 16:52:29 +0000 (UTC) From: Kevin Traynor To: Ferruh Yigit Cc: dpdk stable Date: Thu, 22 Nov 2018 16:49:28 +0000 Message-Id: <20181122164957.13003-36-ktraynor@redhat.com> In-Reply-To: <20181122164957.13003-1-ktraynor@redhat.com> References: <20181122164957.13003-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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 22 Nov 2018 16:52:30 +0000 (UTC) Subject: [dpdk-stable] patch 'kni: fix build on Linux 4.19' has been queued to stable release 18.08.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, 22 Nov 2018 16:52:32 -0000 Hi, FYI, your patch has been queued to stable release 18.08.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 11/28/18. 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. 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. Kevin Traynor --- >>From 91f81a731aa0aca9908fc03166de5a41372f2950 Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Wed, 24 Oct 2018 12:10:10 +0100 Subject: [PATCH] kni: fix build on Linux 4.19 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit a9460a0b2efb80a913d8770dc188e816b227622f ] The build error observed with Linux kernel 4.19 when KNI ethtool support enabled (CONFIG_RTE_KNI_KMOD_ETHTOOL=y) .../build/build/kernel/linux/kni/kni_ethtool.c:193:3: error: ‘struct ethtool_ops’ has no member named ‘get_settings’; .get_settings = kni_get_settings, ^~~~~~~~~~~~ .../build/build/kernel/linux/kni/kni_ethtool.c:194:3: error: ‘struct ethtool_ops’ has no member named ‘set_settings’; .set_settings = kni_set_settings, ^~~~~~~~~~~~ With kernel 4.19 ethtool_ops `get_settings` & `set_settings` are replaced with `get_link_ksettings` & `set_link_ksettings` Commit 9b3004953503 ("ethtool: drop get_settings and set_settings callbacks") This fix practically removes `get_settings` & `set_settings` support for the kernel versions that have the new ethtool_ops without implementing the new ones. Signed-off-by: Ferruh Yigit --- kernel/linux/kni/ethtool/igb/igb_ethtool.c | 8 ++++++++ kernel/linux/kni/ethtool/ixgbe/ixgbe.h | 2 ++ kernel/linux/kni/ethtool/ixgbe/ixgbe_ethtool.c | 8 ++++++++ kernel/linux/kni/kni_ethtool.c | 10 ++++++++++ 4 files changed, 28 insertions(+) diff --git a/kernel/linux/kni/ethtool/igb/igb_ethtool.c b/kernel/linux/kni/ethtool/igb/igb_ethtool.c index 002f75c48..b6bddc025 100644 --- a/kernel/linux/kni/ethtool/igb/igb_ethtool.c +++ b/kernel/linux/kni/ethtool/igb/igb_ethtool.c @@ -136,4 +136,5 @@ static const char igb_gstrings_test[][ETH_GSTRING_LEN] = { #endif /* ETHTOOL_TEST */ +#ifndef ETHTOOL_GLINKSETTINGS static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { @@ -260,5 +261,7 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) return 0; } +#endif +#ifndef ETHTOOL_SLINKSETTINGS static int igb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { @@ -365,4 +368,5 @@ static int igb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) return 0; } +#endif static u32 igb_get_link(struct net_device *netdev) @@ -2738,6 +2742,10 @@ static int igb_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd) static const struct ethtool_ops igb_ethtool_ops = { +#ifndef ETHTOOL_GLINKSETTINGS .get_settings = igb_get_settings, +#endif +#ifndef ETHTOOL_SLINKSETTINGS .set_settings = igb_set_settings, +#endif .get_drvinfo = igb_get_drvinfo, .get_regs_len = igb_get_regs_len, diff --git a/kernel/linux/kni/ethtool/ixgbe/ixgbe.h b/kernel/linux/kni/ethtool/ixgbe/ixgbe.h index 6ff941334..cc15ec6ab 100644 --- a/kernel/linux/kni/ethtool/ixgbe/ixgbe.h +++ b/kernel/linux/kni/ethtool/ixgbe/ixgbe.h @@ -891,6 +891,8 @@ s32 ixgbe_dcb_hw_ets(struct ixgbe_hw *hw, struct ieee_ets *ets, int max_frame); extern void ixgbe_clean_rx_ring(struct ixgbe_ring *rx_ring); +#ifndef ETHTOOL_GLINKSETTINGS extern int ixgbe_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd); +#endif extern int ixgbe_write_uc_addr_list(struct ixgbe_adapter *adapter, struct net_device *netdev, unsigned int vfn); diff --git a/kernel/linux/kni/ethtool/ixgbe/ixgbe_ethtool.c b/kernel/linux/kni/ethtool/ixgbe/ixgbe_ethtool.c index 44cdc9f20..f2ded19e9 100644 --- a/kernel/linux/kni/ethtool/ixgbe/ixgbe_ethtool.c +++ b/kernel/linux/kni/ethtool/ixgbe/ixgbe_ethtool.c @@ -159,4 +159,5 @@ static const char ixgbe_gstrings_test[][ETH_GSTRING_LEN] = { #endif /* ETHTOOL_TEST */ +#ifndef ETHTOOL_GLINKSETTINGS int ixgbe_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) @@ -348,5 +349,7 @@ int ixgbe_get_settings(struct net_device *netdev, return 0; } +#endif +#ifndef ETHTOOL_SLINKSETTINGS static int ixgbe_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) @@ -392,4 +395,5 @@ static int ixgbe_set_settings(struct net_device *netdev, return err; } +#endif static void ixgbe_get_pauseparam(struct net_device *netdev, @@ -2816,6 +2820,10 @@ static int ixgbe_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd) //static struct ethtool_ops ixgbe_ethtool_ops = { +#ifndef ETHTOOL_GLINKSETTINGS .get_settings = ixgbe_get_settings, +#endif +#ifndef ETHTOOL_SLINKSETTINGS .set_settings = ixgbe_set_settings, +#endif .get_drvinfo = ixgbe_get_drvinfo, .get_regs_len = ixgbe_get_regs_len, diff --git a/kernel/linux/kni/kni_ethtool.c b/kernel/linux/kni/kni_ethtool.c index a44e7d949..b1c84f8f0 100644 --- a/kernel/linux/kni/kni_ethtool.c +++ b/kernel/linux/kni/kni_ethtool.c @@ -28,4 +28,6 @@ kni_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) } +/* ETHTOOL_GLINKSETTINGS replaces ETHTOOL_GSET */ +#ifndef ETHTOOL_GLINKSETTINGS static int kni_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) @@ -35,5 +37,8 @@ kni_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) return priv->lad_dev->ethtool_ops->get_settings(priv->lad_dev, ecmd); } +#endif +/* ETHTOOL_SLINKSETTINGS replaces ETHTOOL_SSET */ +#ifndef ETHTOOL_SLINKSETTINGS static int kni_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) @@ -43,4 +48,5 @@ kni_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) return priv->lad_dev->ethtool_ops->set_settings(priv->lad_dev, ecmd); } +#endif static void @@ -191,6 +197,10 @@ struct ethtool_ops kni_ethtool_ops = { .begin = kni_check_if_running, .get_drvinfo = kni_get_drvinfo, +#ifndef ETHTOOL_GLINKSETTINGS .get_settings = kni_get_settings, +#endif +#ifndef ETHTOOL_SLINKSETTINGS .set_settings = kni_set_settings, +#endif .get_regs_len = kni_get_regs_len, .get_regs = kni_get_regs, -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-22 16:47:33.189254362 +0000 +++ 0036-kni-fix-build-on-Linux-4.19.patch 2018-11-22 16:47:32.000000000 +0000 @@ -1,4 +1,4 @@ -From a9460a0b2efb80a913d8770dc188e816b227622f Mon Sep 17 00:00:00 2001 +From 91f81a731aa0aca9908fc03166de5a41372f2950 Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Wed, 24 Oct 2018 12:10:10 +0100 Subject: [PATCH] kni: fix build on Linux 4.19 @@ -6,6 +6,8 @@ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +[ upstream commit a9460a0b2efb80a913d8770dc188e816b227622f ] + The build error observed with Linux kernel 4.19 when KNI ethtool support enabled (CONFIG_RTE_KNI_KMOD_ETHTOOL=y)