diff options
author | William Tu <u9012063@gmail.com> | 2018-05-14 11:46:47 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-05-14 16:21:03 -0700 |
commit | c6d872013786253377ef7ac279d1a386f958ed7f (patch) | |
tree | 7086a4331e755f4d762a6f470c2aad19502daebc /ofproto/tunnel.h | |
parent | 07aec2ac19930b05370d813ff5a44e20c2908498 (diff) | |
download | openvswitch-c6d872013786253377ef7ac279d1a386f958ed7f.tar.gz |
tunnel: make tun_key_to_attr aware of tunnel type.
When there is a flow rule which forwards a packet from geneve
port to another tunnel port, ex: gre, the tun_metadata carried
from the geneve port might affect the outgoing port. For example,
the datapath action from geneve port output to gre port (1) shows:
set(tunnel(tun_id=0x7b,dst=2.2.2.2,ttl=64,
geneve({class=0xffff,type=0,len=4,0x123}),flags(df|key))),1
Where the geneve(...) should not exist.
When using kernel's tunnel port, this triggers an error saying:
"Multiple metadata blocks provided", when there is a rule forwarding
the geneve packet to vxlan/erspan tunnel port. A userspace test case
using geneve and gre also demonstrates the issue.
The patch makes the tun_key_to_attr aware of the tunnel type. So only
the relevant output tunnel's options are set.
Reported-by: Xiaoyan Jin <xiaoyanj@vmware.com>
Signed-off-by: William Tu <u9012063@gmail.com>
Cc: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/tunnel.h')
-rw-r--r-- | ofproto/tunnel.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ofproto/tunnel.h b/ofproto/tunnel.h index 47d3dd56d..323f3fa03 100644 --- a/ofproto/tunnel.h +++ b/ofproto/tunnel.h @@ -44,6 +44,7 @@ void tnl_wc_init(struct flow *, struct flow_wildcards *); bool tnl_process_ecn(struct flow *); odp_port_t tnl_port_send(const struct ofport_dpif *, struct flow *, struct flow_wildcards *wc); +const char *tnl_port_get_type(const struct ofport_dpif *tnl_port); /* Returns true if 'flow' should be submitted to tnl_port_receive(). */ static inline bool |