vxlan: Flow based tunneling
[firefly-linux-kernel-4.4.55.git] / include / net / ip_tunnels.h
index 6b9d559ce5f5b3198d5d59259c5d53a4f85d7a12..d11530f1c1e21325487cb9cc2efbccd5c1d856d7 100644 (file)
@@ -38,10 +38,19 @@ struct ip_tunnel_key {
        __be16                  tp_dst;
 } __packed __aligned(4); /* Minimize padding. */
 
+/* Indicates whether the tunnel info structure represents receive
+ * or transmit tunnel parameters.
+ */
+enum {
+       IP_TUNNEL_INFO_RX,
+       IP_TUNNEL_INFO_TX,
+};
+
 struct ip_tunnel_info {
        struct ip_tunnel_key    key;
        const void              *options;
        u8                      options_len;
+       u8                      mode;
 };
 
 /* 6rd prefix/relay information */
@@ -284,6 +293,11 @@ static inline void iptunnel_xmit_stats(int err,
        }
 }
 
+static inline void *ip_tunnel_info_opts(struct ip_tunnel_info *info, size_t n)
+{
+       return info + 1;
+}
+
 #endif /* CONFIG_INET */
 
 #endif /* __NET_IP_TUNNELS_H */