diff options
author | Yi-Hung Wei <yihung.wei@gmail.com> | 2018-05-11 10:32:12 -0700 |
---|---|---|
committer | Pravin B Shelar <pshelar@ovn.org> | 2018-05-14 18:36:18 -0700 |
commit | 39ca338374abe367e28a2247bac9159695f19710 (patch) | |
tree | d0452b4a25f936d602a78d4ce1ab7f9d5b87137b /acinclude.m4 | |
parent | c6d872013786253377ef7ac279d1a386f958ed7f (diff) | |
download | openvswitch-39ca338374abe367e28a2247bac9159695f19710.tar.gz |
datapath: compat: Fix build on RHEL 7.5
1) OVS datapath compat modules breaks on RHEL 7.5, because it moves
ndo_change_mtu function pointer from 'struct net_device_ops' to
'struct net_device_ops_extended'.
2) RHEL 7.5 introduces the MTU range checking as mentioned in
6c0bf091 ("datapath: use core MTU range checking in core net infra").
However, the max_mtu field is defined in 'struct net_device_extended'
but not in 'struct net_device' as upstream kernel.
This patch defines a new symbol HAVE_RHEL7_MAX_MTU that determines
the previous 2 conditions, and fixes the backport issue.
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Acked-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 60186d33d..a2444af33 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -576,6 +576,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ OVS_FIND_FIELD_IFELSE([$KSRC/include/linux/netdevice.h], [net_device], [max_mtu]) + OVS_FIND_FIELD_IFELSE([$KSRC/include/linux/netdevice.h], [net_device_ops_extended], + [ndo_change_mtu], [OVS_DEFINE([HAVE_RHEL7_MAX_MTU])]) OVS_GREP_IFELSE([$KSRC/include/linux/netfilter.h], [nf_hook_state]) OVS_GREP_IFELSE([$KSRC/include/linux/netfilter.h], [nf_register_net_hook]) |