DST_NOCACHE was removed from the Linux 4.13 kernel.  Check if
HAVE_DST_NOCACHE is defined for older kernels.

Signed-off-by: Greg Rose <gvrose8...@gmail.com>
---
 datapath/linux/compat/include/net/ip6_fib.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/datapath/linux/compat/include/net/ip6_fib.h 
b/datapath/linux/compat/include/net/ip6_fib.h
index 2c8a513..4d58375 100644
--- a/datapath/linux/compat/include/net/ip6_fib.h
+++ b/datapath/linux/compat/include/net/ip6_fib.h
@@ -27,7 +27,11 @@
 static inline u32 rt6_get_cookie(const struct rt6_info *rt)
 {
        if (rt->rt6i_flags & RTF_PCPU ||
-                       (unlikely(rt->dst.flags & DST_NOCACHE) && rt->dst.from))
+#ifdef HAVE_DST_NOCACHE
+           (unlikely(rt->dst.flags & DST_NOCACHE) && rt->dst.from))
+#else
+           (unlikely(!list_empty(&rt->rt6i_uncached)) && rt->dst.from))
+#endif
                rt = (struct rt6_info *)(rt->dst.from);
 
        return rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0;
-- 
1.8.3.1

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to