Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/813029/?format=api
{ "id": 813029, "url": "http://patchwork.ozlabs.org/api/patches/813029/?format=api", "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/1505245749-3402-3-git-send-email-azhou@ovn.org/", "project": { "id": 47, "url": "http://patchwork.ozlabs.org/api/projects/47/?format=api", "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-3-git-send-email-azhou@ovn.org>", "list_archive_url": null, "date": "2017-09-12T19:49:05", "name": "[ovs-dev,merge,native,tunneling,and,port,3/7] ofproto-dpif: Refactor compose_clone()", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "0e785b1f4434d443c6978ab8d1a79b2323b7c78f", "submitter": { "id": 67699, "url": "http://patchwork.ozlabs.org/api/people/67699/?format=api", "name": "Andy Zhou", "email": "azhou@ovn.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/1505245749-3402-3-git-send-email-azhou@ovn.org/mbox/", "series": [ { "id": 2760, "url": "http://patchwork.ozlabs.org/api/series/2760/?format=api", "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/813029/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/813029/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 3xsFm80tfdz9sNV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 05:51:20 +1000 (AEST)", "from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 2834AA73;\n\tTue, 12 Sep 2017 19:50:04 +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 69986A73\n\tfor <dev@openvswitch.org>; Tue, 12 Sep 2017 19:50:00 +0000 (UTC)", "from mail-pg0-f66.google.com (mail-pg0-f66.google.com\n\t[74.125.83.66])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 2F268159\n\tfor <dev@openvswitch.org>; Tue, 12 Sep 2017 19:50:00 +0000 (UTC)", "by mail-pg0-f66.google.com with SMTP id v5so6615892pgn.4\n\tfor <dev@openvswitch.org>; Tue, 12 Sep 2017 12:50:00 -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.49.58\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 12 Sep 2017 12:49:59 -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=h8tqtdRbdmFHuSecgdtXYGQ7ojJ1pzNjzBFVKhkt2mU=;\n\tb=DGlLP5uxed+upMHg31LqZkL8610IsQKwy6RjjAMyHkTSPJ2gSm8rHOSXUVwI3qPgQJ\n\tv1I3RdMqp+6GtkNDXUPP9bRUGREhucgu3/kamRYj/l24CF7zr2DQkt4Cwu4fdFFvAA++\n\thTv0NrqVmciuoExlOw7kuHpxhNGOxcREdiCUrScSUvvoYPQrI9LUmrb7uUouDLY7oc4k\n\tMku/EUY+q+blhA1Kna5fhsrMvX4YA1UDu1+WVDWIF5bDX8Wi//JrVPHULgjC40Ne+IZn\n\tYcmBypxl+wIe7uYZFf/cLjMp0nCdL9lrkMAOgYUE21NuD5X/o2lmMtat3Ae8Op5g5tPP\n\tGz6A==", "X-Gm-Message-State": "AHPjjUgpZDs3prihFSlpcMS0Umv+V2F/2S29YTaIzKKWN0G6OfO9Xa7T\n\tHnHXJOlGgabegrVR", "X-Google-Smtp-Source": "ADKCNb6zjGiI7Mv0XwagS34qTUP9oaLVwYGr/f4O67PKdIzsxbuFWrbUWttiTnnlHf9Pbf2aLQm/qA==", "X-Received": "by 10.101.93.5 with SMTP id e5mr15747904pgr.55.1505245799707;\n\tTue, 12 Sep 2017 12:49:59 -0700 (PDT)", "From": "Andy Zhou <azhou@ovn.org>", "To": "dev@openvswitch.org", "Date": "Tue, 12 Sep 2017 12:49:05 -0700", "Message-Id": "<1505245749-3402-3-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 3/7] ofproto-dpif:\n\tRefactor compose_clone()", "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": "Add a new function clone_xlate_actions(), which shares the same\nsignature as do_xlate_actions(); Later patch will make use\nof this function.\n\nSigned-off-by: Andy Zhou <azhou@ovn.org>\n---\n ofproto/ofproto-dpif-xlate.c | 20 ++++++++++++++------\n 1 file changed, 14 insertions(+), 6 deletions(-)", "diff": "diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c\nindex d5b47666e974..223313d4ecba 100644\n--- a/ofproto/ofproto-dpif-xlate.c\n+++ b/ofproto/ofproto-dpif-xlate.c\n@@ -5334,7 +5334,8 @@ reversible_actions(const struct ofpact *ofpacts, size_t ofpacts_len)\n }\n \n static void\n-compose_clone(struct xlate_ctx *ctx, const struct ofpact_nest *oc)\n+clone_xlate_actions(const struct ofpact *actions, size_t actions_len,\n+ struct xlate_ctx *ctx)\n {\n struct ofpbuf old_stack = ctx->stack;\n union mf_subvalue new_stack[1024 / sizeof(union mf_subvalue)];\n@@ -5347,12 +5348,11 @@ compose_clone(struct xlate_ctx *ctx, const struct ofpact_nest *oc)\n ofpbuf_put(&ctx->action_set, old_action_set.data, old_action_set.size);\n \n size_t offset, ac_offset;\n- size_t oc_actions_len = ofpact_nest_get_action_len(oc);\n struct flow old_flow = ctx->xin->flow;\n \n- if (reversible_actions(oc->actions, oc_actions_len)) {\n+ if (reversible_actions(actions, actions_len)) {\n old_flow = ctx->xin->flow;\n- do_xlate_actions(oc->actions, oc_actions_len, ctx);\n+ do_xlate_actions(actions, actions_len, ctx);\n if (ctx->freezing) {\n finish_freezing(ctx);\n }\n@@ -5373,7 +5373,7 @@ compose_clone(struct xlate_ctx *ctx, const struct ofpact_nest *oc)\n if (ctx->xbridge->support.clone) { /* Use clone action */\n /* Use clone action as datapath clone. */\n offset = nl_msg_start_nested(ctx->odp_actions, OVS_ACTION_ATTR_CLONE);\n- do_xlate_actions(oc->actions, oc_actions_len, ctx);\n+ do_xlate_actions(actions, actions_len, ctx);\n if (ctx->freezing) {\n finish_freezing(ctx);\n }\n@@ -5386,7 +5386,7 @@ compose_clone(struct xlate_ctx *ctx, const struct ofpact_nest *oc)\n offset = nl_msg_start_nested(ctx->odp_actions, OVS_ACTION_ATTR_SAMPLE);\n ac_offset = nl_msg_start_nested(ctx->odp_actions,\n OVS_SAMPLE_ATTR_ACTIONS);\n- do_xlate_actions(oc->actions, oc_actions_len, ctx);\n+ do_xlate_actions(actions, actions_len, ctx);\n if (ctx->freezing) {\n finish_freezing(ctx);\n }\n@@ -5425,6 +5425,14 @@ xlate_done:\n }\n \n static void\n+compose_clone(struct xlate_ctx *ctx, const struct ofpact_nest *oc)\n+{\n+ size_t oc_actions_len = ofpact_nest_get_action_len(oc);\n+\n+ clone_xlate_actions(oc->actions, oc_actions_len, ctx);\n+}\n+\n+static void\n xlate_meter_action(struct xlate_ctx *ctx, const struct ofpact_meter *meter)\n {\n if (meter->provider_meter_id != UINT32_MAX) {\n", "prefixes": [ "ovs-dev", "merge", "native", "tunneling", "and", "port", "3/7" ] }