Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/68201/?format=api
https://patches.dpdk.org/api/patches/68201/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200411141428.1987768-11-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": "<20200411141428.1987768-11-jerinj@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200411141428.1987768-11-jerinj@marvell.com", "date": "2020-04-11T14:14:09", "name": "[v5,10/29] graph: implement debug routines", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "b5184ba99b40b6646cca362e7c495c0fc424b706", "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/20200411141428.1987768-11-jerinj@marvell.com/mbox/", "series": [ { "id": 9314, "url": "https://patches.dpdk.org/api/series/9314/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=9314", "date": "2020-04-11T14:13:59", "name": "graph: introduce graph subsystem", "version": 5, "mbox": "https://patches.dpdk.org/series/9314/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/68201/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/68201/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 D0B31A059F;\n\tSat, 11 Apr 2020 16:16:38 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 253771C235;\n\tSat, 11 Apr 2020 16:15:20 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id CBECF1C22E\n for <dev@dpdk.org>; Sat, 11 Apr 2020 16:15:16 +0200 (CEST)", "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 03BEEuit023864; Sat, 11 Apr 2020 07:15:15 -0700", "from sc-exch02.marvell.com ([199.233.58.182])\n by mx0b-0016f401.pphosted.com with ESMTP id 30bddkgarb-8\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Sat, 11 Apr 2020 07:15:15 -0700", "from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH02.marvell.com\n (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Sat, 11 Apr 2020 07:15:04 -0700", "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Sat, 11 Apr 2020 07:15:04 -0700", "from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14])\n by maili.marvell.com (Postfix) with ESMTP id D501E3F704A;\n Sat, 11 Apr 2020 07:15:00 -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=4STxmt1TYDeg+fc/QL7pUVseHlKyIIlMiheeowZ54Ak=;\n b=FOQ5IWR5CMXJMuKEKcTEhlZdpLCzL6HyNpxPKco/mFNr4VQTDcVSdLHuG1mh13qVrx7n\n 5w31HhYfGZLn5Gy106I7JF0AHwwn3Gwrt/7WVDlfhpD6CdCL1OgqdhAPp4pqHJdgnq/v\n 3PULjLHEFTqF99PZ4ZbLsk4Lg+iLlreN84fj0pDwhVn9n7ocbQtYn/KIYCBE6nIiIhf0\n f8nvRCe6yLfbZb1Ukwxnsi7bQLyRc+DdRbFMk5qe82/152MomF7WS6cPpQYd3mCVQRfC\n NfN0gdMi9lUn3ZY0CCJPma2StNCPdhzEP5i7nlKmhO0EshSdQ9YzgRMrDvpya2PmdaTl Yw==", "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>,\n <xiao.w.wang@intel.com>, <amo@semihalf.com>", "Date": "Sat, 11 Apr 2020 19:44:09 +0530", "Message-ID": "<20200411141428.1987768-11-jerinj@marvell.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20200411141428.1987768-1-jerinj@marvell.com>", "References": "<20200405085613.1336841-1-jerinj@marvell.com>\n <20200411141428.1987768-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.676\n definitions=2020-04-11_04:2020-04-09,\n 2020-04-11 signatures=0", "Subject": "[dpdk-dev] [PATCH v5 10/29] graph: implement 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 implementation for graph specific API to dump the\nGraph information to a file. This API will dump detailed internal\ninfo about node objects and graph objects.\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>\nSigned-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>\n---\n lib/librte_graph/graph.c | 31 ++++++++++++++\n lib/librte_graph/graph_debug.c | 59 ++++++++++++++++++++++++++\n lib/librte_graph/graph_private.h | 13 ++++++\n lib/librte_graph/rte_graph_version.map | 2 +\n 4 files changed, 105 insertions(+)", "diff": "diff --git a/lib/librte_graph/graph.c b/lib/librte_graph/graph.c\nindex 61e212e03..e811a7b38 100644\n--- a/lib/librte_graph/graph.c\n+++ b/lib/librte_graph/graph.c\n@@ -525,6 +525,37 @@ rte_graph_export(const char *name, FILE *f)\n \treturn -rc;\n }\n \n+static void\n+graph_scan_dump(FILE *f, rte_graph_t id, bool all)\n+{\n+\tstruct graph *graph;\n+\n+\tRTE_VERIFY(f);\n+\tGRAPH_ID_CHECK(id);\n+\n+\tSTAILQ_FOREACH(graph, &graph_list, next) {\n+\t\tif (all == true) {\n+\t\t\tgraph_dump(f, graph);\n+\t\t} else if (graph->id == id) {\n+\t\t\tgraph_dump(f, graph);\n+\t\t\treturn;\n+\t\t}\n+\t}\n+fail:\n+\treturn;\n+}\n+\n+void\n+rte_graph_dump(FILE *f, rte_graph_t id)\n+{\n+\tgraph_scan_dump(f, id, false);\n+}\n+\n+void\n+rte_graph_list_dump(FILE *f)\n+{\n+\tgraph_scan_dump(f, 0, true);\n+}\n \n rte_graph_t\n rte_graph_max_count(void)\ndiff --git a/lib/librte_graph/graph_debug.c b/lib/librte_graph/graph_debug.c\nindex 75238e7ca..f8aea16ac 100644\n--- a/lib/librte_graph/graph_debug.c\n+++ b/lib/librte_graph/graph_debug.c\n@@ -7,6 +7,26 @@\n \n #include \"graph_private.h\"\n \n+void\n+graph_dump(FILE *f, struct graph *g)\n+{\n+\tstruct graph_node *graph_node;\n+\trte_edge_t i = 0;\n+\n+\tfprintf(f, \"graph <%s>\\n\", g->name);\n+\tfprintf(f, \" id=%\" PRIu32 \"\\n\", g->id);\n+\tfprintf(f, \" cir_start=%\" PRIu32 \"\\n\", g->cir_start);\n+\tfprintf(f, \" cir_mask=%\" PRIu32 \"\\n\", g->cir_mask);\n+\tfprintf(f, \" addr=%p\\n\", g);\n+\tfprintf(f, \" graph=%p\\n\", g->graph);\n+\tfprintf(f, \" mem_sz=%zu\\n\", g->mem_sz);\n+\tfprintf(f, \" node_count=%\" PRIu32 \"\\n\", g->node_count);\n+\tfprintf(f, \" src_node_count=%\" PRIu32 \"\\n\", g->src_node_count);\n+\n+\tSTAILQ_FOREACH(graph_node, &g->node_list, next)\n+\t\tfprintf(f, \" node[%d] <%s>\\n\", i++, graph_node->node->name);\n+}\n+\n void\n node_dump(FILE *f, struct node *n)\n {\n@@ -23,3 +43,42 @@ node_dump(FILE *f, struct node *n)\n \t\tfprintf(f, \" edge[%d] <%s>\\n\", i, n->next_nodes[i]);\n }\n \n+void\n+rte_graph_obj_dump(FILE *f, struct rte_graph *g, bool all)\n+{\n+\trte_node_t count;\n+\trte_graph_off_t off;\n+\tstruct rte_node *n;\n+\trte_edge_t i;\n+\n+\tfprintf(f, \"graph <%s> @ %p\\n\", g->name, g);\n+\tfprintf(f, \" id=%\" PRIu32 \"\\n\", g->id);\n+\tfprintf(f, \" head=%\" PRId32 \"\\n\", (int32_t)g->head);\n+\tfprintf(f, \" tail=%\" PRId32 \"\\n\", (int32_t)g->tail);\n+\tfprintf(f, \" cir_mask=0x%\" PRIx32 \"\\n\", g->cir_mask);\n+\tfprintf(f, \" nb_nodes=%\" PRId32 \"\\n\", g->nb_nodes);\n+\tfprintf(f, \" socket=%d\\n\", g->socket);\n+\tfprintf(f, \" fence=0x%\" PRIx64 \"\\n\", g->fence);\n+\tfprintf(f, \" nodes_start=0x%\" PRIx32 \"\\n\", g->nodes_start);\n+\tfprintf(f, \" cir_start=%p\\n\", g->cir_start);\n+\n+\trte_graph_foreach_node(count, off, g, n) {\n+\t\tif (!all && n->idx == 0)\n+\t\t\tcontinue;\n+\t\tfprintf(f, \" node[%d] <%s>\\n\", count, n->name);\n+\t\tfprintf(f, \" fence=0x%\" PRIx64 \"\\n\", n->fence);\n+\t\tfprintf(f, \" objs=%p\\n\", n->objs);\n+\t\tfprintf(f, \" process=%p\\n\", n->process);\n+\t\tfprintf(f, \" id=0x%\" PRIx32 \"\\n\", n->id);\n+\t\tfprintf(f, \" offset=0x%\" PRIx32 \"\\n\", n->off);\n+\t\tfprintf(f, \" nb_edges=%\" PRId32 \"\\n\", n->nb_edges);\n+\t\tfprintf(f, \" realloc_count=%d\\n\", n->realloc_count);\n+\t\tfprintf(f, \" size=%d\\n\", n->size);\n+\t\tfprintf(f, \" idx=%d\\n\", n->idx);\n+\t\tfprintf(f, \" total_objs=%\" PRId64 \"\\n\", n->total_objs);\n+\t\tfprintf(f, \" total_calls=%\" PRId64 \"\\n\", n->total_calls);\n+\t\tfor (i = 0; i < n->nb_edges; i++)\n+\t\t\tfprintf(f, \" edge[%d] <%s>\\n\", i,\n+\t\t\t\tn->nodes[i]->name);\n+\t}\n+}\ndiff --git a/lib/librte_graph/graph_private.h b/lib/librte_graph/graph_private.h\nindex 7fce52e00..f9a85c892 100644\n--- a/lib/librte_graph/graph_private.h\n+++ b/lib/librte_graph/graph_private.h\n@@ -319,6 +319,19 @@ struct rte_node *graph_node_id_to_ptr(const struct rte_graph *graph,\n struct rte_node *graph_node_name_to_ptr(const struct rte_graph *graph,\n \t\t\t\t\tconst char *node_name);\n \n+/* Debug functions */\n+/**\n+ * @internal\n+ *\n+ * Dump internal graph object data.\n+ *\n+ * @param f\n+ * FILE pointer to dump the data.\n+ * @param g\n+ * Pointer to the internal graph object.\n+ */\n+void graph_dump(FILE *f, struct graph *g);\n+\n /**\n * @internal\n *\ndiff --git a/lib/librte_graph/rte_graph_version.map b/lib/librte_graph/rte_graph_version.map\nindex 2797be044..851f4772e 100644\n--- a/lib/librte_graph/rte_graph_version.map\n+++ b/lib/librte_graph/rte_graph_version.map\n@@ -6,6 +6,7 @@ EXPERIMENTAL {\n \n \trte_graph_create;\n \trte_graph_destroy;\n+\trte_graph_dump;\n \trte_graph_export;\n \trte_graph_from_name;\n \trte_graph_id_to_name;\n@@ -14,6 +15,7 @@ EXPERIMENTAL {\n \trte_graph_max_count;\n \trte_graph_node_get;\n \trte_graph_node_get_by_name;\n+\trte_graph_obj_dump;\n \n \trte_node_clone;\n \trte_node_dump;\n", "prefixes": [ "v5", "10/29" ] }{ "id": 68201, "url": "