get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134153,
    "url": "https://patches.dpdk.org/api/patches/134153/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20231113104222.85891-1-mingjinx.ye@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20231113104222.85891-1-mingjinx.ye@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231113104222.85891-1-mingjinx.ye@intel.com",
    "date": "2023-11-13T10:42:22",
    "name": "[v6] app/test: secondary process passes allow parameters",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "19352542d4f3683b7b3dd3f00a775db51b26bc11",
    "submitter": {
        "id": 2862,
        "url": "https://patches.dpdk.org/api/people/2862/?format=api",
        "name": "Mingjin Ye",
        "email": "mingjinx.ye@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20231113104222.85891-1-mingjinx.ye@intel.com/mbox/",
    "series": [
        {
            "id": 30265,
            "url": "https://patches.dpdk.org/api/series/30265/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=30265",
            "date": "2023-11-13T10:42:22",
            "name": "[v6] app/test: secondary process passes allow parameters",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/30265/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/134153/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/134153/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 860BC430AB;\n\tMon, 13 Nov 2023 11:57:04 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 18CEC4026C;\n\tMon, 13 Nov 2023 11:57:04 +0100 (CET)",
            "from mgamail.intel.com (mgamail.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id 2D2C94021F;\n Mon, 13 Nov 2023 11:57:01 +0100 (CET)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 13 Nov 2023 02:57:01 -0800",
            "from unknown (HELO localhost.localdomain) ([10.239.252.253])\n by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 13 Nov 2023 02:56:59 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1699873022; x=1731409022;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=HWHmNyDPA8ING7W1hkarN8Xll164K4qMd/+IUa8fugg=;\n b=SMrekJsRMmi3RBKquQsANNtqNrRMpYuJDe1wWBYkcVEzDELbgs0MHCJL\n 102RMYKoH1e1XjJLNbwOgMgrfXPKj5pga/i3odLq9QbgYT8j4bhuhap00\n n25YPUBvLXfqniOndKexmfdWkhH13bd3xcmSRBWvCqwOsaPUijEahorFL\n 5PoplSHnLYnNQQePzlqL+WD/9C4ySl+FMpLepINjLBlABk1mNco+wkpcy\n XmCCjO28+b8roYoA8V+bKx0FoZRULf6ChTmLwpmegRnzKUIJNnJIQ4vx2\n 9CUEMfIJYtfQJ2vd4r42bPuX4H3Qz8nPQKuaY9zZ1H0nGOQQOtKJqS8Qd w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10892\"; a=\"387577993\"",
            "E=Sophos;i=\"6.03,299,1694761200\"; d=\"scan'208\";a=\"387577993\"",
            "E=McAfee;i=\"6600,9927,10892\"; a=\"834687870\"",
            "E=Sophos;i=\"6.03,299,1694761200\"; d=\"scan'208\";a=\"834687870\""
        ],
        "X-ExtLoop1": "1",
        "From": "Mingjin Ye <mingjinx.ye@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "qiming.yang@intel.com, Mingjin Ye <mingjinx.ye@intel.com>, stable@dpdk.org",
        "Subject": "[PATCH v6] app/test: secondary process passes allow parameters",
        "Date": "Mon, 13 Nov 2023 10:42:22 +0000",
        "Message-Id": "<20231113104222.85891-1-mingjinx.ye@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20231110103013.469430-1-mingjinx.ye@intel.com>",
        "References": "<20231110103013.469430-1-mingjinx.ye@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": "In EAL related test cases, the allow parameters are not passed to\nthe secondary process, resulting in unexpected NICs being loaded.\n\nThis patch fixes this issue by appending the allow parameters to\nthe secondary process.\n\nFixes: af75078fece3 (\"first public release\")\nCc: stable@dpdk.org\n\nSigned-off-by: Mingjin Ye <mingjinx.ye@intel.com>\n---\nv5: Optimized.\n---\nv6: Optimized.\n---\n app/test/process.h | 52 +++++++++++++++++++++++++++++++++++++++++++---\n 1 file changed, 49 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/app/test/process.h b/app/test/process.h\nindex af7bc3e0de..cd3603b7bb 100644\n--- a/app/test/process.h\n+++ b/app/test/process.h\n@@ -18,6 +18,8 @@\n \n #include <rte_string_fns.h> /* strlcpy */\n \n+#include <rte_devargs.h>\n+\n #ifdef RTE_EXEC_ENV_FREEBSD\n #define self \"curproc\"\n #define exe \"file\"\n@@ -34,6 +36,34 @@ extern uint16_t flag_for_send_pkts;\n #endif\n #endif\n \n+#define PREFIX_ALLOW \"--allow=\"\n+\n+static int\n+add_parameter_allow(char **argv, int max_capacity)\n+{\n+\tstruct rte_devargs *devargs;\n+\tint count = 0;\n+\n+\tRTE_EAL_DEVARGS_FOREACH(NULL, devargs) {\n+\t\tif (strlen(devargs->name) == 0)\n+\t\t\tcontinue;\n+\n+\t\tif (strlen(devargs->data) == 0) {\n+\t\t\tif (asprintf(&argv[count], PREFIX_ALLOW\"%s\", devargs->name) < 0)\n+\t\t\t\tbreak;\n+\t\t} else {\n+\t\t\tif (asprintf(&argv[count], PREFIX_ALLOW\"%s,%s\",\n+\t\t\t\t\t devargs->name, devargs->data) < 0)\n+\t\t\t\tbreak;\n+\t\t}\n+\n+\t\tif (++count == max_capacity)\n+\t\t\tbreak;\n+\t}\n+\n+\treturn count;\n+}\n+\n /*\n  * launches a second copy of the test process using the given argv parameters,\n  * which should include argv[0] as the process name. To identify in the\n@@ -44,7 +74,9 @@ static inline int\n process_dup(const char *const argv[], int numargs, const char *env_value)\n {\n \tint num;\n-\tchar *argv_cpy[numargs + 1];\n+\tchar **argv_cpy;\n+\tint allow_num;\n+\tint argv_num;\n \tint i, status;\n \tchar path[32];\n #ifdef RTE_LIB_PDUMP\n@@ -58,12 +90,21 @@ process_dup(const char *const argv[], int numargs, const char *env_value)\n \tif (pid < 0)\n \t\treturn -1;\n \telse if (pid == 0) {\n+\t\tallow_num = rte_devargs_type_count(RTE_DEVTYPE_ALLOWED);\n+\t\targv_num = numargs + allow_num + 1;\n+\t\targv_cpy = malloc(argv_num * sizeof(char *));\n+\t\tif (!argv_cpy)\n+\t\t\trte_panic(\"Memory allocation failed\\n\");\n+\n \t\t/* make a copy of the arguments to be passed to exec */\n \t\tfor (i = 0; i < numargs; i++)\n \t\t\targv_cpy[i] = strdup(argv[i]);\n-\t\targv_cpy[i] = NULL;\n-\t\tnum = numargs;\n+\t\tnum = add_parameter_allow(&argv_cpy[i], allow_num);\n+\t\tif (num != allow_num)\n+\t\t\trte_panic(\"Fill allow parameter incomplete\\n\");\n \n+\t\tnum += numargs;\n+\t\targv_cpy[argv_num - 1] = NULL;\n #ifdef RTE_EXEC_ENV_LINUX\n \t\t{\n \t\t\tconst char *procdir = \"/proc/\" self \"/fd/\";\n@@ -131,6 +172,11 @@ process_dup(const char *const argv[], int numargs, const char *env_value)\n \t\t\t}\n \t\t\trte_panic(\"Cannot exec: %s\\n\", strerror(errno));\n \t\t}\n+\n+\t\tfor (i = 0; i < num; i++)\n+\t\t\tfree(argv_cpy[i]);\n+\n+\t\tfree(argv_cpy);\n \t}\n \t/* parent process does a wait */\n #ifdef RTE_LIB_PDUMP\n",
    "prefixes": [
        "v6"
    ]
}