RHEL 7.4 introduces netdev_master_upper_dev_link_rh() that breaks the backport of OVS kernel module on RHEL 7.4. This patch fixes that issue.
Signed-off-by: Yi-Hung Wei <[email protected]> --- acinclude.m4 | 4 ++++ datapath/linux/compat/include/linux/netdevice.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/acinclude.m4 b/acinclude.m4 index 74cc046a3929..aeb594a7e3b5 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -552,6 +552,10 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ OVS_FIND_PARAM_IFELSE([$KSRC/include/linux/netdevice.h], [netdev_master_upper_dev_link], [upper_priv], [OVS_DEFINE([HAVE_NETDEV_MASTER_UPPER_DEV_LINK_PRIV])]) + OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], + [netdev_master_upper_dev_link_rh], + [OVS_DEFINE([HAVE_NETDEV_MASTER_UPPER_DEV_LINK_RH])]) + OVS_FIND_FIELD_IFELSE([$KSRC/include/linux/netdevice.h], [net_device], [max_mtu]) diff --git a/datapath/linux/compat/include/linux/netdevice.h b/datapath/linux/compat/include/linux/netdevice.h index 878c30a6da4a..a5d4ee836d18 100644 --- a/datapath/linux/compat/include/linux/netdevice.h +++ b/datapath/linux/compat/include/linux/netdevice.h @@ -101,6 +101,7 @@ static inline bool netif_needs_gso(struct sk_buff *skb, #endif #ifndef HAVE_NETDEV_MASTER_UPPER_DEV_LINK_PRIV +#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) @@ -110,6 +111,7 @@ static inline int rpl_netdev_master_upper_dev_link(struct net_device *dev, #define netdev_master_upper_dev_link rpl_netdev_master_upper_dev_link #endif +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0) #define dev_queue_xmit rpl_dev_queue_xmit -- 2.7.4 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
