On Wed, Feb 4, 2015 at 7:45 AM, Thomas Graf <tg...@noironetworks.com> wrote:
> Upstream commit:
>     openvswitch: Support VXLAN Group Policy extension
>
>     Introduces support for the group policy extension to the VXLAN virtual
>     port. The extension is disabled by default and only enabled if the user
>     has provided the respective configuration.
>
>       ovs-vsctl add-port br0 vxlan0 -- \
>          set Interface vxlan0 type=vxlan options:exts=gbp
>
>     The configuration interface to enable the extension is based on a new
>     attribute OVS_VXLAN_EXT_GBP nested inside OVS_TUNNEL_ATTR_EXTENSION
>     which can carry additional extensions as needed in the future.
>
>     The group policy metadata is stored as binary blob (struct ovs_vxlan_opts)
>     internally just like Geneve options but transported as nested Netlink
>     attributes to user space.
>
>     Renames the existing TUNNEL_OPTIONS_PRESENT to TUNNEL_GENEVE_OPT with the
>     binary value kept intact, a new flag TUNNEL_VXLAN_OPT is introduced.
>
>     The attributes OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS and existing
>     OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS are implemented mutually exclusive.
>
>     Signed-off-by: Thomas Graf <tg...@suug.ch>
>     Signed-off-by: David S. Miller <da...@davemloft.net>
>
> Upstream: 1dd144 ("openvswitch: Support VXLAN Group Policy extension")
> Signed-off-by: Thomas Graf <tg...@noironetworks.com>
> ---
>  datapath/Modules.mk                               |   3 +-
>  datapath/flow_netlink.c                           | 114 
> +++++++++++++++++++---
>  datapath/linux/compat/include/linux/openvswitch.h |  10 ++
>  datapath/linux/compat/include/net/ip_tunnels.h    |  16 ++-
>  datapath/vport-geneve.c                           |   6 +-
>  datapath/vport-vxlan.c                            |  82 +++++++++++++++-
>  datapath/vport-vxlan.h                            |  11 +++
>  7 files changed, 223 insertions(+), 19 deletions(-)
>  create mode 100644 datapath/vport-vxlan.h
>
...

> +
> +       flags = TUNNEL_KEY;
> +       vxlan_port = vxlan_vport(vport);
> +       if (vxlan_port->exts & VXLAN_F_GBP && md->gbp)
> +               flags |= TUNNEL_VXLAN_OPT;
>
why not just check for md->gpb?

I do not see value in storing vxlan_port->ext. This is redundant
information, we can just look at vxlan_sock->flags in
vxlan_get_options() to generate vxlan port configuration.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to