summaryrefslogtreecommitdiff
path: root/lib/match.c
diff options
context:
space:
mode:
authorJarno Rajahalme <jarno.rajahalme@nsn.com>2013-05-09 15:24:16 +0300
committerBen Pfaff <blp@nicira.com>2013-05-10 10:50:06 -0700
commit0ad90c845b7e82090a846fbe9f927e8d1c84cfc9 (patch)
tree37cdc628cc8bcb1344075a54de68d1a62620a04c /lib/match.c
parent500d243dad40ff667710aca1d099d97c38e6a62d (diff)
downloadopenvswitch-0ad90c845b7e82090a846fbe9f927e8d1c84cfc9.tar.gz
OpenFlow-level flow-based tunneling support.
Adds tun_src and tun_dst match and set capabilities via new NXM fields NXM_NX_TUN_IPV4_SRC and NXM_NX_TUN_IPV4_DST. This allows management of large number of tunnels via the flow tables, without requiring the tunnels to be pre-configured. Flow-based tunnels can be configured with options remote_ip=flow and local_ip=flow. local_ip=flow requires remote_ip=flow. When set, the tunnel remote IP address and/or local IP address is set from the flow, instead of the tunnel configuration. Example: $ ovs-vsctl add-port br0 gre -- set Interface gre ofport_request=1 type=gre options:remote_ip=flow options:key=flow $ ovs-ofctl add-flow br0 "in_port=LOCAL actions=set_tunnel:1,set_field:192.168.0.1->tun_dst,output:1" $ ovs-ofctl add-flow br0 "in_port=1 tun_src=192.168.0.1 tun_id=1 actions=LOCAL" Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/match.c')
-rw-r--r--lib/match.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/match.c b/lib/match.c
index fc3c54061..512253ec2 100644
--- a/lib/match.c
+++ b/lib/match.c
@@ -135,13 +135,9 @@ match_wc_init(struct match *match, const struct flow *flow)
void
match_init_exact(struct match *match, const struct flow *flow)
{
- ovs_be64 tun_id = flow->tunnel.tun_id;
-
match->flow = *flow;
match->flow.skb_priority = 0;
match->flow.skb_mark = 0;
- memset(&match->flow.tunnel, 0, sizeof match->flow.tunnel);
- match->flow.tunnel.tun_id = tun_id;
flow_wildcards_init_exact(&match->wc);
}