[ovs-dev] [RFC PATCH] datapath: allow tunnels to be created with rtnetlink

Pravin Shelar pshelar at ovn.org
Fri Dec 9 23:12:39 UTC 2016


On Fri, Dec 9, 2016 at 12:43 AM, Jiri Benc <jbenc at redhat.com> wrote:
> On Thu, 8 Dec 2016 22:49:56 -0800, Pravin Shelar wrote:
>> OVS out of tree kernel module is using compat tunnel code upto kernel
>> 4.5 kernel even thought LWT is available in these kernels. This is due
>> to missing features on these kernel which are backported to OVS
>> module. In future we could bump up requirements of kernel again.
>> Therefore I think we could add compat code for GPE given it is not
>> that complicated.
>
> What I'm concerned about is not so much the code in the out of tree
> module but the added code that would have to try genetlink for
> VXLAN-GPE. I hoped to use rtnetlink only for this; adding genetlink
> would required quite a bit of code (also because it will have to be
> tried only for the out of tree module but never for the in kernel one;
> this differs from what we'll do for VXLAN itself).
>
> We'd end up with three different handling for different features:
>
> (1) genetlink+rtnetlink for both out of tree and in tree module (for
>     e.g. plain VXLAN)
> (2) genetlink+rtnetlink for out of tree module, rtnetlink for in three
>     module (for VXLAN-GPE)
> (3) rtnetlink for both out of tree and in tree module (new VXLAN
>     features added in the future)
>
I see where the confusion is.

If you are using OVS tunnel compat code then you can not use LWT
interfaces even if kernel supports LWT. So you just need to detect
what out of tree kernel module is using and accordingly use genetlink
or rtnetlink interface.
If you read this thread you would see discussion related to this and
you would be able to avoid this complexity.

So from userspace you just need to detect if you can create ovs_geneve
interface if it is successfull use existing genetlink code as it is
for ALL tunnel type, if it fails move to rtnetlink interface for ALL
tunnel types if that fails too then fall back to existing genetlink
interface. This works irrespective of OVS kernel module.

Therefore is not much difference even if we add compat interface for VXLAN-GPE.


More information about the dev mailing list