Not intended to be applied to branch-1.7 since 1.9.x is the new LTS but posted here in case anybody wants to compile the 1.7 datapath on Red Hat Enterprise Linux 6.4
Signed-off-by: Thomas Graf <tg...@redhat.com> --- acinclude.m4 | 6 ++++++ datapath/linux/compat/include/linux/etherdevice.h | 2 ++ datapath/linux/compat/include/linux/if_vlan.h | 3 ++- datapath/linux/compat/include/linux/skbuff.h | 6 ++++-- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index d33653d..7c3f250 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -214,6 +214,10 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ OVS_GREP_IFELSE([$KSRC/include/linux/err.h], [ERR_CAST]) + OVS_GREP_IFELSE([$KSRC/include/linux/etherdevice.h], [eth_hw_addr_random]) + + OVS_GREP_IFELSE([$KSRC/include/linux/if_vlan.h], [vlan_set_encap_proto]) + OVS_GREP_IFELSE([$KSRC/include/linux/in.h], [ipv4_is_multicast]) OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [dev_disable_lro]) @@ -247,6 +251,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_warn_if_lro], [OVS_DEFINE([HAVE_SKB_WARN_LRO])]) OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [consume_skb]) + OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_frag_page]) + OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_reset_mac_len]) OVS_GREP_IFELSE([$KSRC/include/linux/string.h], [kmemdup], [], [OVS_GREP_IFELSE([$KSRC/include/linux/slab.h], [kmemdup])]) diff --git a/datapath/linux/compat/include/linux/etherdevice.h b/datapath/linux/compat/include/linux/etherdevice.h index 7f04c96..d1cc79c 100644 --- a/datapath/linux/compat/include/linux/etherdevice.h +++ b/datapath/linux/compat/include/linux/etherdevice.h @@ -4,6 +4,7 @@ #include <linux/version.h> #include_next <linux/etherdevice.h> +#ifndef HAVE_ETH_HW_ADDR_RANDOM #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) static inline void eth_hw_addr_random(struct net_device *dev) { @@ -15,5 +16,6 @@ static inline void eth_hw_addr_random(struct net_device *dev) dev_hw_addr_random(dev, dev->dev_addr); } #endif +#endif #endif diff --git a/datapath/linux/compat/include/linux/if_vlan.h b/datapath/linux/compat/include/linux/if_vlan.h index dc4b15e..c07844d 100644 --- a/datapath/linux/compat/include/linux/if_vlan.h +++ b/datapath/linux/compat/include/linux/if_vlan.h @@ -55,7 +55,8 @@ static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, u16 vlan_tci) #define VLAN_TAG_PRESENT VLAN_CFI_MASK #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) && \ + !defined HAVE_VLAN_SET_ENCAP_PROTO static inline void vlan_set_encap_proto(struct sk_buff *skb, struct vlan_hdr *vhdr) { __be16 proto; diff --git a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h index 01e524e..e314c6c 100644 --- a/datapath/linux/compat/include/linux/skbuff.h +++ b/datapath/linux/compat/include/linux/skbuff.h @@ -238,14 +238,16 @@ static inline bool skb_warn_if_lro(const struct sk_buff *skb) #define consume_skb kfree_skb #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) && \ + !defined HAVE_SKB_FRAG_PAGE static inline struct page *skb_frag_page(const skb_frag_t *frag) { return frag->page; } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40) && \ + !defined HAVE_SKB_RESET_MAC_LEN static inline void skb_reset_mac_len(struct sk_buff *skb) { skb->mac_len = skb->network_header - skb->mac_header; -- 1.7.11.7 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev