@@ -1006,7 +1006,11 @@ netdev_vxlan_create(struct netdev *netdev)
nl_msg_put_string(&request, IFLA_IFNAME, name);
nl_msg_put_u32(&request, IFLA_MTU, UINT16_MAX);
linkinfo_off = nl_msg_start_nested(&request, IFLA_LINKINFO);
+#ifdef USE_UPSTREAM_TUNNEL
nl_msg_put_string(&request, IFLA_INFO_KIND, "vxlan");
+#else
+ nl_msg_put_string(&request, IFLA_INFO_KIND, "ovs_vxlan");
+#endif
infodata_off = nl_msg_start_nested(&request, IFLA_INFO_DATA);
nl_msg_put_u8(&request, IFLA_VXLAN_LEARNING, 0);
nl_msg_put_u8(&request, IFLA_VXLAN_COLLECT_METADATA, 1);
--
2.1.0
[2]
b/datapath/linux/compat/include/linux/openvswitch.h
@@ -291,6 +291,7 @@ enum ovs_vport_attr {
enum {
OVS_VXLAN_EXT_UNSPEC,
OVS_VXLAN_EXT_GBP, /* Flag or __u32 */
+ OVS_VXLAN_EXT_GPE, /* Flag or __u32 */
__OVS_VXLAN_EXT_MAX,
};
@@ -54,11 +54,26 @@ static int vxlan_get_options(const struct vport
*vport, struct sk_buff *skb)
nla_nest_end(skb, exts);
}
+ if (vxlan->flags & VXLAN_F_GPE) {
+ struct nlattr *exts;
+
+ exts = nla_nest_start(skb, OVS_TUNNEL_ATTR_EXTENSION);
+ if (!exts)
+ return -EMSGSIZE;
+
+ if (vxlan->flags & VXLAN_F_GPE &&
+ nla_put_flag(skb, OVS_VXLAN_EXT_GPE))
+ return -EMSGSIZE;
+
+ nla_nest_end(skb, exts);
+ }
+
return 0;
}
static const struct nla_policy exts_policy[OVS_VXLAN_EXT_MAX + 1] = {
[OVS_VXLAN_EXT_GBP] = { .type = NLA_FLAG, },
+ [OVS_VXLAN_EXT_GPE] = { .type = NLA_FLAG, },
};