@@ -719,6 +719,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
OVS_GREP_IFELSE([$KSRC/include/linux/if_vlan.h], [skb_vlan_tagged])
OVS_GREP_IFELSE([$KSRC/include/linux/if_vlan.h], [eth_type_vlan])
+ OVS_FIND_PARAM_IFELSE([$KSRC/include/net/dst_metadata.h],
+ [metadata_dst_alloc], [metadata_type])
+
OVS_GREP_IFELSE([$KSRC/include/linux/u64_stats_sync.h], [u64_stats_fetch_begin_irq])
OVS_GREP_IFELSE([$KSRC/include/net/vxlan.h], [struct vxlan_metadata],
@@ -2203,7 +2203,9 @@ static int validate_and_copy_set_tun(const struct nlattr *attr,
if (start < 0)
return start;
- tun_dst = metadata_dst_alloc(key.tun_opts_len, GFP_KERNEL);
+ tun_dst = metadata_dst_alloc(key.tun_opts_len, METADATA_IP_TUNNEL,
+ GFP_KERNEL);
+
if (!tun_dst)
return -ENOMEM;
@@ -103,4 +103,19 @@ static inline void ovs_ipv6_tun_rx_dst(struct metadata_dst *md_dst,
void ovs_ip_tunnel_rcv(struct net_device *dev, struct sk_buff *skb,
struct metadata_dst *tun_dst);
+
+#ifndef HAVE_METADATA_DST_ALLOC_WITH_METADATA_TYPE
+enum metadata_type {
+ METADATA_IP_TUNNEL,
+ METADATA_HW_PORT_MUX,
+};
+
+static inline struct metadata_dst *
+rpl_metadata_dst_alloc(u8 optslen, enum metadata_type type, gfp_t flags)
+{
+ return metadata_dst_alloc(optslen, flags);
+}
+#define metadata_dst_alloc rpl_metadata_dst_alloc
+#endif
+
#endif /* __NET_DST_METADATA_WRAPPER_H */