summaryrefslogtreecommitdiff
path: root/ofproto/tunnel.c
diff options
context:
space:
mode:
authorGreg Rose <gvrose8192@gmail.com>2018-05-17 17:46:41 -0700
committerBen Pfaff <blp@ovn.org>2018-05-21 20:33:30 -0700
commit068794b43f0eb879648591f8c9ca9c2e6670989f (patch)
treefcae31d318bb07f2029778daf20d303f6e75867f /ofproto/tunnel.c
parent1c385f497271182eb88afc5a38897c9781b575b3 (diff)
downloadopenvswitch-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.c11
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;
}