Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/67216/?format=api
https://patches.dpdk.org/api/patches/67216/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200326165644.866053-5-jerinj@marvell.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20200326165644.866053-5-jerinj@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200326165644.866053-5-jerinj@marvell.com", "date": "2020-03-26T16:56:20", "name": "[v2,04/28] graph: implement node debug routines", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "5b6995a8476b41d52d0b328b36b484a7e309d700", "submitter": { "id": 1188, "url": "https://patches.dpdk.org/api/people/1188/?format=api", "name": "Jerin Jacob Kollanukkaran", "email": "jerinj@marvell.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200326165644.866053-5-jerinj@marvell.com/mbox/", "series": [ { "id": 9068, "url": "https://patches.dpdk.org/api/series/9068/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=9068", "date": "2020-03-26T16:56:16", "name": "graph: introduce graph subsystem", "version": 2, "mbox": "https://patches.dpdk.org/series/9068/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/67216/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/67216/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id DC4A9A057C;\n\tThu, 26 Mar 2020 17:57:19 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 844C31C08C;\n\tThu, 26 Mar 2020 17:56:47 +0100 (CET)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 08BC61C07D\n for <dev@dpdk.org>; Thu, 26 Mar 2020 17:56:45 +0100 (CET)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n 02QGj7pK002884; Thu, 26 Mar 2020 09:56:44 -0700", "from sc-exch01.marvell.com ([199.233.58.181])\n by mx0b-0016f401.pphosted.com with ESMTP id 300bpcvu2c-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 26 Mar 2020 09:56:44 -0700", "from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com\n (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 26 Mar\n 2020 09:56:42 -0700", "from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com\n (10.93.176.83) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Thu, 26 Mar 2020 09:56:42 -0700", "from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14])\n by maili.marvell.com (Postfix) with ESMTP id EA2753F7040;\n Thu, 26 Mar 2020 09:56:39 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0818;\n bh=Y1+qTGVCiCscd2KEYUI2pWFOW3bNPKD1+GImbkk9BOI=;\n b=WqGjOdnxjE7hFb5qy+Bp1b9raoxyi2KX8kE7T16XRD5tjK+Twhu+5PcnzsPlmWq7onoI\n flHMhQ+GEeneexuTk1ZHKrrsYo0KckX22GLrlzGULVzykcngEX/2Ywr93RBcqVQgChmE\n o+zmjePXPgmahIuIO1fBDwqDiDvjY9pGBc38W1eSlegY9DNbigjK5wjnJkbfFEvNQkvR\n nbAetVeLDzLN69omkuLG9Or3QM1N5CZ4SYzd8WoA/04LGDWCY3SJduICm9zKIR4626lv\n /K4Fnh4f587F03JClmgUtftMMmCKHNXpQ0f4dybHMMrJQ2nvH64Bq5Z3lsuuldq6Vrq6 3w==", "From": "<jerinj@marvell.com>", "To": "Jerin Jacob <jerinj@marvell.com>, Kiran Kumar K <kirankumark@marvell.com>", "CC": "<dev@dpdk.org>, <thomas@monjalon.net>, <david.marchand@redhat.com>,\n <mdr@ashroe.eu>, <mattias.ronnblom@ericsson.com>,\n <pbhagavatula@marvell.com>, <ndabilpuram@marvell.com>", "Date": "Thu, 26 Mar 2020 22:26:20 +0530", "Message-ID": "<20200326165644.866053-5-jerinj@marvell.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20200326165644.866053-1-jerinj@marvell.com>", "References": "<20200318213551.3489504-1-jerinj@marvell.com>\n <20200326165644.866053-1-jerinj@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.138, 18.0.645\n definitions=2020-03-26_08:2020-03-26,\n 2020-03-26 signatures=0", "Subject": "[dpdk-dev] [PATCH v2 04/28] graph: implement node debug routines", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Jerin Jacob <jerinj@marvell.com>\n\nAdding node debug API implementation support to dump\nsingle or all the node objects to the given file.\n\nSigned-off-by: Jerin Jacob <jerinj@marvell.com>\nSigned-off-by: Kiran Kumar K <kirankumark@marvell.com>\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\n lib/librte_graph/Makefile | 1 +\n lib/librte_graph/graph_debug.c | 25 ++++++++++++++++++++\n lib/librte_graph/graph_private.h | 12 ++++++++++\n lib/librte_graph/meson.build | 2 +-\n lib/librte_graph/node.c | 32 ++++++++++++++++++++++++++\n lib/librte_graph/rte_graph_version.map | 1 +\n 6 files changed, 72 insertions(+), 1 deletion(-)\n create mode 100644 lib/librte_graph/graph_debug.c", "diff": "diff --git a/lib/librte_graph/Makefile b/lib/librte_graph/Makefile\nindex 933d0ee49..2a6d86933 100644\n--- a/lib/librte_graph/Makefile\n+++ b/lib/librte_graph/Makefile\n@@ -16,6 +16,7 @@ EXPORT_MAP := rte_graph_version.map\n # all source are stored in SRCS-y\n SRCS-$(CONFIG_RTE_LIBRTE_GRAPH) += node.c\n SRCS-$(CONFIG_RTE_LIBRTE_GRAPH) += graph.c\n+SRCS-$(CONFIG_RTE_LIBRTE_GRAPH) += graph_debug.c\n \n # install header files\n SYMLINK-$(CONFIG_RTE_LIBRTE_GRAPH)-include += rte_graph.h\ndiff --git a/lib/librte_graph/graph_debug.c b/lib/librte_graph/graph_debug.c\nnew file mode 100644\nindex 000000000..75238e7ca\n--- /dev/null\n+++ b/lib/librte_graph/graph_debug.c\n@@ -0,0 +1,25 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2020 Marvell International Ltd.\n+ */\n+\n+#include <rte_common.h>\n+#include <rte_debug.h>\n+\n+#include \"graph_private.h\"\n+\n+void\n+node_dump(FILE *f, struct node *n)\n+{\n+\trte_edge_t i;\n+\n+\tfprintf(f, \"node <%s>\\n\", n->name);\n+\tfprintf(f, \" id=%\" PRIu32 \"\\n\", n->id);\n+\tfprintf(f, \" flags=0x%\" PRIx64 \"\\n\", n->flags);\n+\tfprintf(f, \" addr=%p\\n\", n);\n+\tfprintf(f, \" process=%p\\n\", n->process);\n+\tfprintf(f, \" nb_edges=%d\\n\", n->nb_edges);\n+\n+\tfor (i = 0; i < n->nb_edges; i++)\n+\t\tfprintf(f, \" edge[%d] <%s>\\n\", i, n->next_nodes[i]);\n+}\n+\ndiff --git a/lib/librte_graph/graph_private.h b/lib/librte_graph/graph_private.h\nindex 7ed6d01b6..6db04cee7 100644\n--- a/lib/librte_graph/graph_private.h\n+++ b/lib/librte_graph/graph_private.h\n@@ -82,4 +82,16 @@ void graph_spinlock_lock(void);\n */\n void graph_spinlock_unlock(void);\n \n+/**\n+ * @internal\n+ *\n+ * Dump internal node object data.\n+ *\n+ * @param f\n+ * FILE pointer to dump the info.\n+ * @param g\n+ * Pointer to the internal node object.\n+ */\n+void node_dump(FILE *f, struct node *n);\n+\n #endif /* _RTE_GRAPH_PRIVATE_H_ */\ndiff --git a/lib/librte_graph/meson.build b/lib/librte_graph/meson.build\nindex 5754ac23b..01512182f 100644\n--- a/lib/librte_graph/meson.build\n+++ b/lib/librte_graph/meson.build\n@@ -4,7 +4,7 @@\n \n name = 'graph'\n \n-sources = files('node.c', 'graph.c')\n+sources = files('node.c', 'graph.c', 'graph_debug.c')\n headers = files('rte_graph.h')\n allow_experimental_apis = true\n \ndiff --git a/lib/librte_graph/node.c b/lib/librte_graph/node.c\nindex 8de857889..2f9c2ea4c 100644\n--- a/lib/librte_graph/node.c\n+++ b/lib/librte_graph/node.c\n@@ -377,6 +377,38 @@ rte_node_edge_get(rte_node_t id, char *next_nodes[])\n \treturn rc;\n }\n \n+static void\n+node_scan_dump(FILE *f, rte_node_t id, bool all)\n+{\n+\tstruct node *node;\n+\n+\tRTE_ASSERT(f != NULL);\n+\tNODE_ID_CHECK(id);\n+\n+\tSTAILQ_FOREACH(node, &node_list, next) {\n+\t\tif (all == true) {\n+\t\t\tnode_dump(f, node);\n+\t\t} else if (node->id == id) {\n+\t\t\tnode_dump(f, node);\n+\t\t\treturn;\n+\t\t}\n+\t}\n+fail:\n+\treturn;\n+}\n+\n+void\n+rte_node_dump(FILE *f, rte_node_t id)\n+{\n+\tnode_scan_dump(f, id, false);\n+}\n+\n+void\n+rte_node_list_dump(FILE *f)\n+{\n+\tnode_scan_dump(f, 0, true);\n+}\n+\n rte_node_t\n rte_node_max_count(void)\n {\ndiff --git a/lib/librte_graph/rte_graph_version.map b/lib/librte_graph/rte_graph_version.map\nindex 412386356..f2c2139c5 100644\n--- a/lib/librte_graph/rte_graph_version.map\n+++ b/lib/librte_graph/rte_graph_version.map\n@@ -4,6 +4,7 @@ EXPERIMENTAL {\n \t__rte_node_register;\n \n \trte_node_clone;\n+\trte_node_dump;\n \trte_node_edge_count;\n \trte_node_edge_get;\n \trte_node_edge_shrink;\n", "prefixes": [ "v2", "04/28" ] }{ "id": 67216, "url": "