From patchwork Tue Jul 18 17:49:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Chandran, Sugesh" X-Patchwork-Id: 790449 X-Patchwork-Delegate: joestringer@nicira.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) 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 3xBnk53BYFz9s75 for ; Wed, 19 Jul 2017 03:50:05 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 82F89B1D; Tue, 18 Jul 2017 17:49:29 +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 0D4DCB00 for ; Tue, 18 Jul 2017 17:49:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 87D1FAC for ; Tue, 18 Jul 2017 17:49:27 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2017 10:49:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,378,1496127600"; d="scan'208";a="880166113" Received: from silpixa00389820.ir.intel.com ([10.237.222.155]) by FMSMGA003.fm.intel.com with ESMTP; 18 Jul 2017 10:49:25 -0700 From: Sugesh Chandran To: joe@ovn.org, dev@openvswitch.org, azhou@ovn.org Date: Tue, 18 Jul 2017 18:49:19 +0100 Message-Id: <1500400161-76766-2-git-send-email-sugesh.chandran@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500400161-76766-1-git-send-email-sugesh.chandran@intel.com> References: <1500400161-76766-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 v3 1/3] 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 330c04c..03e7a7f 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -3296,6 +3296,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;