get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 138765,
    "url": "http://patchwork.dpdk.org/api/patches/138765/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20240325100500.694748-2-rjarry@redhat.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20240325100500.694748-2-rjarry@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240325100500.694748-2-rjarry@redhat.com",
    "date": "2024-03-25T10:05:01",
    "name": "[v3] graph: expose node context as pointers",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b49c074889276c5ea454a326f497a09b530e151f",
    "submitter": {
        "id": 2850,
        "url": "http://patchwork.dpdk.org/api/people/2850/?format=api",
        "name": "Robin Jarry",
        "email": "rjarry@redhat.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20240325100500.694748-2-rjarry@redhat.com/mbox/",
    "series": [
        {
            "id": 31610,
            "url": "http://patchwork.dpdk.org/api/series/31610/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=31610",
            "date": "2024-03-25T10:05:01",
            "name": "[v3] graph: expose node context as pointers",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/31610/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/138765/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/138765/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 5BA3543D46;\n\tMon, 25 Mar 2024 11:05:35 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D1D9C40271;\n\tMon, 25 Mar 2024 11:05:34 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by mails.dpdk.org (Postfix) with ESMTP id E5ED040270\n for <dev@dpdk.org>; Mon, 25 Mar 2024 11:05:32 +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-110-n0ZHpa_qOnKhhM1-MkBSwA-1; Mon,\n 25 Mar 2024 06:05:30 -0400",
            "from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com\n [10.11.54.4])\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 356351C0170D;\n Mon, 25 Mar 2024 10:05:30 +0000 (UTC)",
            "from localhost.localdomain (unknown [10.39.208.19])\n by smtp.corp.redhat.com (Postfix) with ESMTP id B4CE42022EA7;\n Mon, 25 Mar 2024 10:05:28 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1711361132;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=luFTsUlLiAriW5xVS/XjnUbT0d566VBnVQ+NtfwVy0A=;\n b=GbxHhsbg0MGGutjgvpl15Vq3CLxM//fDWtSC44C1kPPor87NF1wftSwWgDPeJiZbfhLb0X\n cjjhvsWsKKlwFkFuQY6HYHGGgJBcF4nj1Fs0rZDTpCEq6gj/S3JimcOqANkWt3UKcPQV13\n kCEq+/g7o54cCe6L3m6EnqlezS+euo0=",
        "X-MC-Unique": "n0ZHpa_qOnKhhM1-MkBSwA-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>",
        "Cc": "Tyler Retzlaff <roretzla@linux.microsoft.com>",
        "Subject": "[PATCH v3] graph: expose node context as pointers",
        "Date": "Mon, 25 Mar 2024 11:05:01 +0100",
        "Message-ID": "<20240325100500.694748-2-rjarry@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.11.54.4",
        "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": "In some cases, the node context data is used to store two pointers\nbecause the data is larger than the reserved 16 bytes. Having to define\nintermediate structures just to be able to cast is tedious. Add two\npointers that take the same space than ctx.\n\nSigned-off-by: Robin Jarry <rjarry@redhat.com>\n---\n\nNotes:\n    v3:\n    \n    * Added __extension__ to the unnamed struct inside the union.\n    * Fixed C++ header checks.\n    * Replaced alignas() with an explicit static_assert.\n    \n    v2:\n    \n    * Added __extension__ (not sure where it is needed, I don't have access to windows).\n    * It still fails the header check for C++. It seems not possible to align an unnamed union...\n      Tyler, do you have an idea about how to fix that?\n    * Added static_assert to ensure the anonymous union is not larger than RTE_NODE_CTX_SZ.\n\n lib/graph/rte_graph_worker_common.h | 21 ++++++++++++++++++++-\n 1 file changed, 20 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/graph/rte_graph_worker_common.h b/lib/graph/rte_graph_worker_common.h\nindex 36d864e2c14e..722e9dac0d36 100644\n--- a/lib/graph/rte_graph_worker_common.h\n+++ b/lib/graph/rte_graph_worker_common.h\n@@ -12,7 +12,9 @@\n  * process, enqueue and move streams of objects to the next nodes.\n  */\n \n+#include <assert.h>\n #include <stdalign.h>\n+#include <stddef.h>\n \n #include <rte_common.h>\n #include <rte_cycles.h>\n@@ -112,7 +114,19 @@ struct __rte_cache_aligned rte_node {\n \t};\n \t/* Fast path area  */\n #define RTE_NODE_CTX_SZ 16\n-\talignas(RTE_CACHE_LINE_SIZE) uint8_t ctx[RTE_NODE_CTX_SZ]; /**< Node Context. */\n+\t/*\n+\t * alignas(RTE_CACHE_LINE_SIZE) cannot be used for ctx since it is part of an unnamed union.\n+\t * The compiler shifts the next field on the next cache line which is not what we want.\n+\t * The alignment is enforced via a explcicit static asserts below.\n+\t */\n+\tunion {\n+\t\tuint8_t ctx[RTE_NODE_CTX_SZ];\n+\t\t/* Convenience aliases to store pointers without complex casting. */\n+\t\t__extension__ struct {\n+\t\t\tvoid *ctx_ptr;\n+\t\t\tvoid *ctx_ptr2;\n+\t\t};\n+\t}; /**< Node Context. */\n \tuint16_t size;\t\t/**< Total number of objects available. */\n \tuint16_t idx;\t\t/**< Number of objects used. */\n \trte_graph_off_t off;\t/**< Offset of node in the graph reel. */\n@@ -130,6 +144,11 @@ struct __rte_cache_aligned rte_node {\n \talignas(RTE_CACHE_LINE_MIN_SIZE) struct rte_node *nodes[]; /**< Next nodes. */\n };\n \n+static_assert(offsetof(struct rte_node, ctx) % RTE_CACHE_LINE_SIZE == 0,\n+\t\"rte_node ctx must be aligned on a cache line\");\n+static_assert(offsetof(struct rte_node, size) - offsetof(struct rte_node, ctx) == RTE_NODE_CTX_SZ,\n+\t\"rte_node context union cannot be larger than RTE_NODE_CTX_SZ\");\n+\n /**\n  * @internal\n  *\n",
    "prefixes": [
        "v3"
    ]
}