get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 139507,
    "url": "http://patches.dpdk.org/api/patches/139507/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1713470562-17415-12-git-send-email-roretzla@linux.microsoft.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": "<1713470562-17415-12-git-send-email-roretzla@linux.microsoft.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1713470562-17415-12-git-send-email-roretzla@linux.microsoft.com",
    "date": "2024-04-18T20:02:34",
    "name": "[v2,11/19] app/testpmd: remove use of VLAs for Windows built code",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "541dcaecf3dc7666976d836cac88ed7ed9abdae2",
    "submitter": {
        "id": 2077,
        "url": "http://patches.dpdk.org/api/people/2077/?format=api",
        "name": "Tyler Retzlaff",
        "email": "roretzla@linux.microsoft.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/1713470562-17415-12-git-send-email-roretzla@linux.microsoft.com/mbox/",
    "series": [
        {
            "id": 31785,
            "url": "http://patches.dpdk.org/api/series/31785/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31785",
            "date": "2024-04-18T20:02:24",
            "name": "remove use of VLAs for Windows",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/31785/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/139507/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/139507/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 9C76543EA8;\n\tThu, 18 Apr 2024 22:04:02 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4F02240A7F;\n\tThu, 18 Apr 2024 22:03:00 +0200 (CEST)",
            "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id E9CD3402D0\n for <dev@dpdk.org>; Thu, 18 Apr 2024 22:02:45 +0200 (CEST)",
            "by linux.microsoft.com (Postfix, from userid 1086)\n id 8C59120FDA96; Thu, 18 Apr 2024 13:02:44 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 8C59120FDA96",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1713470564;\n bh=HeHi4aMWlrcn3F3Uhgdo2uidpSzU8SkkucPl4eL1FZI=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=YPUhBeclPgKJUqHzcm5H7lGF5Go1x7NntH/+w47HZKa6kES2gH69+bUZcRT2oD307\n tysG+bvyeEuWz0If9/v4fEA8LyY6jgYWQtXzJGrn4VRy9aDRJUdOBvRo+viIqAwibe\n Lh8yd5rvLLWBkBYJ6RqEbkl4h4Lh6mRJU+yQq7Vo=",
        "From": "Tyler Retzlaff <roretzla@linux.microsoft.com>",
        "To": "dev@dpdk.org",
        "Cc": "=?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>,\n Akhil Goyal <gakhil@marvell.com>, Aman Singh <aman.deep.singh@intel.com>,\n Anatoly Burakov <anatoly.burakov@intel.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Bruce Richardson <bruce.richardson@intel.com>,\n Chengwen Feng <fengchengwen@huawei.com>,\n Dariusz Sosnowski <dsosnowski@nvidia.com>,\n Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,\n Fan Zhang <fanzhang.oss@gmail.com>, Ferruh Yigit <ferruh.yigit@amd.com>,\n Harman Kalra <hkalra@marvell.com>,\n Harry van Haaren <harry.van.haaren@intel.com>,\n Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,\n Jiayu Hu <hujiayu.hu@foxmail.com>, Jingjing Wu <jingjing.wu@intel.com>,\n Kevin Laatz <kevin.laatz@intel.com>,\n Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,\n Matan Azrad <matan@nvidia.com>, Ori Kam <orika@nvidia.com>,\n Pallavi Kadam <pallavi.kadam@intel.com>,\n Reshma Pattan <reshma.pattan@intel.com>,\n Sameh Gobriel <sameh.gobriel@intel.com>, Suanming Mou <suanmingm@nvidia.com>,\n Thomas Monjalon <thomas@monjalon.net>,\n Tyler Retzlaff <roretzla@linux.microsoft.com>,\n Viacheslav Ovsiienko <viacheslavo@nvidia.com>,\n Vladimir Medvedkin <vladimir.medvedkin@intel.com>,\n Volodymyr Fialko <vfialko@marvell.com>, Yipeng Wang <yipeng1.wang@intel.com>",
        "Subject": "[PATCH v2 11/19] app/testpmd: remove use of VLAs for Windows built\n code",
        "Date": "Thu, 18 Apr 2024 13:02:34 -0700",
        "Message-Id": "<1713470562-17415-12-git-send-email-roretzla@linux.microsoft.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1713470562-17415-1-git-send-email-roretzla@linux.microsoft.com>",
        "References": "<1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com>\n <1713470562-17415-1-git-send-email-roretzla@linux.microsoft.com>",
        "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": "MSVC does not support VLAs, replace VLAs with standard C arrays\nor alloca(). alloca() is available for all toolchain/platform\ncombinations officially supported by DPDK.\n\nSigned-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>\n---\n app/test-pmd/cmdline.c        |  2 +-\n app/test-pmd/cmdline_flow.c   |  9 ++++-----\n app/test-pmd/config.c         | 16 +++++++++-------\n app/test-pmd/shared_rxq_fwd.c |  2 +-\n 4 files changed, 15 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex b7759e3..dee8f5f 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -12902,7 +12902,7 @@ struct cmd_set_port_ptypes_result {\n \t\treturn;\n \t}\n \n-\tuint32_t ptypes[ret];\n+\tuint32_t *ptypes = alloca(sizeof(uint32_t) * ret);\n \n \tret = rte_eth_dev_set_ptypes(port_id, ptype_mask, ptypes, ret);\n \tif (ret < 0) {\ndiff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex 60ee933..a4fe8d9 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -11546,8 +11546,7 @@ struct indlst_conf {\n \tchar tmp[16]; /* Ought to be enough. */\n \tint ret;\n \tunsigned int hexlen = len;\n-\tunsigned int length = 256;\n-\tuint8_t hex_tmp[length];\n+\tuint8_t hex_tmp[256];\n \n \t/* Arguments are expected. */\n \tif (!arg_data)\n@@ -11574,7 +11573,7 @@ struct indlst_conf {\n \t\tstr += 2;\n \t\thexlen -= 2;\n \t}\n-\tif (hexlen > length)\n+\tif (hexlen > RTE_DIM(hex_tmp))\n \t\tgoto error;\n \tret = parse_hex_string(str, hex_tmp, &hexlen);\n \tif (ret < 0)\n@@ -11707,7 +11706,7 @@ struct indlst_conf {\n \t\tvoid *buf, unsigned int size)\n {\n \tconst struct arg *arg = pop_args(ctx);\n-\tchar str2[len + 1];\n+\tchar *str2 = alloca(len + 1);\n \tstruct in_addr tmp;\n \tint ret;\n \n@@ -11753,7 +11752,7 @@ struct indlst_conf {\n \t\tvoid *buf, unsigned int size)\n {\n \tconst struct arg *arg = pop_args(ctx);\n-\tchar str2[len + 1];\n+\tchar *str2 = alloca(len + 1);\n \tstruct in6_addr tmp;\n \tint ret;\n \ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex ba1007a..4dce6fa 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -1760,7 +1760,8 @@ void port_flow_tunnel_create(portid_t port_id, const struct tunnel_ops *ops)\n {\n \tstruct rte_port *port;\n \tstruct rte_flow_error error;\n-\tconst struct rte_flow_queue_attr *attr_list[nb_queue];\n+\tconst struct rte_flow_queue_attr **attr_list =\n+\t    alloca(sizeof(struct rte_flow_queue_attr *) * nb_queue);\n \tint std_queue;\n \n \tif (port_id_is_invalid(port_id, ENABLED_WARN) ||\n@@ -2577,10 +2578,10 @@ struct rte_flow_meter_policy *\n \tint ret;\n \tuint32_t i;\n \tstruct rte_flow_error error;\n-\tstruct rte_flow_pattern_template\n-\t\t\t*flow_pattern_templates[nb_pattern_templates];\n-\tstruct rte_flow_actions_template\n-\t\t\t*flow_actions_templates[nb_actions_templates];\n+\tstruct rte_flow_pattern_template **flow_pattern_templates =\n+\t    alloca(sizeof(struct rte_flow_pattern_template *) * nb_pattern_templates);\n+\tstruct rte_flow_actions_template **flow_actions_templates =\n+\t    alloca(sizeof(struct rte_flow_actions_template *) * nb_actions_templates);\n \n \tif (port_id_is_invalid(port_id, ENABLED_WARN) ||\n \t    port_id == (portid_t)RTE_PORT_ALL)\n@@ -5460,7 +5461,7 @@ struct igb_ring_desc_16_bytes {\n \tchar *end = NULL;\n \tint min, max;\n \tint value, i;\n-\tunsigned int marked[maxsize];\n+\tunsigned int *marked = alloca(sizeof(unsigned int) * maxsize);\n \n \tif (list == NULL || values == NULL)\n \t\treturn 0;\n@@ -7201,7 +7202,8 @@ static const char *get_ptype_str(uint32_t ptype)\n \tif (eth_dev_info_get_print_err(port_id, &dev_info))\n \t\treturn;\n \n-\tstruct rte_ether_addr addr[dev_info.max_mac_addrs];\n+\tstruct rte_ether_addr *addr =\n+\t    alloca(sizeof(struct rte_ether_addr) * dev_info.max_mac_addrs);\n \trc = rte_eth_macaddrs_get(port_id, addr, dev_info.max_mac_addrs);\n \tif (rc < 0)\n \t\treturn;\ndiff --git a/app/test-pmd/shared_rxq_fwd.c b/app/test-pmd/shared_rxq_fwd.c\nindex 623d62d..5d4ffff 100644\n--- a/app/test-pmd/shared_rxq_fwd.c\n+++ b/app/test-pmd/shared_rxq_fwd.c\n@@ -92,7 +92,7 @@\n static bool\n shared_rxq_fwd(struct fwd_stream *fs)\n {\n-\tstruct rte_mbuf *pkts_burst[nb_pkt_per_burst];\n+\tstruct rte_mbuf **pkts_burst = alloca(sizeof(struct rte_mbuf *) * nb_pkt_per_burst);\n \tuint16_t nb_rx;\n \n \tnb_rx = common_fwd_stream_receive(fs, pkts_burst, nb_pkt_per_burst);\n",
    "prefixes": [
        "v2",
        "11/19"
    ]
}