diff mbox

[ovs-dev,24/24] datapath: Check for flow key tunnel proto to detect tunnel.

Message ID 1468387517-61892-5-git-send-email-pshelar@ovn.org
State Accepted
Headers show

Commit Message

Pravin Shelar July 13, 2016, 5:25 a.m. UTC
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>
---
 datapath/flow_netlink.c | 2 +-
 datapath/flow_table.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c
index bc87090..0b7b787 100644
--- a/datapath/flow_netlink.c
+++ b/datapath/flow_netlink.c
@@ -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);
 
diff --git a/datapath/flow_table.c b/datapath/flow_table.c
index 466b2b7..d4204e5 100644
--- a/datapath/flow_table.c
+++ b/datapath/flow_table.c
@@ -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),