DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net: get rid of SET_ETHTOOL_OPS
@ 2014-07-01 18:19 Flavio Leitner
  2014-07-02  9:48 ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Flavio Leitner @ 2014-07-01 18:19 UTC (permalink / raw)
  To: dev

The SET_ETHTOOL_OPS has been removed from upstream, so it
breaks the dpdk build with recent kernels.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
---
 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c     | 4 ++--
 lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe.h         | 1 -
 lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_ethtool.c | 2 +-
 lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c    | 2 +-
 lib/librte_eal/linuxapp/kni/kni_ethtool.c                 | 2 +-
 5 files changed, 5 insertions(+), 6 deletions(-)

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 f3c48b2..9a1a177 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c
@@ -2844,14 +2844,14 @@ static const struct ethtool_ops_ext igb_ethtool_ops_ext = {
 
 void igb_set_ethtool_ops(struct net_device *netdev)
 {
-	SET_ETHTOOL_OPS(netdev, &igb_ethtool_ops);
+	netdev->ethtool_ops = &igb_ethtool_ops;
 	set_ethtool_ops_ext(netdev, &igb_ethtool_ops_ext);
 }
 #else
 void igb_set_ethtool_ops(struct net_device *netdev)
 {
 	/* have to "undeclare" const on this struct to remove warnings */
-	SET_ETHTOOL_OPS(netdev, (struct ethtool_ops *)&igb_ethtool_ops);
+	netdev->ethtool_ops = (struct ethtool_ops *)&igb_ethtool_ops;
 }
 #endif /* HAVE_RHEL6_ETHTOOL_OPS_EXT_STRUCT */
 #endif	/* SIOCETHTOOL */
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe.h b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe.h
index 222c2c7..23e2899 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe.h
@@ -818,7 +818,6 @@ extern u8 ixgbe_dcb_txq_to_tc(struct ixgbe_adapter *adapter, u8 index);
 /* needed by ixgbe_main.c */
 extern int ixgbe_validate_mac_addr(u8 *mc_addr);
 extern void ixgbe_check_options(struct ixgbe_adapter *adapter);
-extern void ixgbe_assign_netdev_ops(struct net_device *netdev);
 
 /* needed by ixgbe_ethtool.c */
 extern char ixgbe_driver_name[];
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 11472bd..e0802c1 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_ethtool.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_ethtool.c
@@ -2896,6 +2896,6 @@ struct ethtool_ops ixgbe_ethtool_ops = {
 
 void ixgbe_set_ethtool_ops(struct net_device *netdev)
 {
-	SET_ETHTOOL_OPS(netdev, &ixgbe_ethtool_ops);
+	netdev->ethtool_ops = &ixgbe_ethtool_ops;
 }
 #endif /* SIOCETHTOOL */
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c
index cb56906..ba2aedb 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c
@@ -2454,7 +2454,7 @@ int ixgbe_kni_probe(struct pci_dev *pdev,
 		err = -EIO;
 		goto err_ioremap;
 	}
-	//ixgbe_assign_netdev_ops(netdev);
+
 	ixgbe_set_ethtool_ops(netdev);
 
 	strlcpy(netdev->name, pci_name(pdev), sizeof(netdev->name));
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-02 15:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-01 18:19 [dpdk-dev] [PATCH] net: get rid of SET_ETHTOOL_OPS Flavio Leitner
2014-07-02  9:48 ` Thomas Monjalon
2014-07-02 13:07   ` Flavio Leitner
2014-07-02 15:20     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).