diff mbox

[ovs-dev,v2,2/4] xlate: Clear tunnel mask along with other fields while combine actions.

Message ID 1499161601-3230-3-git-send-email-sugesh.chandran@intel.com
State Changes Requested
Delegated to: Joe Stringer
Headers show

Commit Message

Chandran, Sugesh July 4, 2017, 9:46 a.m. UTC
The tunnel mask in the translation state should be cleared along with other
context fields. It is necessary in 'apply_nested_clone_actions' as it will be
used to combine post tunnel output actions with tunnel push. This will assure
right openflow state while executing the translation.

Signed-off-by: Sugesh Chandran <sugesh.chandran@intel.com>
Signed-off-by: Zoltán Balogh <zoltan.balogh@ericsson.com>
Co-authored-by: Zoltán Balogh <zoltan.balogh@ericsson.com>
---
 ofproto/ofproto-dpif-xlate.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Joe Stringer July 14, 2017, 11:43 p.m. UTC | #1
On 4 July 2017 at 02:46, Sugesh Chandran <sugesh.chandran@intel.com> wrote:
> The tunnel mask in the translation state should be cleared along with other
> context fields. It is necessary in 'apply_nested_clone_actions' as it will be
> used to combine post tunnel output actions with tunnel push. This will assure
> right openflow state while executing the translation.
>
> Signed-off-by: Sugesh Chandran <sugesh.chandran@intel.com>
> Signed-off-by: Zoltán Balogh <zoltan.balogh@ericsson.com>
> Co-authored-by: Zoltán Balogh <zoltan.balogh@ericsson.com>
> ---

Acked-by: Joe Stringer <joe@ovn.org>
diff mbox

Patch

diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index b4323d4..a335d14 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -3295,6 +3295,7 @@  apply_nested_clone_actions(struct xlate_ctx *ctx, const struct xport *in_dev,
     flow->in_port.ofp_port = out_dev->ofp_port;
     flow->metadata = htonll(0);
     memset(&flow->tunnel, 0, sizeof flow->tunnel);
+    memset(&ctx->wc->masks.tunnel, 0, sizeof ctx->wc->masks.tunnel);
     flow->tunnel.metadata.tab =
                            ofproto_get_tun_tab(&out_dev->xbridge->ofproto->up);
     ctx->wc->masks.tunnel.metadata.tab = flow->tunnel.metadata.tab;