From patchwork Tue Jul 4 09:46:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Chandran, Sugesh" X-Patchwork-Id: 783825 X-Patchwork-Delegate: joestringer@nicira.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x1zhH3wz2z9s9Y for ; Tue, 4 Jul 2017 19:47:59 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 6D8D1900; Tue, 4 Jul 2017 09:46:47 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 428B4892 for ; Tue, 4 Jul 2017 09:46:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id E1937CE for ; Tue, 4 Jul 2017 09:46:44 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jul 2017 02:46:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.40,307,1496127600"; d="scan'208"; a="1167881883" Received: from silpixa00389820.ir.intel.com ([10.237.222.155]) by fmsmga001.fm.intel.com with ESMTP; 04 Jul 2017 02:46:43 -0700 From: Sugesh Chandran To: dev@openvswitch.org, azhou@ovn.org, joe@ovn.org Date: Tue, 4 Jul 2017 10:46:39 +0100 Message-Id: <1499161601-3230-3-git-send-email-sugesh.chandran@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499161601-3230-1-git-send-email-sugesh.chandran@intel.com> References: <1499161601-3230-1-git-send-email-sugesh.chandran@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH v2 2/4] xlate: Clear tunnel mask along with other fields while combine actions. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org 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 Signed-off-by: Zoltán Balogh Co-authored-by: Zoltán Balogh Acked-by: Joe Stringer --- ofproto/ofproto-dpif-xlate.c | 1 + 1 file changed, 1 insertion(+) 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;