get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 138577,
    "url": "http://patches.dpdk.org/api/patches/138577/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240320171120.255142-2-rjarry@redhat.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": "<20240320171120.255142-2-rjarry@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240320171120.255142-2-rjarry@redhat.com",
    "date": "2024-03-20T17:11:21",
    "name": "graph: enhance export to graphviz",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "ef6e1fc09b0151851a61e29c4271790de4cc89d5",
    "submitter": {
        "id": 2850,
        "url": "http://patches.dpdk.org/api/people/2850/?format=api",
        "name": "Robin Jarry",
        "email": "rjarry@redhat.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/20240320171120.255142-2-rjarry@redhat.com/mbox/",
    "series": [
        {
            "id": 31569,
            "url": "http://patches.dpdk.org/api/series/31569/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31569",
            "date": "2024-03-20T17:11:21",
            "name": "graph: enhance export to graphviz",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/31569/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/138577/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/138577/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 9068E43D06;\n\tWed, 20 Mar 2024 18:11:48 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2C5B041132;\n\tWed, 20 Mar 2024 18:11:48 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id 4938C40A6F\n for <dev@dpdk.org>; Wed, 20 Mar 2024 18:11:46 +0100 (CET)",
            "from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73])\n by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-575-RK8ftjZBPYeO3lzhdwo1qg-1; Wed,\n 20 Mar 2024 13:11:40 -0400",
            "from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com\n [10.11.54.10])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1BF683CBD506;\n Wed, 20 Mar 2024 17:11:39 +0000 (UTC)",
            "from localhost.localdomain (unknown [10.39.208.10])\n by smtp.corp.redhat.com (Postfix) with ESMTP id C9024492BD4;\n Wed, 20 Mar 2024 17:11:37 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1710954705;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=p5BPTBiD7ilIgN0mPN7zYtNmkQVWHz3wxlRdIVOSYrM=;\n b=XIyc5BU4h6BoMn3+uJHRpDrpU1WJn6oWhgXfng/Kr2QKB7eLoX/K8lAILfIMKaL3V6yomy\n Fjdc+MfxafuwZzhZ7fx9ZF1NF8j2HJiWgXi8A3OMtGT8K48q9C9xGt0vn4LZwnDU+tZ2mz\n WpIRu3RosUArN2AAG3LN1mfr/sbcWls=",
        "X-MC-Unique": "RK8ftjZBPYeO3lzhdwo1qg-1",
        "From": "Robin Jarry <rjarry@redhat.com>",
        "To": "dev@dpdk.org, Jerin Jacob <jerinj@marvell.com>,\n Kiran Kumar K <kirankumark@marvell.com>,\n Nithin Dabilpuram <ndabilpuram@marvell.com>,\n Zhirun Yan <yanzhirun_163@163.com>",
        "Subject": "[PATCH] graph: enhance export to graphviz",
        "Date": "Wed, 20 Mar 2024 18:11:21 +0100",
        "Message-ID": "<20240320171120.255142-2-rjarry@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.11.54.10",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "* Quote graph name to avoid parsing errors when it contains a dash.\n* Use fixed margin and smaller font for a more compact layout.\n* Use sans-serif font, the default is times new roman which is not the\n  best choice for a packet processing generated graph.\n* Force bold blue border and arrows for source nodes.\n* Force dark orange borders for sink nodes (nodes without next nodes).\n\nLink: https://f.jarry.cc/rte-graph-dot/before.svg\nLink: https://f.jarry.cc/rte-graph-dot/after.svg\nSigned-off-by: Robin Jarry <rjarry@redhat.com>\n---\n lib/graph/graph.c | 32 +++++++++++++++++++++++++-------\n 1 file changed, 25 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/lib/graph/graph.c b/lib/graph/graph.c\nindex 26f0968a978d..147bc6c685c5 100644\n--- a/lib/graph/graph.c\n+++ b/lib/graph/graph.c\n@@ -674,25 +674,43 @@ __rte_node_stream_alloc_size(struct rte_graph *graph, struct rte_node *node,\n static int\n graph_to_dot(FILE *f, struct graph *graph)\n {\n-\tconst char *src_edge_color = \" [color=blue]\\n\";\n-\tconst char *edge_color = \"\\n\";\n \tstruct graph_node *graph_node;\n \tchar *node_name;\n \trte_edge_t i;\n \tint rc;\n \n-\trc = fprintf(f, \"Digraph %s {\\n\\trankdir=LR;\\n\", graph->name);\n+\trc = fprintf(f, \"digraph \\\"%s\\\" {\\n\\trankdir=LR;\\n\", graph->name);\n+\tif (rc < 0)\n+\t\tgoto end;\n+\n+\trc = fprintf(f, \"\\tnode [margin=0.02 fontsize=11 fontname=sans];\\n\");\n \tif (rc < 0)\n \t\tgoto end;\n \n \tSTAILQ_FOREACH(graph_node, &graph->node_list, next) {\n+\t\tconst char *attrs = \"\";\n \t\tnode_name = graph_node->node->name;\n+\n+\t\trc = fprintf(f, \"\\t\\\"%s\\\"\", node_name);\n+\t\tif (rc < 0)\n+\t\t\tgoto end;\n+\t\tif (graph_node->node->flags & RTE_NODE_SOURCE_F) {\n+\t\t\tattrs = \" [color=blue style=bold]\";\n+\t\t\trc = fprintf(f, \"%s\", attrs);\n+\t\t\tif (rc < 0)\n+\t\t\t\tgoto end;\n+\t\t} else if (graph_node->node->nb_edges == 0) {\n+\t\t\trc = fprintf(f, \" [color=darkorange]\");\n+\t\t\tif (rc < 0)\n+\t\t\t\tgoto end;\n+\t\t}\n+\t\trc = fprintf(f, \";\\n\");\n+\t\tif (rc < 0)\n+\t\t\tgoto end;\n \t\tfor (i = 0; i < graph_node->node->nb_edges; i++) {\n-\t\t\trc = fprintf(f, \"\\t\\\"%s\\\"->\\\"%s\\\"%s\", node_name,\n+\t\t\trc = fprintf(f, \"\\t\\\"%s\\\" -> \\\"%s\\\"%s;\\n\", node_name,\n \t\t\t\t     graph_node->adjacency_list[i]->node->name,\n-\t\t\t\t     graph_node->node->flags & RTE_NODE_SOURCE_F\n-\t\t\t\t\t     ? src_edge_color\n-\t\t\t\t\t     : edge_color);\n+\t\t\t\t     attrs);\n \t\t\tif (rc < 0)\n \t\t\t\tgoto end;\n \t\t}\n",
    "prefixes": []
}