Skip to content

Commit

Permalink
datapath: compat: Fix build on RHEL 7.4
Browse files Browse the repository at this point in the history
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]>
Signed-off-by: Joe Stringer <[email protected]>
  • Loading branch information
YiHungWei authored and joestringer committed Aug 23, 2017
1 parent bf4077e commit b7ab731
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 2 additions & 0 deletions datapath/linux/compat/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -109,6 +110,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)
Expand Down

0 comments on commit b7ab731

Please sign in to comment.