get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 82369,
    "url": "http://patches.dpdk.org/api/patches/82369/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201027210115.2529025-5-thomas@monjalon.net/",
    "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": "<20201027210115.2529025-5-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201027210115.2529025-5-thomas@monjalon.net",
    "date": "2020-10-27T21:01:04",
    "name": "[v3,04/15] node: switch IPv4 metadata to dynamic mbuf field",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "cd55b2c17166472d1c31d90ad50dafbf5c2672a6",
    "submitter": {
        "id": 685,
        "url": "http://patches.dpdk.org/api/people/685/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas@monjalon.net"
    },
    "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/20201027210115.2529025-5-thomas@monjalon.net/mbox/",
    "series": [
        {
            "id": 13393,
            "url": "http://patches.dpdk.org/api/series/13393/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13393",
            "date": "2020-10-27T21:01:00",
            "name": "remove mbuf userdata",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/13393/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/82369/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/82369/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 E0963A04B5;\n\tTue, 27 Oct 2020 22:02:53 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id CF9FD377E;\n\tTue, 27 Oct 2020 22:01:46 +0100 (CET)",
            "from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com\n [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 61A432E1E\n for <dev@dpdk.org>; Tue, 27 Oct 2020 22:01:42 +0100 (CET)",
            "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailout.nyi.internal (Postfix) with ESMTP id 13DEA5C0114;\n Tue, 27 Oct 2020 17:01:41 -0400 (EDT)",
            "from mailfrontend1 ([10.202.2.162])\n by compute2.internal (MEProxy); Tue, 27 Oct 2020 17:01:41 -0400",
            "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n by mail.messagingengine.com (Postfix) with ESMTPA id E04BE328005A;\n Tue, 27 Oct 2020 17:01:39 -0400 (EDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding; s=fm2; bh=QJdXpZU2oQc/L\n yG6lujnevqgmy9iPf8wUnvIRPL1toE=; b=FhMIZiqaG2vgtEFDNUV3y/K5/HMA8\n 2rhQ8K/bUuOEZQGk8O6o8L0IgdwKTu1aofI4bD3JGCI6VwOWMhQQP8bFcMmN4bXU\n 2OzpjAseC5qLoHNbJ2KqcwNDiPvueRH1GMiBXfw3bvLZIvFXHC5/yIPGUgWs4zY6\n RKkB1NWHgAHat3O5KiFs+aEG11UPip2kR3vUkmpOaFRqxhQaO3otR5LdE1DM34wZ\n 9zz+AJoCe6aQYky6l0xaU85xDfNYGqBv0r4PCmE0390RprcyRD88aA+JXv3jda6/\n xZvYbCfh3G6qAOLsE0ZzPeK7x5E7vdhJzNAukkg+svLIIZBTJo5l9sZwA==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:content-transfer-encoding:date:from\n :in-reply-to:message-id:mime-version:references:subject:to\n :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=\n fm1; bh=QJdXpZU2oQc/LyG6lujnevqgmy9iPf8wUnvIRPL1toE=; b=jr6QAgUW\n 8CcLucEinl2jOZrtx6OHDbA+Hr+pyWwGpkdQwI9PmpekEcVT+WQ0Ar3HyR/IlW4/\n vOfjHRcZBRMQRy/+YtcQTN4cfP9OvchN64qwX2iGBDX75lsX4uUwmPf0eohpKMwv\n 4PH+zVH+Q3DZJhisVIyzH4Pg7hMsz80zzEytJ+iZ0Cfp2w7OyLMfMsdxSaK+QVSH\n 2WsY1x0cse9OuHFkjXTG/smvDtCkOuP/M8lBwj8yMqYC8iWvs58i0Gnymo06UxTO\n u4m1Ct93FOL7eYStBEc9UikzAvEEinTmHIE7JFka0sJ3xa3Rf8rATopuIBplZlcB\n 1xjQSAymVGhHCw=="
        ],
        "X-ME-Sender": "<xms:tIqYX6msB3_JadcR_GWTs4_QVXPBE-Ir_xDfXOqvvpRHq10RAaFFZg>\n <xme:tIqYXx12Jv2_lUtloGIBy-etr9Z3UM7ma0JU_YTBxpVZUyDkMSyb7vXYgtq2e7Aav\n 9dlg-u6VFjLZAepTw>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedujedrkeelgddugeegucetufdoteggodetrfdotf\n fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen\n uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne\n cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr\n shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg\n ftrfgrthhtvghrnhepvdehgfeivdejgedtveehfefhteelfefgieevgfffveefjeegtdfg\n uedthedtgeevnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf\n hiiigvpedvnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl\n ohhnrdhnvght",
        "X-ME-Proxy": "<xmx:tIqYX4qwmlec89sTRca7f_ymhsgPzc0RdNdkw71wg05KKoKI3GqgRw>\n <xmx:tIqYX-mSlPc56LIGsmRtW-j1jtpD_D9oYUdULEqi4ySVV85O8KX0FQ>\n <xmx:tIqYX42nT5-fCgv_5jy0vJedFE4jW6v5g30G2-VrqftAWq6alqIi6w>\n <xmx:tYqYXyqOTZhHXtmovd8p4nydFjnlHQoSpbjOIe0RuiFvLYBUe_BC_A>",
        "From": "Thomas Monjalon <thomas@monjalon.net>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com, david.marchand@redhat.com,\n bruce.richardson@intel.com, olivier.matz@6wind.com,\n andrew.rybchenko@oktetlabs.ru, akhil.goyal@nxp.com,\n Nithin Dabilpuram <ndabilpuram@marvell.com>,\n Pavan Nikhilesh <pbhagavatula@marvell.com>",
        "Date": "Tue, 27 Oct 2020 22:01:04 +0100",
        "Message-Id": "<20201027210115.2529025-5-thomas@monjalon.net>",
        "X-Mailer": "git-send-email 2.28.0",
        "In-Reply-To": "<20201027210115.2529025-1-thomas@monjalon.net>",
        "References": "<20201026052105.1561859-1-thomas@monjalon.net>\n <20201027210115.2529025-1-thomas@monjalon.net>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 04/15] node: switch IPv4 metadata to dynamic\n\tmbuf field",
        "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": "The node_mbuf_priv1 was stored in the deprecated mbuf field udata64.\nIt is moved to a dynamic field in order to allow removal of udata64.\n\nWARNING: this change should be replaced with another solution\nproposed by Nithin. Waiting for the patch to be integrated.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\n lib/librte_node/ip4_lookup.c   |  7 +++++++\n lib/librte_node/ip4_rewrite.c  | 10 ++++++++++\n lib/librte_node/node_private.h | 12 ++++++++++--\n 3 files changed, 27 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_node/ip4_lookup.c b/lib/librte_node/ip4_lookup.c\nindex 8835aab9dd..3bd7c179ab 100644\n--- a/lib/librte_node/ip4_lookup.c\n+++ b/lib/librte_node/ip4_lookup.c\n@@ -21,6 +21,8 @@\n \n #include \"node_private.h\"\n \n+int node_mbuf_priv1_dynfield_offset = -1;\n+\n #define IPV4_L3FWD_LPM_MAX_RULES 1024\n #define IPV4_L3FWD_LPM_NUMBER_TBL8S (1 << 8)\n \n@@ -178,6 +180,11 @@ ip4_lookup_node_init(const struct rte_graph *graph, struct rte_node *node)\n \tRTE_SET_USED(node);\n \n \tif (!init_once) {\n+\t\tnode_mbuf_priv1_dynfield_offset = rte_mbuf_dynfield_register(\n+\t\t\t\t&node_mbuf_priv1_dynfield_desc);\n+\t\tif (node_mbuf_priv1_dynfield_offset < 0)\n+\t\t\treturn -rte_errno;\n+\n \t\t/* Setup LPM tables for all sockets */\n \t\tRTE_LCORE_FOREACH(lcore_id)\n \t\t{\ndiff --git a/lib/librte_node/ip4_rewrite.c b/lib/librte_node/ip4_rewrite.c\nindex bb7f671b5c..1c4e51968c 100644\n--- a/lib/librte_node/ip4_rewrite.c\n+++ b/lib/librte_node/ip4_rewrite.c\n@@ -248,9 +248,19 @@ ip4_rewrite_node_process(struct rte_graph *graph, struct rte_node *node,\n static int\n ip4_rewrite_node_init(const struct rte_graph *graph, struct rte_node *node)\n {\n+\tstatic bool init_once;\n \n \tRTE_SET_USED(graph);\n \tRTE_SET_USED(node);\n+\n+\tif (!init_once) {\n+\t\tnode_mbuf_priv1_dynfield_offset = rte_mbuf_dynfield_register(\n+\t\t\t\t&node_mbuf_priv1_dynfield_desc);\n+\t\tif (node_mbuf_priv1_dynfield_offset < 0)\n+\t\t\treturn -rte_errno;\n+\t\tinit_once = true;\n+\t}\n+\n \tnode_dbg(\"ip4_rewrite\", \"Initialized ip4_rewrite node initialized\");\n \n \treturn 0;\ndiff --git a/lib/librte_node/node_private.h b/lib/librte_node/node_private.h\nindex ab7941c12b..9258082df0 100644\n--- a/lib/librte_node/node_private.h\n+++ b/lib/librte_node/node_private.h\n@@ -8,6 +8,7 @@\n #include <rte_common.h>\n #include <rte_log.h>\n #include <rte_mbuf.h>\n+#include <rte_mbuf_dyn.h>\n \n extern int rte_node_logtype;\n #define NODE_LOG(level, node_name, ...)                                        \\\n@@ -21,7 +22,6 @@ extern int rte_node_logtype;\n #define node_dbg(node_name, ...) NODE_LOG(DEBUG, node_name, __VA_ARGS__)\n \n /**\n- *\n  * Node mbuf private data to store next hop, ttl and checksum.\n  */\n struct node_mbuf_priv1 {\n@@ -37,6 +37,13 @@ struct node_mbuf_priv1 {\n \t};\n };\n \n+static const struct rte_mbuf_dynfield node_mbuf_priv1_dynfield_desc = {\n+\t.name = \"rte_node_dynfield_priv1\",\n+\t.size = sizeof(struct node_mbuf_priv1),\n+\t.align = __alignof__(struct node_mbuf_priv1),\n+};\n+extern int node_mbuf_priv1_dynfield_offset;\n+\n /**\n  * Node mbuf private area 2.\n  */\n@@ -60,7 +67,8 @@ struct node_mbuf_priv2 {\n static __rte_always_inline struct node_mbuf_priv1 *\n node_mbuf_priv1(struct rte_mbuf *m)\n {\n-\treturn (struct node_mbuf_priv1 *)&m->udata64;\n+\treturn RTE_MBUF_DYNFIELD(m,\n+\t\tnode_mbuf_priv1_dynfield_offset, struct node_mbuf_priv1 *);\n }\n \n /**\n",
    "prefixes": [
        "v3",
        "04/15"
    ]
}