{"id":813034,"url":"http://patchwork.ozlabs.org/api/patches/813034/?format=json","web_url":"http://patchwork.ozlabs.org/project/openvswitch/patch/1505245749-3402-6-git-send-email-azhou@ovn.org/","project":{"id":47,"url":"http://patchwork.ozlabs.org/api/projects/47/?format=json","name":"Open vSwitch","link_name":"openvswitch","list_id":"ovs-dev.openvswitch.org","list_email":"ovs-dev@openvswitch.org","web_url":"http://openvswitch.org/","scm_url":"git@github.com:openvswitch/ovs.git","webscm_url":"https://github.com/openvswitch/ovs","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1505245749-3402-6-git-send-email-azhou@ovn.org>","list_archive_url":null,"date":"2017-09-12T19:49:08","name":"[ovs-dev,merge,native,tunneling,and,port,6/7] ofproto-dpif-xlate: Rename apply_nested_clone_actions()","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"ea2c1cc5fb0154c6ac726db45080f6396464b773","submitter":{"id":67699,"url":"http://patchwork.ozlabs.org/api/people/67699/?format=json","name":"Andy Zhou","email":"azhou@ovn.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/openvswitch/patch/1505245749-3402-6-git-send-email-azhou@ovn.org/mbox/","series":[{"id":2760,"url":"http://patchwork.ozlabs.org/api/series/2760/?format=json","web_url":"http://patchwork.ozlabs.org/project/openvswitch/list/?series=2760","date":"2017-09-12T19:49:03","name":"[ovs-dev,merge,native,tunneling,and,port,1/7] ofproto-dpif: Unfreeze within clone","version":1,"mbox":"http://patchwork.ozlabs.org/series/2760/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/813034/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/813034/checks/","tags":{},"related":[],"headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xsFnw435cz9s7M\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 05:52:52 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 27631AD2;\n\tTue, 12 Sep 2017 19:50:07 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 81573A86\n\tfor <dev@openvswitch.org>; Tue, 12 Sep 2017 19:50:03 +0000 (UTC)","from mail-pf0-f195.google.com (mail-pf0-f195.google.com\n\t[209.85.192.195])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 3DCAC159\n\tfor <dev@openvswitch.org>; Tue, 12 Sep 2017 19:50:03 +0000 (UTC)","by mail-pf0-f195.google.com with SMTP id e69so4820705pfg.4\n\tfor <dev@openvswitch.org>; Tue, 12 Sep 2017 12:50:03 -0700 (PDT)","from centos.eng.vmware.com ([208.91.1.34])\n\tby smtp.gmail.com with ESMTPSA id\n\tj13sm23739951pfk.107.2017.09.12.12.50.01\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 12 Sep 2017 12:50:02 -0700 (PDT)"],"X-Greylist":"whitelisted by SQLgrey-1.7.6","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:content-transfer-encoding;\n\tbh=GvBrcK5q5TDVueqKlxng51raGAlBCRhJsiTkwcEzsAw=;\n\tb=MQ9SYkT2U1q93HD/7Ak++eqsOK0FpbjXPKWFmH+tjXd++ea5BSN6ZOxvbgxISvXV5k\n\tYLgDp3snfj7cknb5oFlYb0a/ahveJ7UHafiy0RukhpdYDdFpyJkYEMO9wL6iVkbE5JhO\n\tWiMpDNyDo1o6hdoyJe/E9Ufzn2H1iHVbscBiEDPyQ8qsNEXxDvXkd1B2TKvBoDJMMVWz\n\tkfQYN9csSXv0sdO4SrrNrg4sr747vRpq76zGXB8YL5kNWbmEtW9xwwVRQMaenJ70DPq7\n\tWJHMj4kwE6aMTYU4cmKK1Cjp/koaaPU/vC/XEYA1k6gyZE5eGtkhkAT7gJxcR/hlEr0W\n\t8Zaw==","X-Gm-Message-State":"AHPjjUiIz1AdB8cIwFkY9u94+UdsFxbrpemGv+EJj3HylMvhP6QhsvrF\n\t8WJhmbYTu/QT02V+","X-Google-Smtp-Source":"ADKCNb64AjH4I5KOOUJH7kmrN6R3ukK4dnW3DMO09juMrnB0vlvjxpCUUOEK00/qPZTgODU6PnhFxQ==","X-Received":"by 10.84.128.78 with SMTP id 72mr18708951pla.376.1505245802716; \n\tTue, 12 Sep 2017 12:50:02 -0700 (PDT)","From":"Andy Zhou <azhou@ovn.org>","To":"dev@openvswitch.org","Date":"Tue, 12 Sep 2017 12:49:08 -0700","Message-Id":"<1505245749-3402-6-git-send-email-azhou@ovn.org>","X-Mailer":"git-send-email 1.8.3.1","In-Reply-To":"<1505245749-3402-1-git-send-email-azhou@ovn.org>","References":"<1505245749-3402-1-git-send-email-azhou@ovn.org>","X-Spam-Status":"No, score=0.5 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE,\n\tRCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Subject":"[ovs-dev] [merge native tunneling and patch port 6/7]\n\tofproto-dpif-xlate: Rename apply_nested_clone_actions()","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"},"content":"To patch_port_output(). The original function name does not make\nmuch sense.\n\nSigned-off-by: Andy Zhou <azhou@ovn.org>\n---\n ofproto/ofproto-dpif-xlate.c | 33 +++++++++++++++++----------------\n 1 file changed, 17 insertions(+), 16 deletions(-)","diff":"diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c\nindex 81853c29afbf..94aa071a37cd 100644\n--- a/ofproto/ofproto-dpif-xlate.c\n+++ b/ofproto/ofproto-dpif-xlate.c\n@@ -432,8 +432,8 @@ static void xlate_action_set(struct xlate_ctx *ctx);\n static void xlate_commit_actions(struct xlate_ctx *ctx);\n \n static void\n-apply_nested_clone_actions(struct xlate_ctx *ctx, const struct xport *in_dev,\n-                           struct xport *out_dev);\n+patch_port_output(struct xlate_ctx *ctx, const struct xport *in_dev,\n+                  struct xport *out_dev);\n \n static void\n ctx_trigger_freeze(struct xlate_ctx *ctx)\n@@ -3317,7 +3317,7 @@ validate_and_combine_post_tnl_actions(struct xlate_ctx *ctx,\n     entry->tunnel_hdr.hdr_size = tnl_push_data.header_len;\n     entry->tunnel_hdr.operation = ADD;\n \n-    apply_nested_clone_actions(ctx, xport, out_dev);\n+    patch_port_output(ctx, xport, out_dev);\n     nested_act_flag = is_tunnel_actions_clone_ready(ctx);\n \n     if (nested_act_flag) {\n@@ -3509,21 +3509,22 @@ xlate_flow_is_protected(const struct xlate_ctx *ctx, const struct flow *flow, co\n             xport_in->xbundle->protected && xport_out->xbundle->protected);\n }\n \n-/* Function to combine actions from following device/port with the current\n- * device actions in openflow pipeline. Mainly used for the translation of\n- * patch/tunnel port output actions. It pushes the openflow state into a stack\n- * first, clear out to execute the packet through the device and finally pop\n- * the openflow state back from the stack. This is equivalent to cloning\n- * a packet in translation for the duration of execution.\n+/* Function handles when a packet is sent from one bridge to another bridge.\n  *\n- * On output to a patch port, the output action will be replaced with set of\n- * nested actions on the peer patch port.\n- * Similarly on output to a tunnel port, the post nested actions on\n- * tunnel are chained up with the tunnel-push action.\n+ * The bridges are internally connected, either with patch ports or with\n+ * tunnel ports.\n+ *\n+ * The output action to another bridge causes translation to continue within\n+ * the next bridge. This process can be recursive; the next bridge can\n+ * output yet to another bridge.\n+ *\n+ * The translated actions from the second bridge onwards are enclosed within\n+ * the clone action, so that any modification to the packet will not be visible\n+ * to the remaining actions of the originating bridge.\n  */\n static void\n-apply_nested_clone_actions(struct xlate_ctx *ctx, const struct xport *in_dev,\n-              struct xport *out_dev)\n+patch_port_output(struct xlate_ctx *ctx, const struct xport *in_dev,\n+                  struct xport *out_dev)\n {\n     struct flow *flow = &ctx->xin->flow;\n     struct flow old_flow = ctx->xin->flow;\n@@ -3760,7 +3761,7 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port,\n     }\n \n     if (xport->peer) {\n-       apply_nested_clone_actions(ctx, xport, xport->peer);\n+       patch_port_output(ctx, xport, xport->peer);\n        return;\n     }\n \n","prefixes":["ovs-dev","merge","native","tunneling","and","port","6/7"]}