diff options
author | wenxu <wenxu@chinatelecom.cn> | 2022-04-29 03:58:30 -0400 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2022-09-09 16:22:33 +0200 |
commit | d046453b56a9432aac83a2950e7c4083eb3274dd (patch) | |
tree | 96552082b9175b9dc8accbac3422a0da97b5a8eb /ofproto | |
parent | 5046f2e35f62838c2ad410e20448e0b7c81d8234 (diff) | |
download | openvswitch-d046453b56a9432aac83a2950e7c4083eb3274dd.tar.gz |
ofproto-dpif-xlate: Clear tunnel wc bits if original packet is non-tunnel.
A packet go through the encap openflow(set_field tun_id/src/dst)
The tunnel wc bits will be set. But it should be clear if the
original packet is non-tunnel. It is not necessary for datapath
wc the tunnel info for match(like the similar logic for vlan).
Signed-off-by: wenxu <wenxu@chinatelecom.cn>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'ofproto')
-rw-r--r-- | ofproto/ofproto-dpif-xlate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index fda802e83..d53d1d5d8 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -7665,6 +7665,10 @@ xlate_wc_finish(struct xlate_ctx *ctx) ctx->wc->masks.vlans[i].tci = 0; } } + /* Clear tunnel wc bits if original packet is non-tunnel. */ + if (!flow_tnl_dst_is_set(&ctx->xin->upcall_flow->tunnel)) { + memset(&ctx->wc->masks.tunnel, 0, sizeof ctx->wc->masks.tunnel); + } } /* Translates the flow, actions, or rule in 'xin' into datapath actions in |