Message ID | 1503449550-14262-1-git-send-email-yihung.wei@gmail.com |
---|---|
State | Accepted |
Headers | show |
On 22 August 2017 at 17:52, Yi-Hung Wei <yihung.wei@gmail.com> wrote: > 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 <yihung.wei@gmail.com> > --- Thanks YiHung, LGTM. Unless others have objections, it seems like this would be trivial to also backport to branch-2.8 and allow that release to compile against CentOS/RHEL 7.4 kernels.
On 22 August 2017 at 18:00, Joe Stringer <joe@ovn.org> wrote: > On 22 August 2017 at 17:52, Yi-Hung Wei <yihung.wei@gmail.com> wrote: >> 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 <yihung.wei@gmail.com> >> --- > > Thanks YiHung, LGTM. > > Unless others have objections, it seems like this would be trivial to > also backport to branch-2.8 and allow that release to compile against > CentOS/RHEL 7.4 kernels. Applied to master and branch-2.8.
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
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 <yihung.wei@gmail.com> --- acinclude.m4 | 4 ++++ datapath/linux/compat/include/linux/netdevice.h | 2 ++ 2 files changed, 6 insertions(+)