[ovs-dev] [RFC PATCH] create vxlan device using rtnetlink interface

Jiri Benc jbenc at redhat.com
Mon Apr 18 10:27:05 UTC 2016


On Fri, 15 Apr 2016 20:36:51 -0700, Jesse Gross wrote:
> What about using the driver name exposed through ethtool? I believe
> that all of the tunnel and internal devices expose this in a
> consistent way - i.e. a VXLAN device can be queried and get back the
> string "vxlan". Any driver other than the ones that we recognize can
> be assumed to be OVS_VPORT_TYPE_NETDEV.

Or netlink. Though ethtool is more generic in this case, as with
netlink, every interface type would need to be queried differently.

> I'm not too excited about this. It seems like it would be a regression
> - currently OVSDB allows remote creation of tunnels, so it seems like
> this would break existing setups if it also requires users to
> explicitly create tunnel devices on the host ahead of time.

It wouldn't break the existing setups, the current code is not going
away.

However, it wouldn't allow remote creation of tunnels with new features
(like VXLAN-GPE). I don't think it's that bad - we don't support remote
creation of e.g. veth pairs, yet it's common to have them.

> One comment on the patch itself - it's possible that the device that
> is being created might not support all of the necessary options that
> we are passing to it. For example, the original VXLAN driver as merged
> into the kernel didn't support COLLECT_METADATA. We'll need to check
> that the device that was created supports what we need and fallback to
> the old model otherwise.

Yes. Unfortunately, the only way to find out is to fetch back the
config from the created interface and if it doesn't match, delete the
interface. And fall back to the compat code but *only if* there are no
advanced features specified. What the "advanced features" are will need
to be hardcoded in ovs.

What I'm proposing makes this much simpler. No need for verifying the
interface was created with all the wanted flags, no need for knowing
what features are supported by the compat code, etc. Just take whatever
was given to ovs by the user and use it.

 Jiri



More information about the dev mailing list