All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kni: fix build with kernel 4.8
@ 2016-09-08 17:54 Ferruh Yigit
  2016-09-08 18:00 ` Stephen Hemminger
  0 siblings, 1 reply; 7+ messages in thread
From: Ferruh Yigit @ 2016-09-08 17:54 UTC (permalink / raw)
  To: dev

Linux kernel v4.8 removes macro DEFINE_PCI_DEVICE_TABLE

Linux: 7e9321599011 ("treewide: remove references to the now unnecessary
DEFINE_PCI_DEVICE_TABLE")

Added the macro to compatibility headers of the kni ethtool drivers.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h   | 7 +++++++
 lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
index bdd0806..9560aae 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
@@ -3915,4 +3915,11 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
 /* ndo_bridge_getlink adds new filter_mask and vlan_fill parameters */
 #define HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK_VLAN_FILL
 #endif /* >= 4.2.0 */
+
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0) )
+#ifndef DEFINE_PCI_DEVICE_TABLE
+#define DEFINE_PCI_DEVICE_TABLE(_table) const struct pci_device_id _table[]
+#endif /* DEFINE_PCI_DEVICE_TABLE */
+#endif /* >= 4.8.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 39ae42c..f5ef857 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h
@@ -3140,4 +3140,10 @@ static inline int __kc_pci_vfs_assigned(struct pci_dev *dev)
 #define SET_ETHTOOL_OPS(netdev, ops) ((netdev)->ethtool_ops = (ops))
 #endif /* >= 3.16.0 */
 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0) )
+#ifndef DEFINE_PCI_DEVICE_TABLE
+#define DEFINE_PCI_DEVICE_TABLE(_table) const struct pci_device_id _table[]
+#endif /* DEFINE_PCI_DEVICE_TABLE */
+#endif /* >= 4.8.0 */
+
 #endif /* _KCOMPAT_H_ */
-- 
2.7.4

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

* Re: [PATCH] kni: fix build with kernel 4.8
  2016-09-08 17:54 [PATCH] kni: fix build with kernel 4.8 Ferruh Yigit
@ 2016-09-08 18:00 ` Stephen Hemminger
  2016-09-08 18:32   ` [PATCH v2] " Ferruh Yigit
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Hemminger @ 2016-09-08 18:00 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

On Thu,  8 Sep 2016 18:54:56 +0100
Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> Linux kernel v4.8 removes macro DEFINE_PCI_DEVICE_TABLE
> 
> Linux: 7e9321599011 ("treewide: remove references to the now unnecessary
> DEFINE_PCI_DEVICE_TABLE")
> 
> Added the macro to compatibility headers of the kni ethtool drivers.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>  lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h   | 7 +++++++
>  lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h | 6 ++++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
> index bdd0806..9560aae 100644
> --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
> +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
> @@ -3915,4 +3915,11 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
>  /* ndo_bridge_getlink adds new filter_mask and vlan_fill parameters */
>  #define HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK_VLAN_FILL
>  #endif /* >= 4.2.0 */
> +
> +#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0) )
> +#ifndef DEFINE_PCI_DEVICE_TABLE
> +#define DEFINE_PCI_DEVICE_TABLE(_table) const struct pci_device_id _table[]
> +#endif /* DEFINE_PCI_DEVICE_TABLE */
> +#endif /* >= 4.8.0 */
> +

Good to see the KNI driver staying up to date with upstream.

Please just remove use of DEFINE_PCI_DEVICE_TABLE rather than resurrecting it!

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

* [PATCH v2] kni: fix build with kernel 4.8
  2016-09-08 18:00 ` Stephen Hemminger
@ 2016-09-08 18:32   ` Ferruh Yigit
  2016-09-09 22:33     ` De Lara Guarch, Pablo
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Ferruh Yigit @ 2016-09-08 18:32 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

Linux kernel v4.8 removes macro DEFINE_PCI_DEVICE_TABLE

Linux: 7e9321599011 ("treewide: remove references to the now unnecessary
DEFINE_PCI_DEVICE_TABLE")

Replaced macro with its value in kni ethtool drivers.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c     | 2 +-
 lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
index 3dd103c..1bb2242 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
@@ -76,7 +76,7 @@ static const char igb_driver_string[] =
 static const char igb_copyright[] =
 				"Copyright (c) 2007-2013 Intel Corporation.";
 
-DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = {
+const struct pci_device_id igb_pci_tbl[] = {
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_BACKPLANE_1GBPS) },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_SGMII) },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS) },
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 0d82613..d26016c 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c
@@ -86,7 +86,7 @@ const char ixgbe_driver_version[] = DRV_VERSION;
  * { Vendor ID, Device ID, SubVendor ID, SubDevice ID,
  *   Class, Class Mask, private data (not used) }
  */
-DEFINE_PCI_DEVICE_TABLE(ixgbe_pci_tbl) = {
+const struct pci_device_id ixgbe_pci_tbl[] = {
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598)},
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_DUAL_PORT)},
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_SINGLE_PORT)},
-- 
2.7.4

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

* Re: [PATCH v2] kni: fix build with kernel 4.8
  2016-09-08 18:32   ` [PATCH v2] " Ferruh Yigit
@ 2016-09-09 22:33     ` De Lara Guarch, Pablo
  2016-09-21 16:17       ` Thomas Monjalon
  2016-09-19 12:21     ` Christian Ehrhardt
  2016-09-20 19:03     ` Stephen Hemminger
  2 siblings, 1 reply; 7+ messages in thread
From: De Lara Guarch, Pablo @ 2016-09-09 22:33 UTC (permalink / raw)
  To: Yigit, Ferruh, dev; +Cc: Stephen Hemminger



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ferruh Yigit
> Sent: Thursday, September 08, 2016 11:32 AM
> To: dev@dpdk.org
> Cc: Stephen Hemminger
> Subject: [dpdk-dev] [PATCH v2] kni: fix build with kernel 4.8
> 
> Linux kernel v4.8 removes macro DEFINE_PCI_DEVICE_TABLE
> 
> Linux: 7e9321599011 ("treewide: remove references to the now unnecessary
> DEFINE_PCI_DEVICE_TABLE")
> 
> Replaced macro with its value in kni ethtool drivers.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

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

* Re: [PATCH v2] kni: fix build with kernel 4.8
  2016-09-08 18:32   ` [PATCH v2] " Ferruh Yigit
  2016-09-09 22:33     ` De Lara Guarch, Pablo
@ 2016-09-19 12:21     ` Christian Ehrhardt
  2016-09-20 19:03     ` Stephen Hemminger
  2 siblings, 0 replies; 7+ messages in thread
From: Christian Ehrhardt @ 2016-09-19 12:21 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Stephen Hemminger

On Thu, Sep 8, 2016 at 8:32 PM, Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> Linux kernel v4.8 removes macro DEFINE_PCI_DEVICE_TABLE
>
> Linux: 7e9321599011 ("treewide: remove references to the now unnecessary
> DEFINE_PCI_DEVICE_TABLE")
>
> Replaced macro with its value in kni ethtool drivers.


Just ran into the same and thereby had the unplanned chance to review and
test.
Works fine, thanks Ferruh

Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>

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

* Re: [PATCH v2] kni: fix build with kernel 4.8
  2016-09-08 18:32   ` [PATCH v2] " Ferruh Yigit
  2016-09-09 22:33     ` De Lara Guarch, Pablo
  2016-09-19 12:21     ` Christian Ehrhardt
@ 2016-09-20 19:03     ` Stephen Hemminger
  2 siblings, 0 replies; 7+ messages in thread
From: Stephen Hemminger @ 2016-09-20 19:03 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

On Thu,  8 Sep 2016 19:32:09 +0100
Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> Linux kernel v4.8 removes macro DEFINE_PCI_DEVICE_TABLE
> 
> Linux: 7e9321599011 ("treewide: remove references to the now unnecessary
> DEFINE_PCI_DEVICE_TABLE")
> 
> Replaced macro with its value in kni ethtool drivers.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Why is this not already applied? There are two ack and it has been 12 days
since initial posting!

Acked-by: Stephen Hemminger <stephen@networkplumber.org>

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

* Re: [PATCH v2] kni: fix build with kernel 4.8
  2016-09-09 22:33     ` De Lara Guarch, Pablo
@ 2016-09-21 16:17       ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2016-09-21 16:17 UTC (permalink / raw)
  To: Yigit, Ferruh; +Cc: dev, De Lara Guarch, Pablo, Stephen Hemminger

2016-09-09 22:33, De Lara Guarch, Pablo:
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ferruh Yigit
> > Linux kernel v4.8 removes macro DEFINE_PCI_DEVICE_TABLE
> > 
> > Linux: 7e9321599011 ("treewide: remove references to the now unnecessary
> > DEFINE_PCI_DEVICE_TABLE")
> > 
> > Replaced macro with its value in kni ethtool drivers.
> > 
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied, thanks

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

end of thread, other threads:[~2016-09-21 16:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-08 17:54 [PATCH] kni: fix build with kernel 4.8 Ferruh Yigit
2016-09-08 18:00 ` Stephen Hemminger
2016-09-08 18:32   ` [PATCH v2] " Ferruh Yigit
2016-09-09 22:33     ` De Lara Guarch, Pablo
2016-09-21 16:17       ` Thomas Monjalon
2016-09-19 12:21     ` Christian Ehrhardt
2016-09-20 19:03     ` Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.