From 1dba1690372b0b27906276d8372a0c1b030dc77e Mon Sep 17 00:00:00 2001 From: Joe Stringer Date: Thu, 24 Dec 2015 11:41:40 -0800 Subject: [PATCH 1/1] compat: Detect and use __skb_dst_copy(). Signed-off-by: Joe Stringer Acked-by: Pravin B Shelar --- acinclude.m4 | 1 + datapath/linux/compat/include/net/dst.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index 54c6e727e..dddbd1ca0 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -471,6 +471,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ OVS_GREP_IFELSE([$KSRC/include/net/checksum.h], [csum_unfold]) OVS_GREP_IFELSE([$KSRC/include/net/dst.h], [dst_discard_sk]) + OVS_GREP_IFELSE([$KSRC/include/net/dst.h], [__skb_dst_copy]) OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [genl_has_listeners]) OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [mcgrp_offset]) diff --git a/datapath/linux/compat/include/net/dst.h b/datapath/linux/compat/include/net/dst.h index de74c9383..5ec3d307b 100644 --- a/datapath/linux/compat/include/net/dst.h +++ b/datapath/linux/compat/include/net/dst.h @@ -42,7 +42,7 @@ static inline void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst) { } static inline void dst_init_metrics(struct dst_entry *dst, const u32 *metrics, bool read_only) { } -#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) +#elif !defined(HAVE___SKB_DST_COPY) static inline void __skb_dst_copy(struct sk_buff *nskb, unsigned long refdst) { nskb->_skb_refdst = refdst; -- 2.20.1