On Tue, Dec 06, 2016 at 07:17:20AM +0000, Yang, Yi Y wrote: > Hi, guys Hi Yi,
> This patch isn't updated from June on, Cascardo said he/Eric is still > working on this, but six months passed, we don't see any following Work is still ongoing. There was delay due to some debate about how and when to prefer out-of-tree vs in-tree tunnels. > patch for this, now I have time to revisit it, for case 3 Pravin > mentioned, I can make it work by applying the below patch [1] against > https://mail.openvswitch.org/pipermail/ovs-dev/2016-June/316881.html, > but it only can create vxlan port, it will also create vxlan port even > if I create vxlan-gpe port by cmd "sudo ovs-vsctl add-port br-int > vxlan_gpe1 -- set interface vxlan_gpe1 type=vxlan > options:remote_ip=flow options:key=flow options:dst_port=4790 > options:exts=gpe", the reason is very simple, vxlan_configure_exts in > datapath/vport-vxlan.c will be called to set vxlan configuration, but > it can't recognize vxlangpe extension and flags, you guys told me > datapath/vport-vxlan.c and > datapath/linux/compat/include/linux/openvswitch.h are compatibility > code, we can't change them, but for case 3, we have to change them > like patch [2], I know we should change them on Linux net-next kernel > first, here I just show you we have to do so for case 3 Pravin > mentioned, I'm happy to hear you have better way for this. > > So my advice about this is we can push patch [2] to Linux net-next > first, then apply patch series > https://mail.openvswitch.org/pipermail/ovs-dev/2016-June/316879.html > from Cascardo and apply [1], that can cover all the cases Pravin > mentioned. As Cascardo and Jesse mentioned back in June [1], we should not be adding new features to this interface. GPE has been backported to the out-of-tree VXLAN code. The only part that remains is userspace changes to create with rtnetlink, which is still being worked on. [1] https://mail.openvswitch.org/pipermail/ovs-dev/2016-June/316777.html > This patch has blocked us too long, we look forward to seeing progress on > this. > > > [1]: > From f40b6fec09e1f9ad14e50ba224f46b1b9657399c Mon Sep 17 00:00:00 2001 > From: Yi Yang <[email protected]> > Date: Tue, 6 Dec 2016 12:39:41 +0800 > Subject: [PATCH] Use ovs compat modules if USE_UPSTREAM_TUNNEL is defined > > Signed-off-by: Yi Yang <[email protected]> > --- > lib/dpif-netlink.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c > index 0d03334..2286c3e 100644 > --- a/lib/dpif-netlink.c > +++ b/lib/dpif-netlink.c > @@ -1062,6 +1062,9 @@ dpif_netlink_port_query__(const struct dpif_netlink > *dpif, odp_port_t port_no, > static int > dpif_netlink_port_create(struct netdev *netdev) > { > +#ifndef USE_UPSTREAM_TUNNEL > + return EOPNOTSUPP; > +#else > switch (netdev_to_ovs_vport_type(netdev_get_type(netdev))) { > case OVS_VPORT_TYPE_VXLAN: > return netdev_vxlan_create(netdev); > @@ -1077,6 +1080,7 @@ dpif_netlink_port_create(struct netdev *netdev) > return EOPNOTSUPP; > } > return 0; > +#endif > } > > static int > -- > 2.1.0 > > > [2]: > > diff --git a/datapath/linux/compat/include/linux/openvswitch.h > b/datapath/linux/compat/include/linux/openvswitch.h > index 12260d8..17e21cb 100644 > --- a/datapath/linux/compat/include/linux/openvswitch.h > +++ 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, > }; > > diff --git a/datapath/vport-vxlan.c b/datapath/vport-vxlan.c > index 11965c0..a5882ed 100644 > --- a/datapath/vport-vxlan.c > +++ b/datapath/vport-vxlan.c > @@ -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, }, > }; > > static int vxlan_configure_exts(struct vport *vport, struct nlattr *attr, > @@ -76,6 +91,8 @@ static int vxlan_configure_exts(struct vport *vport, struct > nlattr *attr, > > if (exts[OVS_VXLAN_EXT_GBP]) > conf->flags |= VXLAN_F_GBP; > + if (exts[OVS_VXLAN_EXT_GPE]) > + conf->flags |= VXLAN_F_GPE; > > return 0; > } _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
