On Thu, Dec 8, 2016 at 9:41 PM, Yi Yang <[email protected]> wrote: > Current out-of-tree ovs vxlan module has included vxlangpe code, but > it can't create vxlangpe port, this patch enables out-of-tree ovs vxlan > module to create vxlangpe port without Linux kernel v4.7 or above needed, > this can ensure we can create vxlangpe port on any Linux system as long > as Linux kernel isn't older than 3.10. > > When you run the 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 > > in current ovs, you will see the below warning > > netdev_vport|WARN|vxlan_gpe1: unknown extension 'gpe' > > , and you will see a vxlan port but not vxlangpe port > > vxlan_sys_4790 Link encap:Ethernet HWaddr 6a:f6:6e:cb:75:fc > inet6 addr: fe80::68f6:6eff:fecb:75fc/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:65485 Metric:1 > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > TX packets:0 errors:0 dropped:8 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) > > But after you apply this patch, you won't see any warning, and > a vxlangpe port will be created successfully. > > vxlan_sys_4790 Link encap:UNSPEC HWaddr > 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 > UP POINTOPOINT RUNNING NOARP MULTICAST MTU:65485 Metric:1 > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) > > $ sudo ovs-vsctl show > fc8eaac4-e16e-47e0-a5bb-9fc8475ada0a > Bridge br-int > Port br-int > Interface br-int > type: internal > Port "vxlan_gpe1" > Interface "vxlan_gpe1" > type: vxlan > options: {dst_port="4790", exts=gpe, key=flow, remote_ip=flow} > > Signed-off-by: Yi Yang <[email protected]> > --- > datapath/linux/compat/include/linux/openvswitch.h | 1 + > datapath/vport-netdev.c | 3 ++- > datapath/vport-vxlan.c | 15 +++++++++++++++ > lib/netdev-vport.c | 2 ++ > 4 files changed, 20 insertions(+), 1 deletion(-) > > 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-netdev.c b/datapath/vport-netdev.c > index 970f7d3..73d6053 100644 > --- a/datapath/vport-netdev.c > +++ b/datapath/vport-netdev.c > @@ -102,7 +102,8 @@ struct vport *ovs_netdev_link(struct vport *vport, const > char *name) > } > > if (vport->dev->flags & IFF_LOOPBACK || > - vport->dev->type != ARPHRD_ETHER || > + (vport->dev->type != ARPHRD_ETHER && > + vport->dev->type != ARPHRD_NONE) ||
OVS out of tree module is not ready for ARPHRD_NONE type of devices yet. we have to backport L3 patches from upstream OVS first. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
