]> git.proxmox.com Git - mirror_ovs.git/commitdiff
datapath: get rid of redundant vxlan_dev.flags
authorGreg Rose <gvrose8192@gmail.com>
Fri, 21 Jul 2017 23:46:09 +0000 (16:46 -0700)
committerJoe Stringer <joe@ovn.org>
Mon, 24 Jul 2017 18:25:34 +0000 (11:25 -0700)
Upstream commit:
    commit dc5321d79697db1b610c25fa4fad1aec7533ea3e
    Author: Matthias Schiffer <mschiffer@universe-factory.net>
    Date:   Mon Jun 19 10:03:56 2017 +0200

    vxlan: get rid of redundant vxlan_dev.flags

    There is no good reason to keep the flags twice in vxlan_dev and
    vxlan_config.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Applied using HAVE_VXLAN_DEV_CFG compatibility flag defined in
acinclude.m4.

Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Joe Stringer <joe@ovn.org>
acinclude.m4
datapath/vport-vxlan.c

index 99326824923c6bec866e286900c7bcff0dad16f0..d72e13cd6c73ff54a03e0dba66176fab0cce9b6d 100644 (file)
@@ -753,6 +753,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   OVS_FIND_FIELD_IFELSE([$KSRC/include/linux/netdevice.h], [net_device],
                         [needs_free_netdev],
                         [OVS_DEFINE([HAVE_NEEDS_FREE_NETDEV])])
+  OVS_FIND_FIELD_IFELSE([$KSRC/include/net/vxlan.h], [vxlan_dev], [cfg],
+                        [OVS_DEFINE([HAVE_VXLAN_DEV_CFG])])
   OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_helper.h],
                   [nf_conntrack_helper_put])
 
index fbde91f50ec55049a736035c6c1f0f9ff857d118..29106944126200681a7f7b0eb1787fe3d7768012 100644 (file)
@@ -40,14 +40,22 @@ static int vxlan_get_options(const struct vport *vport, struct sk_buff *skb)
        if (nla_put_u16(skb, OVS_TUNNEL_ATTR_DST_PORT, ntohs(dst_port)))
                return -EMSGSIZE;
 
+#ifdef HAVE_VXLAN_DEV_CFG
+       if (vxlan->cfg.flags & VXLAN_F_GBP) {
+#else
        if (vxlan->flags & VXLAN_F_GBP) {
+#endif
                struct nlattr *exts;
 
                exts = nla_nest_start(skb, OVS_TUNNEL_ATTR_EXTENSION);
                if (!exts)
                        return -EMSGSIZE;
 
+#ifdef HAVE_VXLAN_DEV_CFG
+               if (vxlan->cfg.flags & VXLAN_F_GBP &&
+#else
                if (vxlan->flags & VXLAN_F_GBP &&
+#endif
                    nla_put_flag(skb, OVS_VXLAN_EXT_GBP))
                        return -EMSGSIZE;