AC_MSG_RESULT([$kversion])
if test "$version" -ge 4; then
- if test "$version" = 4 && test "$patchlevel" -le 3; then
+ if test "$version" = 4 && test "$patchlevel" -le 5; then
: # Linux 4.x
else
- AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.3.x is not supported (please refer to the FAQ for advice)])
+ AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.5.x is not supported (please refer to the FAQ for advice)])
fi
elif test "$version" = 3 && test "$patchlevel" -ge 10; then
: # Linux 3.x
OVS_GREP_IFELSE([$KSRC/include/linux/err.h], [ERR_CAST])
OVS_GREP_IFELSE([$KSRC/include/linux/err.h], [IS_ERR_OR_NULL])
+ OVS_GREP_IFELSE([$KSRC/include/linux/err.h], [PTR_ERR_OR_ZERO])
OVS_GREP_IFELSE([$KSRC/include/linux/etherdevice.h], [eth_hw_addr_random])
OVS_GREP_IFELSE([$KSRC/include/linux/etherdevice.h], [ether_addr_copy])
+ OVS_GREP_IFELSE([$KSRC/nclude/linux/if_ether.h], [inner_eth_hdr])
OVS_GREP_IFELSE([$KSRC/include/uapi/linux/if_link.h], [IFLA_GENEVE_TOS])
OVS_GREP_IFELSE([$KSRC/include/uapi/linux/if_link.h], [rtnl_link_stats64])
OVS_FIND_PARAM_IFELSE([$KSRC/include/net/ip.h],
[ip_do_fragment], [net],
[OVS_DEFINE([HAVE_IP_DO_FRAGMENT_TAKES_NET])])
+ OVS_FIND_PARAM_IFELSE([$KSRC/include/net/ip.h],
+ [ip_local_out], [net],
+ [OVS_DEFINE([HAVE_IP_LOCAL_OUT_TAKES_NET])])
+
OVS_GREP_IFELSE([$KSRC/include/net/ip.h], [ip_skb_dst_mtu])
OVS_GREP_IFELSE([$KSRC/include/net/ip.h], [IPSKB_FRAG_PMTU],
OVS_GREP_IFELSE([$KSRC/include/net/inetpeer.h], [vif],
[OVS_DEFINE([HAVE_INETPEER_VIF_SUPPORT])])
- OVS_GREP_IFELSE([$KSRC/include/net/dst_metadata.h], [metadata_dst])
+ dnl Check for dst_cache and ipv6 lable to use backported tunnel infrastructure.
+ dnl OVS does not really need ipv6 label field, but its presence signifies that
+ dnl the stack has all required ipv6 support.
+ dnl OVS also does not need dst_cache But this dependency allows us to write
+ dnl much cleaner code.
+
+ OVS_FIND_FIELD_IFELSE([$KSRC/include/net/ip_tunnels.h], [ip_tunnel_key],
+ [label],
+ [OVS_GREP_IFELSE([$KSRC/include/net/ip_tunnels.h],
+ [iptunnel_pull_offloads],
+ [OVS_GREP_IFELSE([$KSRC/include/net/dst_cache.h], [dst_cache],
+ [OVS_DEFINE([USE_UPSTREAM_TUNNEL])])])])
OVS_GREP_IFELSE([$KSRC/include/linux/net.h], [sock_create_kern.*net],
[OVS_DEFINE([HAVE_SOCK_CREATE_KERN_NET])])
OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [__skb_gso_segment])
OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [can_checksum_protocol])
OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [ndo_get_iflink])
+ OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [ndo_add_vxlan_port])
+ OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [ndo_add_geneve_port])
OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [netdev_features_t])
dnl Ubuntu kernel 3.13 has defined this struct but not used for netdev->tstats.
dnl So check type of tstats.
OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [udp_offload.*uoff],
[OVS_DEFINE([HAVE_UDP_OFFLOAD_ARG_UOFF])])
OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [gro_remcsum])
+ OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [IFF_PHONY_HEADROOM])
+ 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/netfilter.h], [nf_hook_state])
OVS_GREP_IFELSE([$KSRC/include/linux/netfilter.h], [nf_register_net_hook])
OVS_GREP_IFELSE([$KSRC/include/linux/netfilter.h], [nf_hookfn.*nf_hook_ops],
[OVS_DEFINE([HAVE_NF_HOOKFN_ARG_OPS])])
+ OVS_FIND_PARAM_IFELSE([$KSRC/include/linux/netfilter.h], [nf_hookfn], [priv],
+ [OVS_DEFINE([HAVE_NF_HOOKFN_ARG_PRIV])])
+ OVS_FIND_FIELD_IFELSE([$KSRC/include/linux/netfilter.h], [nf_hook_ops],
+ [owner], [OVS_DEFINE([HAVE_NF_HOOKS_OPS_OWNER])])
+
OVS_FIND_FIELD_IFELSE([$KSRC/include/linux/netfilter_ipv6.h], [nf_ipv6_ops],
[fragment.*sock], [OVS_DEFINE([HAVE_NF_IPV6_OPS_FRAGMENT])])
[OVS_DEFINE([HAVE_PROTO_DATA_VALID])])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_checksum_start_offset])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [inner_protocol])
- OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [inner_mac_header])
- OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [inner_network_header])
+ OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [inner_protocol_type])
+ OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_inner_transport_offset])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [kfree_skb_list])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_scrub_packet.*xnet],
[OVS_DEFINE([HAVE_SKB_SCRUB_PACKET_XNET])])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_vlan_pop])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_vlan_push])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_clear_hash_if_not_l4])
+ OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_postpush_rcsum])
OVS_GREP_IFELSE([$KSRC/include/linux/types.h], [bool],
[OVS_DEFINE([HAVE_BOOL_TYPE])])
OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [genl_has_listeners])
OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [mcgrp_offset])
OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [parallel_ops])
- OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [genlmsg_new_unicast])
OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [netlink_has_listeners(net->genl_sock],
[OVS_DEFINE([HAVE_GENL_HAS_LISTENERS_TAKES_NET])])
OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [genlmsg_parse])
OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [genl_notify.*family],
[OVS_DEFINE([HAVE_GENL_NOTIFY_TAKES_FAMILY])])
+ OVS_FIND_PARAM_IFELSE([$KSRC/include/net/genetlink.h],
+ [genl_notify], [net],
+ [OVS_DEFINE([HAVE_GENL_NOTIFY_TAKES_NET])])
+
OVS_FIND_FIELD_IFELSE([$KSRC/include/net/genetlink.h],
[genl_multicast_group], [id])
OVS_GREP_IFELSE([$KSRC/include/net/ip6_route.h], [ip6_frag.*sock],
[OVS_DEFINE([HAVE_IP_FRAGMENT_TAKES_SOCK])])
+ OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_put_64bit])
OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_get_be16])
OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_put_be16])
OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_put_be32])
OVS_GREP_IFELSE([$KSRC/include/net/vxlan.h], [struct vxlan_metadata],
[OVS_DEFINE([HAVE_VXLAN_METADATA])])
- OVS_GREP_IFELSE([$KSRC/include/net/vxlan.h], [VXLAN_HF_RCO])
OVS_GREP_IFELSE([$KSRC/include/net/udp.h], [udp_flow_src_port],
[OVS_GREP_IFELSE([$KSRC/include/net/udp.h], [inet_get_local_port_range(net],
[OVS_DEFINE([HAVE_UDP_FLOW_SRC_PORT])])])
OVS_GREP_IFELSE([$KSRC/include/net/udp.h], [udp_v4_check])
OVS_GREP_IFELSE([$KSRC/include/net/udp.h], [udp_set_csum])
OVS_GREP_IFELSE([$KSRC/include/net/udp_tunnel.h], [udp_tunnel_gro_complete])
- OVS_GREP_IFELSE([$KSRC/include/net/udp_tunnel.h], [ipv6_v6only],
- [OVS_DEFINE([HAVE_UDP_TUNNEL_IPV6])])
+ OVS_FIND_FIELD_IFELSE([$KSRC/include/net/udp_tunnel.h], [udp_tunnel_sock_cfg],
+ [gro_receive])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [ignore_df],
[OVS_DEFINE([HAVE_IGNORE_DF_RENAME])])
OVS_GREP_IFELSE([$KSRC/include/uapi/linux/netdevice.h], [NET_NAME_UNKNOWN],
[OVS_DEFINE([HAVE_NET_NAME_UNKNOWN])])
+ OVS_GREP_IFELSE([$KSRC/include/net/sock.h], [sk_no_check_tx])
+ OVS_GREP_IFELSE([$KSRC/include/linux/udp.h], [no_check6_tx])
OVS_GREP_IFELSE([$KSRC/include/linux/utsrelease.h], [el6],
[OVS_DEFINE([HAVE_RHEL6_PER_CPU])])