rhel: s/OVN_DB/OVS_DB/ in ovn-controller unit.
[cascardo/ovs.git] / datapath / compat.h
index f8f0469..c827b11 100644 (file)
 #include <net/route.h>
 #include <net/xfrm.h>
 
-static inline void skb_clear_rxhash(struct sk_buff *skb)
-{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)
-       skb->rxhash = 0;
-#endif
-}
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
-#define GROUP_ID(grp)  0
-#else
+#ifdef HAVE_GENL_MULTICAST_GROUP_WITH_ID
 #define GROUP_ID(grp)  ((grp)->id)
+#else
+#define GROUP_ID(grp)  0
 #endif
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
@@ -56,7 +49,8 @@ static inline struct rtable *find_route(struct net *net,
 {
        struct rtable *rt;
        /* Tunnel configuration keeps DSCP part of TOS bits, But Linux
-        * router expect RT_TOS bits only. */
+        * router expect RT_TOS bits only.
+        */
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
        struct flowi fl = { .nl_u = { .ip4_u = {
@@ -82,4 +76,14 @@ static inline struct rtable *find_route(struct net *net,
        return rt;
 #endif
 }
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
+static inline bool skb_encapsulation(struct sk_buff *skb)
+{
+       return skb->encapsulation;
+}
+#else
+#define skb_encapsulation(skb) false
+#endif
+
 #endif /* compat.h */