* [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
* Re: [dpdk-dev] [PATCH] net: get rid of SET_ETHTOOL_OPS
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
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2014-07-02 9:48 UTC (permalink / raw)
To: Flavio Leitner; +Cc: dev
Hi Flavio,
2014-07-01 15:19, Flavio Leitner:
> 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>
You are removing SET_ETHTOOL_OPS calls.
In a previous patch, Aaro Koskinen made the choice to redefine the macro
in kcompat files.
I don't know what will be the choice of Intel in the sourceforge base driver.
So I've applied Aaro's patch as there are less modifications of the base
driver:
http://dpdk.org/browse/dpdk/commit/?id=e0b7ca0c0383411
It would be better to have patches from people working on the base driver.
So upgrades from sourceforge driver to KNI would be smoother.
Thanks
--
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net: get rid of SET_ETHTOOL_OPS
2014-07-02 9:48 ` Thomas Monjalon
@ 2014-07-02 13:07 ` Flavio Leitner
2014-07-02 15:20 ` Thomas Monjalon
0 siblings, 1 reply; 4+ messages in thread
From: Flavio Leitner @ 2014-07-02 13:07 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Wed, Jul 02, 2014 at 11:48:51AM +0200, Thomas Monjalon wrote:
> Hi Flavio,
>
> 2014-07-01 15:19, Flavio Leitner:
> > 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>
>
> You are removing SET_ETHTOOL_OPS calls.
Yes.
> In a previous patch, Aaro Koskinen made the choice to redefine the macro
> in kcompat files.
I missed that one.
> I don't know what will be the choice of Intel in the sourceforge base driver.
> So I've applied Aaro's patch as there are less modifications of the base
> driver:
> http://dpdk.org/browse/dpdk/commit/?id=e0b7ca0c0383411
Since the macro is a simple pointer assignment, I didn't see any reason for
keeping it around. But maybe I am missing something.
fbl
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net: get rid of SET_ETHTOOL_OPS
2014-07-02 13:07 ` Flavio Leitner
@ 2014-07-02 15:20 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2014-07-02 15:20 UTC (permalink / raw)
To: Flavio Leitner; +Cc: dev
2014-07-02 10:07, Flavio Leitner:
> On Wed, Jul 02, 2014 at 11:48:51AM +0200, Thomas Monjalon wrote:
> > You are removing SET_ETHTOOL_OPS calls.
>
> Yes.
>
> > In a previous patch, Aaro Koskinen made the choice to redefine the macro
> > in kcompat files.
>
> I missed that one.
>
> > I don't know what will be the choice of Intel in the sourceforge base
> > driver. So I've applied Aaro's patch as there are less modifications of
> > the base>
> > driver:
> > http://dpdk.org/browse/dpdk/commit/?id=e0b7ca0c0383411
>
> Since the macro is a simple pointer assignment, I didn't see any reason for
> keeping it around. But maybe I am missing something.
Me too. Except that this base driver is synchronized (sometimes) with the
sourceforge one. So we should try to minimize differences with it.
That's why I'd prefer that people managing the sourceforge codebase push their
patches here, or pull ours. But today, there is no rule.
Bonus game: who can find the commits of those projects?
http://sourceforge.net/projects/e1000
--
Thomas
^ 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).