get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 128488,
    "url": "http://patches.dpdk.org/api/patches/128488/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230609191245.252521-8-zhirun.yan@intel.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": "<20230609191245.252521-8-zhirun.yan@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230609191245.252521-8-zhirun.yan@intel.com",
    "date": "2023-06-09T19:12:36",
    "name": "[v12,07/16] graph: move node clone name func into private as common",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1c52a013aa4c5be5839fcfa5e4479b7c0dac9838",
    "submitter": {
        "id": 1154,
        "url": "http://patches.dpdk.org/api/people/1154/?format=api",
        "name": "Yan, Zhirun",
        "email": "zhirun.yan@intel.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/20230609191245.252521-8-zhirun.yan@intel.com/mbox/",
    "series": [
        {
            "id": 28444,
            "url": "http://patches.dpdk.org/api/series/28444/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=28444",
            "date": "2023-06-09T19:12:29",
            "name": "graph enhancement for multi-core dispatch",
            "version": 12,
            "mbox": "http://patches.dpdk.org/series/28444/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/128488/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/128488/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 C29DD42C71;\n\tFri,  9 Jun 2023 21:20:44 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A8B2742D4E;\n\tFri,  9 Jun 2023 21:20:11 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id DE5C042D4B\n for <dev@dpdk.org>; Fri,  9 Jun 2023 21:20:09 +0200 (CEST)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 09 Jun 2023 12:20:09 -0700",
            "from dpdk-zhirun-lmm.sh.intel.com ([10.67.119.94])\n by fmsmga006.fm.intel.com with ESMTP; 09 Jun 2023 12:20:06 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1686338409; x=1717874409;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=ScSpOVMjpO+88DyUFzdGE1NUCj47I2Su3wngTqH4gb0=;\n b=ZrhV3PqSC0S5OUi2iKnyY3RUgwcZ5FW3f8hR26IyQi8wVjSAJ4Eumfmm\n lxGQd1oAOLj43Q8OodcGTns7OmlsC2sg/RT+V4p7Vo1yjdM9wjCFYkTrC\n MviPBtBZFi4XHA0iN62z4rCTMoiz/oZ2jf4AGgeEg6gcuKsiq+b5EvTJb\n pLz+BzPctbCOflSeySBIGd9KiF1iw4BpFN2VThu2Tng+BSm9uTTD9XXdH\n /ZndHNnRx8rYNtac0wXCPKR29w+gPXSAOhmCAf+GezLEfpck1/Ievxpbx\n qhEpZUXq9jOAwqPhw1iZq0rL4WbjwVVD222M1sPMA/EjoaB8kE/0nqeJS Q==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10736\"; a=\"360155026\"",
            "E=Sophos;i=\"6.00,230,1681196400\"; d=\"scan'208\";a=\"360155026\"",
            "E=McAfee;i=\"6600,9927,10736\"; a=\"957254663\"",
            "E=Sophos;i=\"6.00,230,1681196400\"; d=\"scan'208\";a=\"957254663\""
        ],
        "X-ExtLoop1": "1",
        "From": "Zhirun Yan <zhirun.yan@intel.com>",
        "To": "dev@dpdk.org, jerinj@marvell.com, kirankumark@marvell.com,\n ndabilpuram@marvell.com, stephen@networkplumber.org,\n pbhagavatula@marvell.com, jerinjacobk@gmail.com, david.marchand@redhat.com",
        "Cc": "cunming.liang@intel.com, haiyue.wang@intel.com,\n mattias.ronnblom@ericsson.com, Zhirun Yan <zhirun.yan@intel.com>",
        "Subject": "[PATCH v12 07/16] graph: move node clone name func into private as\n common",
        "Date": "Sat, 10 Jun 2023 03:12:36 +0800",
        "Message-Id": "<20230609191245.252521-8-zhirun.yan@intel.com>",
        "X-Mailer": "git-send-email 2.37.2",
        "In-Reply-To": "<20230609191245.252521-1-zhirun.yan@intel.com>",
        "References": "<20230608151844.1823783-1-zhirun.yan@intel.com>\n <20230609191245.252521-1-zhirun.yan@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "Move clone_name() into graph_private.h as a common function for both node\nand graph to naming a new cloned object.\n\nSigned-off-by: Haiyue Wang <haiyue.wang@intel.com>\nSigned-off-by: Cunming Liang <cunming.liang@intel.com>\nSigned-off-by: Zhirun Yan <zhirun.yan@intel.com>\nAcked-by: Jerin Jacob <jerinj@marvell.com>\n---\n lib/graph/graph_private.h | 41 +++++++++++++++++++++++++++++++++++++++\n lib/graph/node.c          | 26 +------------------------\n 2 files changed, 42 insertions(+), 25 deletions(-)",
    "diff": "diff --git a/lib/graph/graph_private.h b/lib/graph/graph_private.h\nindex 6d2137c81b..a6d8c6e98b 100644\n--- a/lib/graph/graph_private.h\n+++ b/lib/graph/graph_private.h\n@@ -11,6 +11,8 @@\n #include <rte_common.h>\n #include <rte_eal.h>\n #include <rte_spinlock.h>\n+#include <rte_errno.h>\n+#include <rte_string_fns.h>\n \n #include \"rte_graph.h\"\n #include \"rte_graph_worker.h\"\n@@ -114,6 +116,45 @@ struct graph {\n \t/**< Nodes in a graph. */\n };\n \n+/* Node and graph common functions */\n+/**\n+ * @internal\n+ *\n+ * Naming a cloned graph or node by appending a string to base name.\n+ *\n+ * @param new_name\n+ *   Pointer to the name of the cloned object.\n+ * @param base_name\n+ *   Pointer to the name of original object.\n+ * @param append_str\n+ *   Pointer to the appended string.\n+ *\n+ * @return\n+ *   0 on success, negative errno value otherwise.\n+ */\n+static inline int clone_name(char *new_name, char *base_name, const char *append_str)\n+{\n+\tssize_t sz, rc;\n+\n+#define SZ RTE_MIN(RTE_NODE_NAMESIZE, RTE_GRAPH_NAMESIZE)\n+\trc = rte_strscpy(new_name, base_name, SZ);\n+\tif (rc < 0)\n+\t\tgoto fail;\n+\tsz = rc;\n+\trc = rte_strscpy(new_name + sz, \"-\", RTE_MAX((int16_t)(SZ - sz), 0));\n+\tif (rc < 0)\n+\t\tgoto fail;\n+\tsz += rc;\n+\tsz = rte_strscpy(new_name + sz, append_str, RTE_MAX((int16_t)(SZ - sz), 0));\n+\tif (sz < 0)\n+\t\tgoto fail;\n+\n+\treturn 0;\n+fail:\n+\trte_errno = E2BIG;\n+\treturn -rte_errno;\n+}\n+\n /* Node functions */\n STAILQ_HEAD(node_head, node);\n \ndiff --git a/lib/graph/node.c b/lib/graph/node.c\nindex 339b4a0da5..99a9622779 100644\n--- a/lib/graph/node.c\n+++ b/lib/graph/node.c\n@@ -115,30 +115,6 @@ __rte_node_register(const struct rte_node_register *reg)\n \treturn RTE_NODE_ID_INVALID;\n }\n \n-static int\n-clone_name(struct rte_node_register *reg, struct node *node, const char *name)\n-{\n-\tssize_t sz, rc;\n-\n-#define SZ RTE_NODE_NAMESIZE\n-\trc = rte_strscpy(reg->name, node->name, SZ);\n-\tif (rc < 0)\n-\t\tgoto fail;\n-\tsz = rc;\n-\trc = rte_strscpy(reg->name + sz, \"-\", RTE_MAX((int16_t)(SZ - sz), 0));\n-\tif (rc < 0)\n-\t\tgoto fail;\n-\tsz += rc;\n-\tsz = rte_strscpy(reg->name + sz, name, RTE_MAX((int16_t)(SZ - sz), 0));\n-\tif (sz < 0)\n-\t\tgoto fail;\n-\n-\treturn 0;\n-fail:\n-\trte_errno = E2BIG;\n-\treturn -rte_errno;\n-}\n-\n static rte_node_t\n node_clone(struct node *node, const char *name)\n {\n@@ -170,7 +146,7 @@ node_clone(struct node *node, const char *name)\n \t\treg->next_nodes[i] = node->next_nodes[i];\n \n \t/* Naming ceremony of the new node. name is node->name + \"-\" + name */\n-\tif (clone_name(reg, node, name))\n+\tif (clone_name(reg->name, node->name, name))\n \t\tgoto free;\n \n \trc = __rte_node_register(reg);\n",
    "prefixes": [
        "v12",
        "07/16"
    ]
}