datapath: Check for flow key tunnel proto to detect tunnel.
authorPravin B Shelar <pshelar@ovn.org>
Sun, 17 Jul 2016 16:52:11 +0000 (09:52 -0700)
committerPravin B Shelar <pshelar@ovn.org>
Sun, 17 Jul 2016 17:25:09 +0000 (10:25 -0700)
This brings in missing hunks from upstream commit 00a93babd06aaa
("openvswitch: add tunnel protocol to sw_flow_key").

Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Jesse Gross <jesse@kernel.org>
datapath/flow_netlink.c
datapath/flow_table.c

index 117302d..fb41f28 100644 (file)
@@ -1255,7 +1255,7 @@ int ovs_nla_get_match(struct net *net, struct sw_flow_match *match,
                        /* The userspace does not send tunnel attributes that
                         * are 0, but we should not wildcard them nonetheless.
                         */
-                       if (match->key->tun_key.u.ipv4.dst)
+                       if (match->key->tun_proto)
                                SW_FLOW_KEY_MEMSET_FIELD(match, tun_key,
                                                         0xff, true);
 
index 466b2b7..d4204e5 100644 (file)
@@ -500,7 +500,7 @@ static u32 flow_hash(const struct sw_flow_key *key,
 
 static int flow_key_start(const struct sw_flow_key *key)
 {
-       if (key->tun_key.u.ipv4.dst)
+       if (key->tun_proto)
                return 0;
        else
                return rounddown(offsetof(struct sw_flow_key, phy),