diff options
author | Greg Rose <gvrose8192@gmail.com> | 2018-05-17 17:46:41 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-05-21 20:33:30 -0700 |
commit | 068794b43f0eb879648591f8c9ca9c2e6670989f (patch) | |
tree | fcae31d318bb07f2029778daf20d303f6e75867f /ofproto/tunnel.c | |
parent | 1c385f497271182eb88afc5a38897c9781b575b3 (diff) | |
download | openvswitch-068794b43f0eb879648591f8c9ca9c2e6670989f.tar.gz |
erspan: Add flow-based erspan options
The patch add supports for flow-based erspan options.
The erspan_ver, erspan_idx, erspan_dir, and erspan_hwid can be
set as "flow" so that its value is set by the openflow rule,
instead of statically configured at port creation time.
Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/tunnel.c')
-rw-r--r-- | ofproto/tunnel.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ofproto/tunnel.c b/ofproto/tunnel.c index 2fd6ffbd7..03f0ab765 100644 --- a/ofproto/tunnel.c +++ b/ofproto/tunnel.c @@ -474,16 +474,19 @@ tnl_port_send(const struct ofport_dpif *ofport, struct flow *flow, wc->masks.pkt_mark = UINT32_MAX; } - if (cfg->erspan_ver) { + if (!cfg->erspan_ver_flow) { flow->tunnel.erspan_ver = cfg->erspan_ver; } - if (cfg->erspan_idx) { + + if (!cfg->erspan_idx_flow) { flow->tunnel.erspan_idx = cfg->erspan_idx; } - if (cfg->erspan_dir) { + + if (!cfg->erspan_dir_flow) { flow->tunnel.erspan_dir = cfg->erspan_dir; } - if (cfg->erspan_hwid) { + + if (!cfg->erspan_hwid_flow) { flow->tunnel.erspan_hwid = cfg->erspan_hwid; } |