get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/67832/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 67832,
    "url": "http://patches.dpdk.org/api/patches/67832/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200405085613.1336841-11-jerinj@marvell.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20200405085613.1336841-11-jerinj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200405085613.1336841-11-jerinj@marvell.com",
    "date": "2020-04-05T08:55:54",
    "name": "[v4,10/29] graph: implement debug routines",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ad766298f18b508b32bdcc85229c7b3e4ffd1fcf",
    "submitter": {
        "id": 1188,
        "url": "http://patches.dpdk.org/api/people/1188/?format=api",
        "name": "Jerin Jacob Kollanukkaran",
        "email": "jerinj@marvell.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200405085613.1336841-11-jerinj@marvell.com/mbox/",
    "series": [
        {
            "id": 9203,
            "url": "http://patches.dpdk.org/api/series/9203/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=9203",
            "date": "2020-04-05T08:55:44",
            "name": "graph: introduce graph subsystem",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/9203/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/67832/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/67832/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 16EC4A0577;\n\tSun,  5 Apr 2020 10:58:23 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9AE321C027;\n\tSun,  5 Apr 2020 10:56:50 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id A4A542B83\n for <dev@dpdk.org>; Sun,  5 Apr 2020 10:56:48 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n 0358uTei029756; Sun, 5 Apr 2020 01:56:46 -0700",
            "from sc-exch03.marvell.com ([199.233.58.183])\n by mx0a-0016f401.pphosted.com with ESMTP id 306qkqtmqn-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Sun, 05 Apr 2020 01:56:46 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH03.marvell.com\n (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Sun, 5 Apr 2020 01:56:45 -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; Sun, 5 Apr 2020 01:56:45 -0700",
            "from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14])\n by maili.marvell.com (Postfix) with ESMTP id 796DF3F703F;\n Sun,  5 Apr 2020 01:56:42 -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=9iPEMZ0gD7R1iI5szCcy4loSTM+k615dYEk8h7iP8Y8=;\n b=ereAQcfgAip9xQBewEnSOmkm16BtsQx0KBaKzdHgWiW8aj3qgN63EvPBXCYzuBH2DJpI\n 0/pVYbODRCnvYdFGsitT1VDgNY/4MntTkMlRBsfm2mpJY00EvTkvsuv30BkQBlBOYmat\n YZ+aTCXoKe1ZaixDXkXCSorQM8xQeJOUx1MoqQRc3+KfV/LcdpnzxzvGQ+wU3t9gZJcI\n j4d5EvWDMmGRE5FgcdtpDLI598G8MOO6yGhgoavUGXfekyMx6LExeMzvvDPNDiCGcmj3\n ktOuHD53nrOLp+O2g5qE4sIIzNjmy80qv6kgt6VcjHGJ6YEHLPR1xmRIrVRJq3NbZMyG Ww==",
        "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>",
        "Date": "Sun, 5 Apr 2020 14:25:54 +0530",
        "Message-ID": "<20200405085613.1336841-11-jerinj@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20200405085613.1336841-1-jerinj@marvell.com>",
        "References": "<20200331192945.2466880-1-jerinj@marvell.com>\n <20200405085613.1336841-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-05_01:2020-04-03,\n 2020-04-05 signatures=0",
        "Subject": "[dpdk-dev]  [PATCH v4 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 e0c0b71a7..e96363777 100644\n--- a/lib/librte_graph/graph.c\n+++ b/lib/librte_graph/graph.c\n@@ -527,6 +527,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": [
        "v4",
        "10/29"
    ]
}