diff mbox

[ovs-dev,5/8] datapath: get rid of redundant vxlan_dev.flags

Message ID 1500497833-30066-6-git-send-email-gvrose8192@gmail.com
State Superseded
Delegated to: Joe Stringer
Headers show

Commit Message

Gregory Rose July 19, 2017, 8:57 p.m. UTC
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>
---
 datapath/vport-vxlan.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox

Patch

diff --git a/datapath/vport-vxlan.c b/datapath/vport-vxlan.c
index 7beaf6e..62cdb2e 100644
--- a/datapath/vport-vxlan.c
+++ b/datapath/vport-vxlan.c
@@ -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;