@@ -785,6 +785,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
OVS_FIND_FIELD_IFELSE([$KSRC/include/linux/netfilter.h], [nf_hook_ops],
[list],
[OVS_DEFINE([HAVE_LIST_IN_NF_HOOK_OPS])])
+ OVS_FIND_PARAM_IFELSE([$KSRC/include/linux/netdevice.h],
+ [netdev_master_upper_dev_link], [extack],
+ [OVS_DEFINE([HAVE_UPPER_DEV_LINK_EXTACK])])
if cmp -s datapath/linux/kcompat.h.new \
datapath/linux/kcompat.h >/dev/null 2>&1; then
@@ -101,13 +101,26 @@ static inline bool netif_needs_gso(struct sk_buff *skb,
#ifndef HAVE_NETDEV_MASTER_UPPER_DEV_LINK_RH
static inline int rpl_netdev_master_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev,
- void *upper_priv, void *upper_info)
+ void *upper_priv,
+ void *upper_info, void *extack)
{
return netdev_master_upper_dev_link(dev, upper_dev);
}
#define netdev_master_upper_dev_link rpl_netdev_master_upper_dev_link
#endif
+#else
+#ifndef HAVE_UPPER_DEV_LINK_EXTACK
+static inline int rpl_netdev_master_upper_dev_link(struct net_device *dev,
+ struct net_device *upper_dev,
+ void *upper_priv,
+ void *upper_info, void *extack)
+{
+ return netdev_master_upper_dev_link(dev, upper_dev, upper_priv,
+ upper_info);
+}
+#define netdev_master_upper_dev_link rpl_netdev_master_upper_dev_link
+#endif
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0)
@@ -112,8 +112,15 @@ struct vport *ovs_netdev_link(struct vport *vport, const char *name)
}
rtnl_lock();
+#ifdef HAVE_NETDEV_MASTER_UPPER_DEV_LINK_RH
err = netdev_master_upper_dev_link(vport->dev,
- get_dpdev(vport->dp), NULL, NULL);
+ get_dpdev(vport->dp),
+ NULL, NULL);
+#else
+ err = netdev_master_upper_dev_link(vport->dev,
+ get_dpdev(vport->dp),
+ NULL, NULL, NULL);
+#endif
if (err)
goto error_unlock;
An extended netlink ack has been added for 4.14 - add compat layer changes so that it compiles for all kernels up to and including 4.14. Signed-off-by: Greg Rose <gvrose8192@gmail.com> --- acinclude.m4 | 3 +++ datapath/linux/compat/include/linux/netdevice.h | 15 ++++++++++++++- datapath/vport-netdev.c | 9 ++++++++- 3 files changed, 25 insertions(+), 2 deletions(-)