Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1306575/?format=api
{ "id": 1306575, "url": "http://patchwork.ozlabs.org/api/patches/1306575/?format=api", "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/20200610061811.1966230-1-numans@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": "<20200610061811.1966230-1-numans@ovn.org>", "list_archive_url": null, "date": "2020-06-10T06:18:11", "name": "[ovs-dev,ovn,v11,1/6] I-P engine: Provide the option for an engine to clear tracked engine data in every run.", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "1ef508f3eca799f76cff36659d3ab4e9e96119f3", "submitter": { "id": 77669, "url": "http://patchwork.ozlabs.org/api/people/77669/?format=api", "name": "Numan Siddique", "email": "numans@ovn.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/20200610061811.1966230-1-numans@ovn.org/mbox/", "series": [ { "id": 182423, "url": "http://patchwork.ozlabs.org/api/series/182423/?format=api", "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=182423", "date": "2020-06-10T06:17:26", "name": "Incremental processing improvements.", "version": 11, "mbox": "http://patchwork.ozlabs.org/series/182423/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1306575/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1306575/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@lists.linuxfoundation.org" ], "Authentication-Results": [ "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=140.211.166.136; helo=silver.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>)", "ozlabs.org;\n dmarc=none (p=none dis=none) header.from=ovn.org" ], "Received": [ "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 49hcHp2h6nz9sRh\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 10 Jun 2020 16:18:29 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id C6C7924804;\n\tWed, 10 Jun 2020 06:18:26 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id xMrVnCeTz1hP; Wed, 10 Jun 2020 06:18:25 +0000 (UTC)", "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby silver.osuosl.org (Postfix) with ESMTP id 10395234AC;\n\tWed, 10 Jun 2020 06:18:25 +0000 (UTC)", "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id E6420C0893;\n\tWed, 10 Jun 2020 06:18:24 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 1E74DC016F\n for <dev@openvswitch.org>; Wed, 10 Jun 2020 06:18:24 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by hemlock.osuosl.org (Postfix) with ESMTP id 0E18588934\n for <dev@openvswitch.org>; Wed, 10 Jun 2020 06:18:24 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id ohnN6AiNXfFX for <dev@openvswitch.org>;\n Wed, 10 Jun 2020 06:18:22 +0000 (UTC)", "from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n [217.70.183.194])\n by hemlock.osuosl.org (Postfix) with ESMTPS id 0350D88713\n for <dev@openvswitch.org>; Wed, 10 Jun 2020 06:18:21 +0000 (UTC)", "from nusiddiq.home.org.com (unknown [115.99.171.40])\n (Authenticated sender: numans@ovn.org)\n by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id B85CD40006;\n Wed, 10 Jun 2020 06:18:17 +0000 (UTC)" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Originating-IP": "115.99.171.40", "From": "numans@ovn.org", "To": "dev@openvswitch.org", "Date": "Wed, 10 Jun 2020 11:48:11 +0530", "Message-Id": "<20200610061811.1966230-1-numans@ovn.org>", "X-Mailer": "git-send-email 2.26.2", "In-Reply-To": "<20200610061726.1937231-1-numans@ovn.org>", "References": "<20200610061726.1937231-1-numans@ovn.org>", "MIME-Version": "1.0", "Subject": "[ovs-dev] [PATCH ovn v11 1/6] I-P engine: Provide the option for an\n\tengine to clear tracked engine data in every run.", "X-BeenThere": "ovs-dev@openvswitch.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "<ovs-dev.openvswitch.org>", "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <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 <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "ovs-dev-bounces@openvswitch.org", "Sender": "\"dev\" <ovs-dev-bounces@openvswitch.org>" }, "content": "From: Numan Siddique <numans@ovn.org>\n\nA new function is added in the engine node called - clear_tracked_data() to\nclear any engine data which was tracked during the engine run. This tracked data\nhas to be part of the engine 'data'. engine_init_run() calls clear_tracked_data()\nand each engine node interested in tracking the data needs to implement the\nen_<ENGINE_NODE_NAME>clear_tracked_data() function.\n\nWith this patch, an engine node can store any changes done to the engine data\nseparately in the engine change handlers. The parent of this engine node\ncan use this tracked data for incrementally processing the changes. Upcoming\npatches in the series will make use of this.\n\nAcked-by: Dumitru Ceara <dceara@redhat.com>\nSigned-off-by: Numan Siddique <numans@ovn.org>\n---\n lib/inc-proc-eng.c | 8 ++++++++\n lib/inc-proc-eng.h | 9 +++++++++\n 2 files changed, 17 insertions(+)", "diff": "diff --git a/lib/inc-proc-eng.c b/lib/inc-proc-eng.c\nindex 9b1479a1c..8b56cbaec 100644\n--- a/lib/inc-proc-eng.c\n+++ b/lib/inc-proc-eng.c\n@@ -121,6 +121,10 @@ void\n engine_cleanup(void)\n {\n for (size_t i = 0; i < engine_n_nodes; i++) {\n+ if (engine_nodes[i]->clear_tracked_data) {\n+ engine_nodes[i]->clear_tracked_data(engine_nodes[i]->data);\n+ }\n+\n if (engine_nodes[i]->cleanup) {\n engine_nodes[i]->cleanup(engine_nodes[i]->data);\n }\n@@ -260,6 +264,10 @@ engine_init_run(void)\n VLOG_DBG(\"Initializing new run\");\n for (size_t i = 0; i < engine_n_nodes; i++) {\n engine_set_node_state(engine_nodes[i], EN_STALE);\n+\n+ if (engine_nodes[i]->clear_tracked_data) {\n+ engine_nodes[i]->clear_tracked_data(engine_nodes[i]->data);\n+ }\n }\n }\n \ndiff --git a/lib/inc-proc-eng.h b/lib/inc-proc-eng.h\nindex 8606a360b..e25bcb29c 100644\n--- a/lib/inc-proc-eng.h\n+++ b/lib/inc-proc-eng.h\n@@ -149,6 +149,10 @@ struct engine_node {\n * doesn't store pointers to DB records it's still safe to use).\n */\n bool (*is_valid)(struct engine_node *);\n+\n+ /* Method to clear up tracked data maintained by the engine node in the\n+ * engine 'data'. It may be NULL. */\n+ void (*clear_tracked_data)(void *tracked_data);\n };\n \n /* Initialize the data for the engine nodes. It calls each node's\n@@ -282,6 +286,7 @@ void engine_ovsdb_node_add_index(struct engine_node *, const char *name,\n .run = en_##NAME##_run, \\\n .cleanup = en_##NAME##_cleanup, \\\n .is_valid = en_##NAME##_is_valid, \\\n+ .clear_tracked_data = NULL, \\\n };\n \n #define ENGINE_NODE_CUSTOM_DATA(NAME, NAME_STR) \\\n@@ -291,6 +296,10 @@ void engine_ovsdb_node_add_index(struct engine_node *, const char *name,\n static bool (*en_##NAME##_is_valid)(struct engine_node *node) = NULL; \\\n ENGINE_NODE_DEF(NAME, NAME_STR)\n \n+#define ENGINE_NODE_WITH_CLEAR_TRACK_DATA(NAME, NAME_STR) \\\n+ ENGINE_NODE(NAME, NAME_STR) \\\n+ en_##NAME.clear_tracked_data = en_##NAME##_clear_tracked_data;\n+\n /* Macro to define member functions of an engine node which represents\n * a table of OVSDB */\n #define ENGINE_FUNC_OVSDB(DB_NAME, TBL_NAME) \\\n", "prefixes": [ "ovs-dev", "ovn", "v11", "1/6" ] }