* [dpdk-dev] [PATCH] kni: fix compilation issue on kernel 4.0.0
@ 2015-04-28 17:37 Pablo de Lara
2015-04-29 13:19 ` Thomas Monjalon
2015-05-11 9:07 ` Thomas Monjalon
0 siblings, 2 replies; 4+ messages in thread
From: Pablo de Lara @ 2015-04-28 17:37 UTC (permalink / raw)
To: dev
Due to API changes in function pointer ndo_bridge_setlink
(commit ad41faa8) and the rename of functions vlan_tx_*
(commit df8a39de) in kernel 4.0, DPDK would not build.
This patch adds the properly checks to fix the compilation.
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 6 ++++++
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 6 ++++++
2 files changed, 12 insertions(+), 0 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 24b147d..bc3c6a3 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
@@ -2198,8 +2198,14 @@ static int igb_ndo_fdb_dump(struct sk_buff *skb,
#endif /* USE_DEFAULT_FDB_DEL_DUMP */
#ifdef HAVE_BRIDGE_ATTRIBS
+#ifdef HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS
+static int igb_ndo_bridge_setlink(struct net_device *dev,
+ struct nlmsghdr *nlh,
+ u16 flags)
+#else
static int igb_ndo_bridge_setlink(struct net_device *dev,
struct nlmsghdr *nlh)
+#endif /* HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS */
{
struct igb_adapter *adapter = netdev_priv(dev);
struct e1000_hw *hw = &adapter->hw;
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
index 2e7e714..54d1f86 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
@@ -3885,4 +3885,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
#define HAVE_NDO_FDB_ADD_VID
#endif /* >= 3.19.0 */
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) )
+/* vlan_tx_xx functions got renamed to skb_vlan */
+#define vlan_tx_tag_get skb_vlan_tag_get
+#define vlan_tx_tag_present skb_vlan_tag_present
+#define HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS
+#endif /* 4.0.0 */
#endif /* _KCOMPAT_H_ */
--
1.7.4.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] kni: fix compilation issue on kernel 4.0.0
2015-04-28 17:37 [dpdk-dev] [PATCH] kni: fix compilation issue on kernel 4.0.0 Pablo de Lara
@ 2015-04-29 13:19 ` Thomas Monjalon
2015-04-29 15:05 ` De Lara Guarch, Pablo
2015-05-11 9:07 ` Thomas Monjalon
1 sibling, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2015-04-29 13:19 UTC (permalink / raw)
To: Pablo de Lara; +Cc: dev
2015-04-28 18:37, Pablo de Lara:
> Due to API changes in function pointer ndo_bridge_setlink
> (commit ad41faa8) and the rename of functions vlan_tx_*
> (commit df8a39de) in kernel 4.0, DPDK would not build.
>
> This patch adds the properly checks to fix the compilation.
>
> Reported-by: Stephen Hemminger <stephen@networkplumber.org>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Pablo, I have another error with Linux 3.19 when KNI vhost is enabled:
lib/librte_eal/linuxapp/kni/kni_vhost.c:365:35: error:
‘struct msghdr’ has no member named ‘msg_iov’
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] kni: fix compilation issue on kernel 4.0.0
2015-04-29 13:19 ` Thomas Monjalon
@ 2015-04-29 15:05 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 4+ messages in thread
From: De Lara Guarch, Pablo @ 2015-04-29 15:05 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
Hi Thomas,
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, April 29, 2015 2:20 PM
> To: De Lara Guarch, Pablo
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] kni: fix compilation issue on kernel 4.0.0
>
> 2015-04-28 18:37, Pablo de Lara:
> > Due to API changes in function pointer ndo_bridge_setlink
> > (commit ad41faa8) and the rename of functions vlan_tx_*
> > (commit df8a39de) in kernel 4.0, DPDK would not build.
> >
> > This patch adds the properly checks to fix the compilation.
> >
> > Reported-by: Stephen Hemminger <stephen@networkplumber.org>
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
>
> Pablo, I have another error with Linux 3.19 when KNI vhost is enabled:
>
> lib/librte_eal/linuxapp/kni/kni_vhost.c:365:35: error:
> ‘struct msghdr’ has no member named ‘msg_iov’
Thanks for reporting, I didn't see that. I will send a patch for that as soon as I can.
Pablo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] kni: fix compilation issue on kernel 4.0.0
2015-04-28 17:37 [dpdk-dev] [PATCH] kni: fix compilation issue on kernel 4.0.0 Pablo de Lara
2015-04-29 13:19 ` Thomas Monjalon
@ 2015-05-11 9:07 ` Thomas Monjalon
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2015-05-11 9:07 UTC (permalink / raw)
To: Pablo de Lara; +Cc: dev
> Due to API changes in function pointer ndo_bridge_setlink
> (commit ad41faa8) and the rename of functions vlan_tx_*
> (commit df8a39de) in kernel 4.0, DPDK would not build.
>
> This patch adds the properly checks to fix the compilation.
>
> Reported-by: Stephen Hemminger <stephen@networkplumber.org>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-11 9:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-28 17:37 [dpdk-dev] [PATCH] kni: fix compilation issue on kernel 4.0.0 Pablo de Lara
2015-04-29 13:19 ` Thomas Monjalon
2015-04-29 15:05 ` De Lara Guarch, Pablo
2015-05-11 9:07 ` 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).