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

Pravin Shelar pshelar at ovn.org
Tue Dec 6 17:46:04 UTC 2016


On Mon, Dec 5, 2016 at 11:17 PM, Yang, Yi Y <yi.y.yang at intel.com> wrote:
> Hi, guys
>
> 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 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.
>
> 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 <yi.y.yang at intel.com>
> 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 <yi.y.yang at intel.com>
> ---
>  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
We can not use USE_UPSTREAM_TUNNEL macro symbol in userspace. The
vswitchd should not be tied to specific kernel version.

>      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
>
>


More information about the dev mailing list