DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] kni: fix build with kernel 3.16
@ 2014-06-17 14:32 Aaro Koskinen
  2014-06-17 14:32 ` [dpdk-dev] [PATCH 2/2] kni: igb: modify rate configation to support min/max rate fields Aaro Koskinen
  2014-07-01 22:04 ` [dpdk-dev] [PATCH 1/2] kni: fix build with kernel 3.16 Thomas Monjalon
  0 siblings, 2 replies; 4+ messages in thread
From: Aaro Koskinen @ 2014-06-17 14:32 UTC (permalink / raw)
  To: dev

SET_ETHTOOL_OPS is gone in 3.16, so modify drivers accordingly.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com>
---
 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-01 22:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-17 14:32 [dpdk-dev] [PATCH 1/2] kni: fix build with kernel 3.16 Aaro Koskinen
2014-06-17 14:32 ` [dpdk-dev] [PATCH 2/2] kni: igb: modify rate configation to support min/max rate fields Aaro Koskinen
2014-07-01 22:05   ` Thomas Monjalon
2014-07-01 22:04 ` [dpdk-dev] [PATCH 1/2] kni: fix build with kernel 3.16 Thomas Monjalon

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git