get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 68198,
    "url": "https://patches.dpdk.org/api/patches/68198/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200411141428.1987768-9-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-9-jerinj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200411141428.1987768-9-jerinj@marvell.com",
    "date": "2020-04-11T14:14:07",
    "name": "[v5,08/29] graph: implement graph operation APIs",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e9dec7c71b7ba116b0427e1818010d4d9bb0f8d0",
    "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-9-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/68198/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/68198/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 B4BE0A059F;\n\tSat, 11 Apr 2020 16:16:03 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B09C51C216;\n\tSat, 11 Apr 2020 16:15:01 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 707861C205\n for <dev@dpdk.org>; Sat, 11 Apr 2020 16:14:59 +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 03BEEwiS023905; Sat, 11 Apr 2020 07:14:58 -0700",
            "from sc-exch03.marvell.com ([199.233.58.183])\n by mx0b-0016f401.pphosted.com with ESMTP id 30bddkgas0-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Sat, 11 Apr 2020 07:14:58 -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 Sat, 11 Apr 2020 07:14:54 -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:14:55 -0700",
            "from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14])\n by maili.marvell.com (Postfix) with ESMTP id DA88A3F7040;\n Sat, 11 Apr 2020 07:14:51 -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=dHC9Lu7nadPCZpPeSLhbdaDwfBVIOowd6WQMhtirze0=;\n b=sxBGZzcw0/QBv/unN44hi92/z8GSN4/ibDt+D07UHZAlhgQJ47SnZobDuUkgBNq+mFQC\n ajRzDFLbvhin/vxkN/4dJOs0reTVi6vlpJ1zm8Hekum5DOsExiJKuu+qKpthPnH4VM96\n wI/0XPh9U+NS1GcllomL86cX4W0CJlFZFDH8rG57DqH86IT7GFPIlDePt9EArEa0FsdJ\n nnvBV0HyYkfI9wlmXUhT18kraIzQVn3KAH6H7aoDmOGAnz6Ul66dHXMsfLQHgpt4AF/3\n olDb895/jymywL59FRJIf3ZAuy4GtVicGDmh3rdMvrI9ajqOS/EhEwVT04gu+NvYuc87 8Q==",
        "From": "<jerinj@marvell.com>",
        "To": "Jerin Jacob <jerinj@marvell.com>, Kiran Kumar K <kirankumark@marvell.com>,\n Anatoly Burakov <anatoly.burakov@intel.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:07 +0530",
        "Message-ID": "<20200411141428.1987768-9-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 08/29] graph: implement graph operation APIs",
        "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 support for graph specific API implementation like\nGraph lookup to get graph object, retrieving graph ID\nFrom name and graph name from ID.\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               | 131 +++++++++++++++++++++++++\n lib/librte_graph/rte_graph_version.map |   8 ++\n 2 files changed, 139 insertions(+)",
    "diff": "diff --git a/lib/librte_graph/graph.c b/lib/librte_graph/graph.c\nindex f4e02fdfc..7a77cb5c8 100644\n--- a/lib/librte_graph/graph.c\n+++ b/lib/librte_graph/graph.c\n@@ -210,6 +210,54 @@ graph_node_fini(struct graph *graph)\n \t\t\t\t\t\t       graph_node->node->name));\n }\n \n+static struct rte_graph *\n+graph_mem_fixup_node_ctx(struct rte_graph *graph)\n+{\n+\tstruct rte_node *node;\n+\tstruct node *node_db;\n+\trte_graph_off_t off;\n+\trte_node_t count;\n+\tconst char *name;\n+\n+\trte_graph_foreach_node(count, off, graph, node) {\n+\t\tif (node->parent_id == RTE_NODE_ID_INVALID) /* Static node */\n+\t\t\tname = node->name;\n+\t\telse /* Cloned node */\n+\t\t\tname = node->parent;\n+\n+\t\tnode_db = node_from_name(name);\n+\t\tif (node_db == NULL)\n+\t\t\tSET_ERR_JMP(ENOLINK, fail, \"Node %s not found\", name);\n+\t\tnode->process = node_db->process;\n+\t}\n+\n+\treturn graph;\n+fail:\n+\treturn NULL;\n+}\n+\n+static struct rte_graph *\n+graph_mem_fixup_secondary(struct rte_graph *graph)\n+{\n+\tif (graph == NULL || rte_eal_process_type() == RTE_PROC_PRIMARY)\n+\t\treturn graph;\n+\n+\treturn graph_mem_fixup_node_ctx(graph);\n+}\n+\n+struct rte_graph *\n+rte_graph_lookup(const char *name)\n+{\n+\tconst struct rte_memzone *mz;\n+\tstruct rte_graph *rc = NULL;\n+\n+\tmz = rte_memzone_lookup(name);\n+\tif (mz)\n+\t\trc = mz->addr;\n+\n+\treturn graph_mem_fixup_secondary(rc);\n+}\n+\n rte_graph_t\n rte_graph_create(const char *name, struct rte_graph_param *prm)\n {\n@@ -340,6 +388,76 @@ rte_graph_destroy(rte_graph_t id)\n \treturn rc;\n }\n \n+rte_graph_t\n+rte_graph_from_name(const char *name)\n+{\n+\tstruct graph *graph;\n+\n+\tSTAILQ_FOREACH(graph, &graph_list, next)\n+\t\tif (strncmp(graph->name, name, RTE_GRAPH_NAMESIZE) == 0)\n+\t\t\treturn graph->id;\n+\n+\treturn RTE_GRAPH_ID_INVALID;\n+}\n+\n+char *\n+rte_graph_id_to_name(rte_graph_t id)\n+{\n+\tstruct graph *graph;\n+\n+\tGRAPH_ID_CHECK(id);\n+\tSTAILQ_FOREACH(graph, &graph_list, next)\n+\t\tif (graph->id == id)\n+\t\t\treturn graph->name;\n+\n+fail:\n+\treturn NULL;\n+}\n+\n+struct rte_node *\n+rte_graph_node_get(rte_graph_t gid, uint32_t nid)\n+{\n+\tstruct rte_node *node;\n+\tstruct graph *graph;\n+\trte_graph_off_t off;\n+\trte_node_t count;\n+\n+\tGRAPH_ID_CHECK(gid);\n+\tSTAILQ_FOREACH(graph, &graph_list, next)\n+\t\tif (graph->id == gid) {\n+\t\t\trte_graph_foreach_node(count, off, graph->graph,\n+\t\t\t\t\t\tnode) {\n+\t\t\t\tif (node->id == nid)\n+\t\t\t\t\treturn node;\n+\t\t\t}\n+\t\t\tbreak;\n+\t\t}\n+fail:\n+\treturn NULL;\n+}\n+\n+struct rte_node *\n+rte_graph_node_get_by_name(const char *graph_name, const char *node_name)\n+{\n+\tstruct rte_node *node;\n+\tstruct graph *graph;\n+\trte_graph_off_t off;\n+\trte_node_t count;\n+\n+\tSTAILQ_FOREACH(graph, &graph_list, next)\n+\t\tif (!strncmp(graph->name, graph_name, RTE_GRAPH_NAMESIZE)) {\n+\t\t\trte_graph_foreach_node(count, off, graph->graph,\n+\t\t\t\t\t\tnode) {\n+\t\t\t\tif (!strncmp(node->name, node_name,\n+\t\t\t\t\t     RTE_NODE_NAMESIZE))\n+\t\t\t\t\treturn node;\n+\t\t\t}\n+\t\t\tbreak;\n+\t\t}\n+\n+\treturn NULL;\n+}\n+\n void __rte_noinline\n __rte_node_stream_alloc(struct rte_graph *graph, struct rte_node *node)\n {\n@@ -354,3 +472,16 @@ __rte_node_stream_alloc(struct rte_graph *graph, struct rte_node *node)\n \tnode->size = size;\n \tnode->realloc_count++;\n }\n+\n+rte_graph_t\n+rte_graph_max_count(void)\n+{\n+\treturn graph_id;\n+}\n+\n+RTE_INIT(rte_graph_init_log)\n+{\n+\trte_graph_logtype = rte_log_register(\"lib.graph\");\n+\tif (rte_graph_logtype >= 0)\n+\t\trte_log_set_level(rte_graph_logtype, RTE_LOG_INFO);\n+}\ndiff --git a/lib/librte_graph/rte_graph_version.map b/lib/librte_graph/rte_graph_version.map\nindex dcbd78c02..5a2b13293 100644\n--- a/lib/librte_graph/rte_graph_version.map\n+++ b/lib/librte_graph/rte_graph_version.map\n@@ -6,6 +6,14 @@ EXPERIMENTAL {\n \n \trte_graph_create;\n \trte_graph_destroy;\n+\trte_graph_from_name;\n+\trte_graph_id_to_name;\n+\trte_graph_lookup;\n+\trte_graph_list_dump;\n+\trte_graph_max_count;\n+\trte_graph_node_get;\n+\trte_graph_node_get_by_name;\n+\n \trte_node_clone;\n \trte_node_dump;\n \trte_node_edge_count;\n",
    "prefixes": [
        "v5",
        "08/29"
    ]
}