get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 139493,
    "url": "http://patchwork.dpdk.org/api/patches/139493/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20240418103314.40705-7-konstantin.v.ananyev@yandex.ru/",
    "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": "<20240418103314.40705-7-konstantin.v.ananyev@yandex.ru>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240418103314.40705-7-konstantin.v.ananyev@yandex.ru",
    "date": "2024-04-18T10:33:14",
    "name": "[RFC,6/6] rcu: remove VLA warnings",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "bc3b49836987d0148f969df6a4e296caf0a7730a",
    "submitter": {
        "id": 2660,
        "url": "http://patchwork.dpdk.org/api/people/2660/?format=api",
        "name": "Konstantin Ananyev",
        "email": "konstantin.v.ananyev@yandex.ru"
    },
    "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/20240418103314.40705-7-konstantin.v.ananyev@yandex.ru/mbox/",
    "series": [
        {
            "id": 31781,
            "url": "http://patchwork.dpdk.org/api/series/31781/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=31781",
            "date": "2024-04-18T10:33:08",
            "name": "core libs: remove VLA warnings",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/31781/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/139493/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/139493/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 6191343E9F;\n\tThu, 18 Apr 2024 12:34:12 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 14E9E40A89;\n\tThu, 18 Apr 2024 12:33:55 +0200 (CEST)",
            "from forward501b.mail.yandex.net (forward501b.mail.yandex.net\n [178.154.239.145])\n by mails.dpdk.org (Postfix) with ESMTP id 5C91940A71\n for <dev@dpdk.org>; Thu, 18 Apr 2024 12:33:53 +0200 (CEST)",
            "from mail-nwsmtp-smtp-production-main-22.iva.yp-c.yandex.net\n (mail-nwsmtp-smtp-production-main-22.iva.yp-c.yandex.net\n [IPv6:2a02:6b8:c0c:7907:0:640:8f19:0])\n by forward501b.mail.yandex.net (Yandex) with ESMTPS id C536161961;\n Thu, 18 Apr 2024 13:33:52 +0300 (MSK)",
            "by mail-nwsmtp-smtp-production-main-22.iva.yp-c.yandex.net\n (smtp/Yandex) with ESMTPSA id GXCBSvCo7Ko0-fUgP80VP;\n Thu, 18 Apr 2024 13:33:52 +0300"
        ],
        "X-Yandex-Fwd": "1",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;\n t=1713436432; bh=s1b4ZClLEB86JFCDAHCtaw0NUgVudcAr+Pp5Q3Ol/P4=;\n h=Cc:Message-Id:References:Date:In-Reply-To:Subject:To:From;\n b=oS7/jVedndFzVDQqlGqz1T/KvCJvxV1grQJel0QMY5Eusge03i2JATHHncfgLm1dd\n EQyyWhAcDEl1v8m3O4f9ZjzTZbiTCUhIKu3752yk3Uzs9sCnYxxgaXIvSdnYgqiXGk\n xnO76GfChbxn/x7mUKk2/tkdz2hdRO7EXsLC/Luk=",
        "Authentication-Results": "\n mail-nwsmtp-smtp-production-main-22.iva.yp-c.yandex.net;\n dkim=pass header.i=@yandex.ru",
        "From": "Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, ferruh.yigit@amd.com, andrew.rybchenko@oktetlabs.ru,\n yipeng1.wang@intel.com, sameh.gobriel@intel.com,\n bruce.richardson@intel.com, vladimir.medvedkin@intel.com,\n honnappa.nagarahalli@arm.com, roretzla@linux.microsoft.com,\n Konstantin Ananyev <konstantin.ananyev@huawei.com>",
        "Subject": "[RFC 6/6] rcu: remove VLA warnings",
        "Date": "Thu, 18 Apr 2024 11:33:14 +0100",
        "Message-Id": "<20240418103314.40705-7-konstantin.v.ananyev@yandex.ru>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240418103314.40705-1-konstantin.v.ananyev@yandex.ru>",
        "References": "<20240418103314.40705-1-konstantin.v.ananyev@yandex.ru>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "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": "From: Konstantin Ananyev <konstantin.ananyev@huawei.com>\n\n1) ./lib/rcu/rte_rcu_qsbr.c:359:9: warning: ISO C90 forbids variable length array ‘data’ [-Wvla]\n2) ./lib/rcu/rte_rcu_qsbr.c:422:9: warning: ISO C90 forbids variable length array ‘data’ [-Wvla]\n\nIn both cases we allocate VLA for one element from RCU deferred queue.\nRight now, size of element in RCU queue is not limited by API.\nThe approach is to introduce some reasonable limitation on RCU DQ\nelement size.\nChoose 128B for now.\nWith that in place we can replace both VLA occurencies with fixed size\narray.\n\nNote that such change need to be treated as API change.\nSo can be applied only at 24.11.\n\nSigned-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>\n---\n lib/rcu/rte_rcu_qsbr.c | 7 ++++---\n lib/rcu/rte_rcu_qsbr.h | 5 +++++\n 2 files changed, 9 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/lib/rcu/rte_rcu_qsbr.c b/lib/rcu/rte_rcu_qsbr.c\nindex f08d974d07..6800ef03a5 100644\n--- a/lib/rcu/rte_rcu_qsbr.c\n+++ b/lib/rcu/rte_rcu_qsbr.c\n@@ -278,7 +278,8 @@ rte_rcu_qsbr_dq_create(const struct rte_rcu_qsbr_dq_parameters *params)\n \tif (params == NULL || params->free_fn == NULL ||\n \t\tparams->v == NULL || params->name == NULL ||\n \t\tparams->size == 0 || params->esize == 0 ||\n-\t\t(params->esize % 4 != 0)) {\n+\t\t(params->esize % 4 != 0) ||\n+\t\tparams->esize > RTE_QSBR_ESIZE_MAX) {\n \t\tRCU_LOG(ERR, \"Invalid input parameter\");\n \t\trte_errno = EINVAL;\n \n@@ -356,7 +357,7 @@ int rte_rcu_qsbr_dq_enqueue(struct rte_rcu_qsbr_dq *dq, void *e)\n \t\treturn 1;\n \t}\n \n-\tchar data[dq->esize];\n+\tchar data[RTE_QSBR_ESIZE_MAX + __RTE_QSBR_TOKEN_SIZE];\n \tdq_elem = (__rte_rcu_qsbr_dq_elem_t *)data;\n \t/* Start the grace period */\n \tdq_elem->token = rte_rcu_qsbr_start(dq->v);\n@@ -419,7 +420,7 @@ rte_rcu_qsbr_dq_reclaim(struct rte_rcu_qsbr_dq *dq, unsigned int n,\n \n \tcnt = 0;\n \n-\tchar data[dq->esize];\n+\tchar data[RTE_QSBR_ESIZE_MAX + __RTE_QSBR_TOKEN_SIZE];\n \t/* Check reader threads quiescent state and reclaim resources */\n \twhile (cnt < n &&\n \t\trte_ring_dequeue_bulk_elem_start(dq->r, &data,\ndiff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h\nindex 0506191b80..892e5a31a4 100644\n--- a/lib/rcu/rte_rcu_qsbr.h\n+++ b/lib/rcu/rte_rcu_qsbr.h\n@@ -86,6 +86,11 @@ struct __rte_cache_aligned rte_rcu_qsbr_cnt {\n #define __RTE_QSBR_CNT_MAX ((uint64_t)~0)\n #define __RTE_QSBR_TOKEN_SIZE sizeof(uint64_t)\n \n+/**\n+ * Max allowable size (in bytes) of each element in the defer queue\n+ */\n+#define RTE_QSBR_ESIZE_MAX\t(2 * RTE_CACHE_LINE_MIN_SIZE)\n+\n /* RTE Quiescent State variable structure.\n  * This structure has two elements that vary in size based on the\n  * 'max_threads' parameter.\n",
    "prefixes": [
        "RFC",
        "6/6"
    ]
}