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 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" Jarno Rajahalme (4): Keep all of tunnel metadata in flow. ofproto-dpif: Remove unnecessary initial_vals.tunnel_ip_tos. ofproto-dpif: Keep perfect fitness on tunnel input. OpenFlow-level flow-based tunneling support. --- v2: - Rebase - Keep ctx->base_flow.tunnel zeroed to reflect datapath view of the flow - Add orig_tunnel_ip_dst to struct action_xlate_ctx and prevent tunnel output with tunnel ip_dst the same is the original tunnel IP destination address. This helps avoiding loops otherwise easy to create accidentally with the new 'ip_remote=flow' tunnel configuration option. include/openflow/nicira-ext.h | 3 +++ lib/flow.c | 2 ++ lib/flow.h | 2 ++ lib/match.c | 4 ---- lib/meta-flow.c | 20 +++++++++------- lib/netdev-vport.c | 21 +++++++++++++--- lib/netdev.h | 2 ++ lib/nx-match.c | 8 ++++++- lib/ofp-print.c | 8 +++++++ lib/ofp-util.c | 29 +++++++++++----------- ofproto/ofproto-dpif.c | 53 +++++++++++++++++++---------------------- ofproto/tunnel.c | 41 ++++++++++++++++++++++++++----- tests/ofproto.at | 27 +++++++++++++++++++++ tests/tunnel.at | 28 ++++++++++++++++++++++ 14 files changed, 183 insertions(+), 65 deletions(-) -- 1.7.10.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev