From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 1C5772965 for ; Mon, 29 Oct 2018 13:53:57 +0100 (CET) Received: by mail-wr1-f67.google.com with SMTP id 74-v6so335488wrb.13 for ; Mon, 29 Oct 2018 05:53:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J5U8wmgRGhWdmsO29FQRmZwm8c42dXxdVjIAiDejQwA=; b=n4Ds76m0OOQKL/At7uZfkt705AanxePzvprE7mXX+OV9gZ5dMqYd6jK8zFPtH55E9i mO0uplRajkJkug2+9ZeTUmUL8fuXvnvEaG0HXUUb4TUltfVpFgYSaHNAgcRjmRWixXrZ yEIkZQnaRf5hAqayNVVKJIjoDrA2X6pasqe07Ap8bhRB7HPVFVxjFl3iMZ2CYCm7Bl7h B6vLNrVYXW7Uwh3xJYmbPKCykP0qTQeJRHS5wIV+S1jUZRZQWm/poWOkpegZE9uqCSOa HVK6fNrS8AvA0mCMGVdhjkMMYSjVVwACebTK78nHLayqqbcRGEO17vFtNaqvwGjDdEc8 96Kw== X-Gm-Message-State: AGRZ1gKTENwLlgrjn94/EhW1YRXwz2P4fEFp11La5C1eY6Be1o0F0Hkr m52jfKQ6uet2aS3J+t1KRvpSHNrT X-Google-Smtp-Source: AJdET5dc5Lpv4Zwc3CRe/Y4HzbISTvVSg50xxHLVn5EQ1tFLbTr/n9rTZUWMW9gKlINGuatAp1J7+Q== X-Received: by 2002:adf:9c0a:: with SMTP id f10-v6mr14957315wrc.93.1540817636575; Mon, 29 Oct 2018 05:53:56 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id x17-v6sm14981205wrs.84.2018.10.29.05.53.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Oct 2018 05:53:55 -0700 (PDT) From: Luca Boccassi To: Ferruh Yigit Cc: dpdk stable Date: Mon, 29 Oct 2018 12:53:16 +0000 Message-Id: <20181029125329.17729-7-bluca@debian.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181029125329.17729-1-bluca@debian.org> References: <20181015115144.27626-1-bluca@debian.org> <20181029125329.17729-1-bluca@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'kni: fix build on Linux 4.19' has been queued to LTS release 16.11.9 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: Mon, 29 Oct 2018 12:53:57 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/31/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. Luca Boccassi --- >>From 6cc6f74aae02c67c993f0409cbe754b7f9c959c9 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 --- lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c | 8 ++++++++ lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe.h | 2 ++ .../linuxapp/kni/ethtool/ixgbe/ixgbe_ethtool.c | 8 ++++++++ lib/librte_eal/linuxapp/kni/kni_ethtool.c | 10 ++++++++++ 4 files changed, 28 insertions(+) diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c index 1110bef87..272f3096a 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c @@ -150,6 +150,7 @@ static const char igb_gstrings_test[][ETH_GSTRING_LEN] = { #define IGB_TEST_LEN (sizeof(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) { struct igb_adapter *adapter = netdev_priv(netdev); @@ -274,7 +275,9 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) #endif /* ETH_TP_MDI_X */ return 0; } +#endif +#ifndef ETHTOOL_SLINKSETTINGS static int igb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { struct igb_adapter *adapter = netdev_priv(netdev); @@ -379,6 +382,7 @@ static int igb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) clear_bit(__IGB_RESETTING, &adapter->state); return 0; } +#endif static u32 igb_get_link(struct net_device *netdev) { @@ -2752,8 +2756,12 @@ static int igb_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd) #endif /* ETHTOOL_GRXRINGS */ 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, .get_regs = igb_get_regs, diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe.h b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe.h index 59415469c..cc3f8ea41 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe.h @@ -905,8 +905,10 @@ s32 ixgbe_dcb_hw_ets(struct ixgbe_hw *hw, struct ieee_ets *ets, int max_frame); #endif /* CONFIG_DCB */ 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); extern void ixgbe_full_sync_mac_table(struct ixgbe_adapter *adapter); diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_ethtool.c b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_ethtool.c index bc3cb2f48..8e3f25875 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_ethtool.c +++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_ethtool.c @@ -173,6 +173,7 @@ static const char ixgbe_gstrings_test[][ETH_GSTRING_LEN] = { #define IXGBE_TEST_LEN (sizeof(ixgbe_gstrings_test) / ETH_GSTRING_LEN) #endif /* ETHTOOL_TEST */ +#ifndef ETHTOOL_GLINKSETTINGS int ixgbe_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { @@ -362,7 +363,9 @@ 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) { @@ -406,6 +409,7 @@ static int ixgbe_set_settings(struct net_device *netdev, } return err; } +#endif static void ixgbe_get_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause) @@ -2830,8 +2834,12 @@ static int ixgbe_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd) #endif /* ETHTOOL_GRXRINGS */ //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, .get_regs = ixgbe_get_regs, diff --git a/lib/librte_eal/linuxapp/kni/kni_ethtool.c b/lib/librte_eal/linuxapp/kni/kni_ethtool.c index 0c88589c9..8174e98db 100644 --- a/lib/librte_eal/linuxapp/kni/kni_ethtool.c +++ b/lib/librte_eal/linuxapp/kni/kni_ethtool.c @@ -46,6 +46,8 @@ kni_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) priv->lad_dev->ethtool_ops->get_drvinfo(priv->lad_dev, info); } +/* ETHTOOL_GLINKSETTINGS replaces ETHTOOL_GSET */ +#ifndef ETHTOOL_GLINKSETTINGS static int kni_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) { @@ -53,7 +55,10 @@ 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) { @@ -61,6 +66,7 @@ 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 kni_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) @@ -209,8 +215,12 @@ kni_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, 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, .get_wol = kni_get_wol, -- 2.19.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-10-29 12:48:14.603230045 +0000 +++ 0007-kni-fix-build-on-Linux-4.19.patch 2018-10-29 12:48:14.442417982 +0000 @@ -1,4 +1,4 @@ -From a9460a0b2efb80a913d8770dc188e816b227622f Mon Sep 17 00:00:00 2001 +From 6cc6f74aae02c67c993f0409cbe754b7f9c959c9 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) @@ -29,17 +31,17 @@ 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 ++++++++++ + lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c | 8 ++++++++ + lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe.h | 2 ++ + .../linuxapp/kni/ethtool/ixgbe/ixgbe_ethtool.c | 8 ++++++++ + lib/librte_eal/linuxapp/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 -@@ -135,6 +135,7 @@ static const char igb_gstrings_test[][ETH_GSTRING_LEN] = { +diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c +index 1110bef87..272f3096a 100644 +--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c ++++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c +@@ -150,6 +150,7 @@ static const char igb_gstrings_test[][ETH_GSTRING_LEN] = { #define IGB_TEST_LEN (sizeof(igb_gstrings_test) / ETH_GSTRING_LEN) #endif /* ETHTOOL_TEST */ @@ -47,7 +49,7 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { struct igb_adapter *adapter = netdev_priv(netdev); -@@ -259,7 +260,9 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) +@@ -274,7 +275,9 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) #endif /* ETH_TP_MDI_X */ return 0; } @@ -57,7 +59,7 @@ static int igb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { struct igb_adapter *adapter = netdev_priv(netdev); -@@ -364,6 +367,7 @@ static int igb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) +@@ -379,6 +382,7 @@ static int igb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) clear_bit(__IGB_RESETTING, &adapter->state); return 0; } @@ -65,7 +67,7 @@ static u32 igb_get_link(struct net_device *netdev) { -@@ -2737,8 +2741,12 @@ static int igb_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd) +@@ -2752,8 +2756,12 @@ static int igb_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd) #endif /* ETHTOOL_GRXRINGS */ static const struct ethtool_ops igb_ethtool_ops = { @@ -78,11 +80,11 @@ .get_drvinfo = igb_get_drvinfo, .get_regs_len = igb_get_regs_len, .get_regs = igb_get_regs, -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 -@@ -890,8 +890,10 @@ s32 ixgbe_dcb_hw_ets(struct ixgbe_hw *hw, struct ieee_ets *ets, int max_frame); +diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe.h b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe.h +index 59415469c..cc3f8ea41 100644 +--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe.h ++++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe.h +@@ -905,8 +905,10 @@ s32 ixgbe_dcb_hw_ets(struct ixgbe_hw *hw, struct ieee_ets *ets, int max_frame); #endif /* CONFIG_DCB */ extern void ixgbe_clean_rx_ring(struct ixgbe_ring *rx_ring); @@ -93,11 +95,11 @@ extern int ixgbe_write_uc_addr_list(struct ixgbe_adapter *adapter, struct net_device *netdev, unsigned int vfn); extern void ixgbe_full_sync_mac_table(struct ixgbe_adapter *adapter); -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 -@@ -158,6 +158,7 @@ static const char ixgbe_gstrings_test[][ETH_GSTRING_LEN] = { +diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_ethtool.c b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_ethtool.c +index bc3cb2f48..8e3f25875 100644 +--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_ethtool.c ++++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_ethtool.c +@@ -173,6 +173,7 @@ static const char ixgbe_gstrings_test[][ETH_GSTRING_LEN] = { #define IXGBE_TEST_LEN (sizeof(ixgbe_gstrings_test) / ETH_GSTRING_LEN) #endif /* ETHTOOL_TEST */ @@ -105,7 +107,7 @@ int ixgbe_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { -@@ -347,7 +348,9 @@ int ixgbe_get_settings(struct net_device *netdev, +@@ -362,7 +363,9 @@ int ixgbe_get_settings(struct net_device *netdev, return 0; } @@ -115,7 +117,7 @@ static int ixgbe_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { -@@ -391,6 +394,7 @@ static int ixgbe_set_settings(struct net_device *netdev, +@@ -406,6 +409,7 @@ static int ixgbe_set_settings(struct net_device *netdev, } return err; } @@ -123,7 +125,7 @@ static void ixgbe_get_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause) -@@ -2815,8 +2819,12 @@ static int ixgbe_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd) +@@ -2830,8 +2834,12 @@ static int ixgbe_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd) #endif /* ETHTOOL_GRXRINGS */ //static struct ethtool_ops ixgbe_ethtool_ops = { @@ -136,11 +138,11 @@ .get_drvinfo = ixgbe_get_drvinfo, .get_regs_len = ixgbe_get_regs_len, .get_regs = ixgbe_get_regs, -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 -@@ -27,6 +27,8 @@ kni_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) +diff --git a/lib/librte_eal/linuxapp/kni/kni_ethtool.c b/lib/librte_eal/linuxapp/kni/kni_ethtool.c +index 0c88589c9..8174e98db 100644 +--- a/lib/librte_eal/linuxapp/kni/kni_ethtool.c ++++ b/lib/librte_eal/linuxapp/kni/kni_ethtool.c +@@ -46,6 +46,8 @@ kni_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) priv->lad_dev->ethtool_ops->get_drvinfo(priv->lad_dev, info); } @@ -149,7 +151,7 @@ static int kni_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) { -@@ -34,7 +36,10 @@ kni_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) +@@ -53,7 +55,10 @@ kni_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) return priv->lad_dev->ethtool_ops->get_settings(priv->lad_dev, ecmd); } @@ -160,7 +162,7 @@ static int kni_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) { -@@ -42,6 +47,7 @@ kni_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) +@@ -61,6 +66,7 @@ kni_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) return priv->lad_dev->ethtool_ops->set_settings(priv->lad_dev, ecmd); } @@ -168,7 +170,7 @@ static void kni_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) -@@ -190,8 +196,12 @@ kni_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, +@@ -209,8 +215,12 @@ kni_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, struct ethtool_ops kni_ethtool_ops = { .begin = kni_check_if_running, .get_drvinfo = kni_get_drvinfo,