diff mbox

[net-next] openvswitch: fix VxLAN-gpe port can't be created in ovs compat mode

Message ID 20161208105750.GA14898@cran64.bj.intel.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Yang, Yi Dec. 8, 2016, 10:57 a.m. UTC
On Thu, Dec 08, 2016 at 09:54:00AM +0100, Jiri Benc wrote:
> On Thu,  8 Dec 2016 16:20:10 +0800, Yi Yang wrote:
> > In ovs compat mode, ovs won't use LWT in current kernel, this is to
> > make sure ovs can work on the old kernels, Linux kernel v4.7 includes
> > VxLAN-gpe support but many Linux distributions' kernels are odler than
> > v4.7, this fix will ensure that ovs can create VxLAN-gpe port correctly
> > on old kernels, it has been verified on Ubuntu 16.04 x86_64 with Linux
> > kernel 4.4.0-53-generic.
> 
> NAK. We do have a way to configure this and that's rtnetlink. Open
> vSwitch should use that to configure tunnels. Out of tree modules are
> on their own. Upstream kernel does not accommodate out of tree modules.
>
Jiri, this has used rtnetlink to confgiure, te below is my test code in ovs.
As Pravin mentioned, in compat mode, ovs won't use current in-kernel
module which is vxlan in upstream kernel, but ovs has its own vport_vxlan
module for this, it has different behaviour from LWT in upstream kernel.
If you try this in the kernels below v4.7, you will clearly know this.

ovs will port this patch into the below files in ovs soure code
datapath/linux/compat/include/linux/openvswitch.h and datapath/vport-vxlan.c once it is accepted,this is ovs upstream process, if Linux kernel doesn't include this, ovs won't accept it.

So ovs out of tree modules need to adapt to upstream kernel, any
kernel-related changes must be accepted by Linux kernel at first. Pravin
is a dedicated person doing such work, your L3 patches merged into
net-next will be ported into ovs out of tree modules by Pravin in the
same way.

--
2.1.0

Comments

Jiri Benc Dec. 8, 2016, 11:37 a.m. UTC | #1
On Thu, 8 Dec 2016 18:57:51 +0800, Yang, Yi wrote:
> So ovs out of tree modules need to adapt to upstream kernel, any
> kernel-related changes must be accepted by Linux kernel at first.

I'm perfectly aware of that and I'm saying that your patch is
unacceptable for upstream kernel. This is a long standing policy of the
kernel: there's no way you can get a patch into the kernel to
accommodate an out of tree kernel module. The policy is there for good
reasons and as paradoxical as it may sound, it benefits the projects
that employ out of tree modules in the long run.

If Open vSwitch wants to carry a non-upstream patch, it's its choice
and we can have that discussion but that's not something to discuss on
netdev@vger nor propose for net-next.

 Jiri
Yang, Yi Dec. 8, 2016, 12:01 p.m. UTC | #2
On Thu, Dec 08, 2016 at 12:37:56PM +0100, Jiri Benc wrote:
> On Thu, 8 Dec 2016 18:57:51 +0800, Yang, Yi wrote:
> > So ovs out of tree modules need to adapt to upstream kernel, any
> > kernel-related changes must be accepted by Linux kernel at first.
> 
> I'm perfectly aware of that and I'm saying that your patch is
> unacceptable for upstream kernel. This is a long standing policy of the
> kernel: there's no way you can get a patch into the kernel to
> accommodate an out of tree kernel module. The policy is there for good
> reasons and as paradoxical as it may sound, it benefits the projects
> that employ out of tree modules in the long run.
> 
> If Open vSwitch wants to carry a non-upstream patch, it's its choice
> and we can have that discussion but that's not something to discuss on
> netdev@vger nor propose for net-next.
>
Jiri, according to your statement, we have to switch Linux 4.7 or above
if we want to use ovs VxLAN-gpe, Ubuntu 16.04 has had new kernel, but it
just use Linux kernel 4.4, you know Linux distributuions nerver uses the
latest stable Linux kernel because they have their own patches to
maintain, that will be a nightmare if they take the latest stable
kernel. You know RHEL also follows the same philosophy.

Current ovs master can be built on Ubuntu 14.04 which have Linux kernel
3.13, I think compatibility backward is very important, out of tree
modules are very important to ovs. If ovs installation will depend on
the latest kernel and force users to switch to new kernel, I believe it
nerver will be so popular in the industies.
diff mbox

Patch

diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c
index 0d03334..7d8a0f4 100644
--- a/lib/dpif-netlink.c
+++ b/lib/dpif-netlink.c
@@ -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);