summaryrefslogtreecommitdiff
path: root/ofproto/tunnel.c
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@ovn.org>2017-01-17 10:16:09 -0800
committerPravin B Shelar <pshelar@ovn.org>2017-01-28 12:16:34 -0800
commitbf4bbd0d1235b1e47ae69883dac0086bdbe7bc2e (patch)
tree10fe68dcf91ffa28f735b4947f6880ae38ced538 /ofproto/tunnel.c
parentbe549a9d96367b50899d3e67486f5d01ed153e1a (diff)
downloadopenvswitch-bf4bbd0d1235b1e47ae69883dac0086bdbe7bc2e.tar.gz
tunnel: Add support to configure ptk_mark
Today packet mark action is broken for Tunnel ports with tunnel monitoring. User can write a flow to set pkt-mark for any tunnel traffic, but there is no way to set the packet mark for corresponding BFD traffic. Following patch introduces new option in OVSDB tunnel configuration so that user can set skb-mark for given tunnel endpoint. OVS would set the mark according to the skb-mark option for all tunnel traffic including packets generated by vSwitchd like tunnel monitoring BFD packet. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jarno Rajahalme <jarno@ovn.org>
Diffstat (limited to 'ofproto/tunnel.c')
-rw-r--r--ofproto/tunnel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ofproto/tunnel.c b/ofproto/tunnel.c
index ce727f41f..e285d5464 100644
--- a/ofproto/tunnel.c
+++ b/ofproto/tunnel.c
@@ -461,6 +461,11 @@ tnl_port_send(const struct ofport_dpif *ofport, struct flow *flow,
| (cfg->csum ? FLOW_TNL_F_CSUM : 0)
| (cfg->out_key_present ? FLOW_TNL_F_KEY : 0);
+ if (cfg->set_egress_pkt_mark) {
+ flow->pkt_mark = cfg->egress_pkt_mark;
+ wc->masks.pkt_mark = UINT32_MAX;
+ }
+
if (pre_flow_str) {
char *post_flow_str = flow_to_string(flow);
char *tnl_str = tnl_port_fmt(tnl_port);