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>
#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;
#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_ */