From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from demumfd001.nsn-inter.net (demumfd001.nsn-inter.net [93.183.12.32]) by dpdk.org (Postfix) with ESMTP id BF0935961 for ; Tue, 17 Jun 2014 16:34:54 +0200 (CEST) Received: from demuprx016.emea.nsn-intra.net ([10.150.129.55]) by demumfd001.nsn-inter.net (8.14.3/8.14.3) with ESMTP id s5HEZBwp018060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 17 Jun 2014 14:35:11 GMT Received: from ak-desktop.emea.nsn-net.net ([10.144.45.49]) by demuprx016.emea.nsn-intra.net (8.12.11.20060308/8.12.11) with ESMTP id s5HEZAFw030028; Tue, 17 Jun 2014 16:35:10 +0200 From: Aaro Koskinen To: dev@dpdk.org Date: Tue, 17 Jun 2014 17:32:03 +0300 Message-Id: <1403015524-26218-1-git-send-email-aaro.koskinen@nsn.com> X-Mailer: git-send-email 2.0.0 X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-size: 2025 X-purgate-ID: 151667::1403015711-000005B1-4B270CD9/0/0 Subject: [dpdk-dev] [PATCH 1/2] kni: fix build with kernel 3.16 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2014 14:34:55 -0000 SET_ETHTOOL_OPS is gone in 3.16, so modify drivers accordingly. Signed-off-by: Aaro Koskinen --- lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 4 ++++ lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h | 5 +++++ lib/librte_eal/linuxapp/kni/kni_ethtool.c | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h index 4c27d5d..f5e4435 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h @@ -3853,4 +3853,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) #endif /* NETIF_F_RXHASH */ #endif /* < 3.14.0 */ +#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) ) +#define SET_ETHTOOL_OPS(netdev, ops) ((netdev)->ethtool_ops = (ops)) +#endif /* >= 3.16.0 */ + #endif /* _KCOMPAT_H_ */ diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h index 4126d14..5a6a770 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h @@ -3136,4 +3136,9 @@ static inline int __kc_pci_vfs_assigned(struct pci_dev *dev) #define pci_vfs_assigned(dev) __kc_pci_vfs_assigned(dev) #endif + +#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) ) +#define SET_ETHTOOL_OPS(netdev, ops) ((netdev)->ethtool_ops = (ops)) +#endif /* >= 3.16.0 */ + #endif /* _KCOMPAT_H_ */ diff --git a/lib/librte_eal/linuxapp/kni/kni_ethtool.c b/lib/librte_eal/linuxapp/kni/kni_ethtool.c index d0673e5..06b6d46 100644 --- a/lib/librte_eal/linuxapp/kni/kni_ethtool.c +++ b/lib/librte_eal/linuxapp/kni/kni_ethtool.c @@ -213,5 +213,5 @@ struct ethtool_ops kni_ethtool_ops = { void kni_set_ethtool_ops(struct net_device *netdev) { - SET_ETHTOOL_OPS(netdev, &kni_ethtool_ops); + netdev->ethtool_ops = &kni_ethtool_ops; } -- 2.0.0