[OVS_GREP_IFELSE([$KSRC/include/net/dst_cache.h], [dst_cache],
[OVS_DEFINE([USE_UPSTREAM_TUNNEL])])])])
+ OVS_GREP_IFELSE([$KSRC/include/net/dst_cache.h], [dst_cache],
+ [OVS_DEFINE([USE_BUILTIN_DST_CACHE])])
OVS_GREP_IFELSE([$KSRC/include/net/mpls.h], [mpls_hdr],
[OVS_DEFINE([MPLS_HEADER_IS_L3])])
OVS_GREP_IFELSE([$KSRC/include/linux/net.h], [sock_create_kern.*net],
* (at your option) any later version.
*/
+#ifndef USE_BUILTIN_DST_CACHE
#include <linux/kernel.h>
#include <linux/percpu.h>
#include <net/dst_cache.h>
}
EXPORT_SYMBOL_GPL(rpl_dst_cache_destroy);
#endif /*USE_UPSTREAM_TUNNEL */
+#endif /* USE_BUILTIN_DST_CACHE */
#ifndef _NET_DST_CACHE_WRAPPER_H
#define _NET_DST_CACHE_WRAPPER_H
+#ifdef USE_BUILTIN_DST_CACHE
+#include_next <net/dst_cache.h>
+#else
+
#include <linux/jiffies.h>
#include <net/dst.h>
#if IS_ENABLED(CONFIG_IPV6)
void rpl_dst_cache_destroy(struct dst_cache *dst_cache);
#endif /* USE_UPSTREAM_TUNNEL */
+#endif /* USE_BUILTIN_DST_CACHE */
#endif