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 3228B30D for ; Tue, 1 Jul 2014 20:19:35 +0200 (CEST) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s61IJsah021815 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 1 Jul 2014 14:19:54 -0400 Received: from localhost (vpn1-7-46.gru2.redhat.com [10.97.7.46]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s61IJqnv015361; Tue, 1 Jul 2014 14:19:53 -0400 From: Flavio Leitner To: dev@dpdk.org Date: Tue, 1 Jul 2014 15:19:40 -0300 Message-Id: <1404238780-19596-1-git-send-email-fbl@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Subject: [dpdk-dev] [PATCH] net: get rid of SET_ETHTOOL_OPS 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, 01 Jul 2014 18:19:35 -0000 The SET_ETHTOOL_OPS has been removed from upstream, so it breaks the dpdk build with recent kernels. Signed-off-by: Flavio Leitner --- 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