On 4/29/22 09:58, [email protected] wrote:
> From: wenxu <[email protected]>
> 
> 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 <[email protected]>
> ---
>  ofproto/ofproto-dpif-xlate.c | 4 ++++
>  1 file changed, 4 insertions(+)

Applied and backported down to 2.17.  Thanks!

Best regards, Ilya Maximets.

> 
> diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
> index 17f7e28..6905d30 100644
> --- a/ofproto/ofproto-dpif-xlate.c
> +++ b/ofproto/ofproto-dpif-xlate.c
> @@ -7635,6 +7635,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

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to