From patchwork Tue Sep 12 19:49:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Zhou X-Patchwork-Id: 813027 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 3xsFkh5rknz9sPm for ; Wed, 13 Sep 2017 05:50:03 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 22309A6E; Tue, 12 Sep 2017 19:50:00 +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 B611A8EE for ; Tue, 12 Sep 2017 19:49:58 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 5945B159 for ; Tue, 12 Sep 2017 19:49:58 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id q76so6599617pfq.5 for ; Tue, 12 Sep 2017 12:49:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id :content-transfer-encoding; bh=pbGCKlZzCM7kP2hmglhTVS/8MNKF/nLC3OXsVHaOEb0=; b=VwKD3CaN4e1V4R9FNXcjhF4cAt/P+lt0/kxw9zN5pe4dDIeTcPtNnVIntztq2Sga2b z7Sj36wUu4OwP+nmysTCPZHge2/3Eegby2pJMDcUCvtH0k3zKtLaj1M3VZRsTQT8BE8f OP5wNakgXjg7FmneSOgZXaXuRmssBcMUOAuK2iCeNlvl2wYIINq1GWviLeWrvmkoa6q6 3SV9TRXPQ9jriejlLDSx9sAaMDR294NM5Xw3sZj42L1YR4ihEZnyOGvx6W+i90+Srnnx ddc2ssJvWaSp0p0Oezr6pnPU+1fAMS4zPXN8jVx8QSFQnh04/6nUsvkZ02L0ndzIZzBF SzJQ== X-Gm-Message-State: AHPjjUj3fR+1DMxL/vl2wi1q8zUTjGSA2ACwp62HZz77Doj1753rDcJr NKK9lFoqQOlqYMWY X-Google-Smtp-Source: ADKCNb61l/7w0dJN0Bsm7P9GQjmCFH46PqR+mXj7uQEEYT47bnScwgv29GRlYfjGQp9u3m5rSOfsnA== X-Received: by 10.98.32.92 with SMTP id g89mr16061198pfg.285.1505245797804; Tue, 12 Sep 2017 12:49:57 -0700 (PDT) Received: from centos.eng.vmware.com ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id j13sm23739951pfk.107.2017.09.12.12.49.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Sep 2017 12:49:56 -0700 (PDT) From: Andy Zhou To: dev@openvswitch.org Date: Tue, 12 Sep 2017 12:49:03 -0700 Message-Id: <1505245749-3402-1-git-send-email-azhou@ovn.org> X-Mailer: git-send-email 1.8.3.1 X-Spam-Status: No, score=0.5 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [merge native tunneling and patch port 1/7] ofproto-dpif: Unfreeze within clone 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: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org When translating actions within open flow clone, actions generated by finish_freezeing() should also be enclosed within the datapath clone netlink encoding. Signed-off-by: Andy Zhou Tested-by: Greg Rose Reviewed-by: Greg Rose --- ofproto/ofproto-dpif-xlate.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 9e1f837cb23e..e5ad832d7c47 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -5353,6 +5353,9 @@ compose_clone(struct xlate_ctx *ctx, const struct ofpact_nest *oc) if (reversible_actions(oc->actions, oc_actions_len)) { old_flow = ctx->xin->flow; do_xlate_actions(oc->actions, oc_actions_len, ctx); + if (ctx->freezing) { + finish_freezing(ctx); + } goto xlate_done; } @@ -5372,6 +5375,9 @@ compose_clone(struct xlate_ctx *ctx, const struct ofpact_nest *oc) offset = nl_msg_start_nested(ctx->odp_actions, OVS_ACTION_ATTR_CLONE); ac_offset = ctx->odp_actions->size; do_xlate_actions(oc->actions, oc_actions_len, ctx); + if (ctx->freezing) { + finish_freezing(ctx); + } nl_msg_end_non_empty_nested(ctx->odp_actions, offset); goto dp_clone_done; } @@ -5382,6 +5388,9 @@ compose_clone(struct xlate_ctx *ctx, const struct ofpact_nest *oc) ac_offset = nl_msg_start_nested(ctx->odp_actions, OVS_SAMPLE_ATTR_ACTIONS); do_xlate_actions(oc->actions, oc_actions_len, ctx); + if (ctx->freezing) { + finish_freezing(ctx); + } if (nl_msg_end_non_empty_nested(ctx->odp_actions, ac_offset)) { nl_msg_cancel_nested(ctx->odp_actions, offset); } else {